diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/CHANGELOG.md b/sdk/databoxedge/azure-mgmt-databoxedge/CHANGELOG.md index 912b56297b78..a30f981fd014 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/CHANGELOG.md +++ b/sdk/databoxedge/azure-mgmt-databoxedge/CHANGELOG.md @@ -1,5 +1,131 @@ # Release History +## 3.0.0 (2025-10-22) + +### Features Added + + - Model `DataBoxEdgeManagementClient` added parameter `cloud_setting` in method `__init__` + - Client `DataBoxEdgeManagementClient` added method `send_request` + - Client `DataBoxEdgeManagementClient` added operation group `diagnostic_settings` + - Client `DataBoxEdgeManagementClient` added operation group `device_capacity_check` + - Client `DataBoxEdgeManagementClient` added operation group `support_packages` + - Client `DataBoxEdgeManagementClient` added operation group `device_capacity_info` + - Model `DataBoxEdgeDeviceExtendedInfo` added property `system_data` + - Model `DataBoxEdgeDevicePatch` added property `properties` + - Model `EdgeProfileSubscription` added property `properties` + - Model `FileEventTrigger` added property `properties` + - Model `Job` added property `system_data` + - Model `LoadBalancerConfig` added property `ip_range` + - Model `Order` added property `kind` + - Model `PeriodicTimerEventTrigger` added property `properties` + - Enum `SkuName` added member `EDGE_MR_TCP` + - Enum `SkuName` added member `EP2_128_GPU1_MX1_W` + - Enum `SkuName` added member `EP2_256_2T4_W` + - Enum `SkuName` added member `EP2_256_GPU2_MX1` + - Enum `SkuName` added member `EP2_64_1VPU_W` + - Enum `SkuName` added member `EP2_64_MX1_W` + - Model `UpdateDetails` added property `friendly_version_number` + - Model `UpdateDetails` added property `installation_impact` + - Added enum `AccessLevel` + - Added model `CloudError` + - Added model `ClusterCapacityViewData` + - Added model `ClusterGpuCapacity` + - Added model `ClusterMemoryCapacity` + - Added model `ClusterStorageViewData` + - Added enum `ClusterWitnessType` + - Added model `DCAccessCodeProperties` + - Added model `DataBoxEdgeDevicePropertiesPatch` + - Added model `DataResidency` + - Added enum `DataResidencyType` + - Added model `DeviceCapacityInfo` + - Added model `DeviceCapacityInfoProperties` + - Added model `DeviceCapacityRequestInfo` + - Added model `DeviceCapacityRequestInfoProperties` + - Added model `DiagnosticProactiveLogCollectionSettings` + - Added model `DiagnosticRemoteSupportSettings` + - Added model `DiagnosticRemoteSupportSettingsProperties` + - Added model `FileTriggerProperties` + - Added model `HostCapacity` + - Added enum `InstallationImpact` + - Added model `MetricDimension_V1` + - Added model `MetricSpecification_V1` + - Added model `NumaNodeData` + - Added model `PeriodicTimerProperties` + - Added enum `ProactiveDiagnosticsConsent` + - Added model `ProactiveLogCollectionSettingsProperties` + - Added model `ProxyResource` + - Added model `RawCertificateData` + - Added enum `RemoteApplicationType` + - Added model `RemoteSupportSettings` + - Added model `Resource` + - Added model `SubscriptionProperties` + - Added model `SupportPackageRequestProperties` + - Added model `TrackedResource` + - Added model `TriggerSupportPackageRequest` + - Added model `VmMemory` + - Added model `VmPlacementRequestResult` + - Model `DevicesOperations` added method `create_or_update` + - Model `UsersOperations` added parameter `filter` in method `list_by_data_box_edge_device` + - Added model `DeviceCapacityCheckOperations` + - Added model `DeviceCapacityInfoOperations` + - Added model `DiagnosticSettingsOperations` + - Added model `SupportPackagesOperations` + +### Breaking Changes + + - Model `DCAccessCode` deleted or renamed its instance variable `auth_code` + - Model `DataBoxEdgeDevicePatch` deleted or renamed its instance variable `edge_profile` + - Model `EdgeProfileSubscription` deleted or renamed its instance variable `tenant_id` + - Model `EdgeProfileSubscription` deleted or renamed its instance variable `location_placement_id` + - Model `EdgeProfileSubscription` deleted or renamed its instance variable `quota_id` + - Model `EdgeProfileSubscription` deleted or renamed its instance variable `serialized_details` + - Model `EdgeProfileSubscription` deleted or renamed its instance variable `registered_features` + - Model `FileEventTrigger` deleted or renamed its instance variable `source_info` + - Model `FileEventTrigger` deleted or renamed its instance variable `sink_info` + - Model `FileEventTrigger` deleted or renamed its instance variable `custom_context_tag` + - Model `PeriodicTimerEventTrigger` deleted or renamed its instance variable `source_info` + - Model `PeriodicTimerEventTrigger` deleted or renamed its instance variable `sink_info` + - Model `PeriodicTimerEventTrigger` deleted or renamed its instance variable `custom_context_tag` + - Deleted or renamed enum value `SkuName.EP2_256_2_T4_W` + - Deleted or renamed enum value `SkuName.EP2_64_1_VPU_W` + - Deleted or renamed enum value `TimeGrain.PT12_H` + - Deleted or renamed enum value `TimeGrain.PT15_M` + - Deleted or renamed enum value `TimeGrain.PT1_D` + - Deleted or renamed enum value `TimeGrain.PT1_H` + - Deleted or renamed enum value `TimeGrain.PT1_M` + - Deleted or renamed enum value `TimeGrain.PT30_M` + - Deleted or renamed enum value `TimeGrain.PT5_M` + - Deleted or renamed enum value `TimeGrain.PT6_H` + - Model `UploadCertificateRequest` deleted or renamed its instance variable `authentication_type` + - Model `UploadCertificateRequest` deleted or renamed its instance variable `certificate` + - Deleted or renamed model `AddonList` + - Deleted or renamed model `AlertList` + - Deleted or renamed model `BandwidthSchedulesList` + - Deleted or renamed model `ContainerList` + - Deleted or renamed model `DataBoxEdgeDeviceList` + - Deleted or renamed model `DataBoxEdgeMoveRequest` + - Deleted or renamed model `DataBoxEdgeSkuList` + - Deleted or renamed model `MetricDimensionV1` + - Deleted or renamed model `MetricSpecificationV1` + - Deleted or renamed model `MonitoringMetricConfigurationList` + - Deleted or renamed model `NodeList` + - Deleted or renamed model `OperationsList` + - Deleted or renamed model `OrderList` + - Deleted or renamed model `ResourceTypeSku` + - Deleted or renamed model `RoleList` + - Deleted or renamed model `ShareList` + - Deleted or renamed model `SkuInformation` + - Deleted or renamed model `SkuInformationList` + - Deleted or renamed model `StorageAccountCredentialList` + - Deleted or renamed model `StorageAccountList` + - Deleted or renamed model `TriggerList` + - Deleted or renamed model `UserList` + - Method `DevicesOperations.list_by_resource_group` changed its parameter `expand` from `positional_or_keyword` to `keyword_only` + - Method `DevicesOperations.list_by_subscription` changed its parameter `expand` from `positional_or_keyword` to `keyword_only` + - Deleted or renamed method `DevicesOperations.begin_create_or_update` + - Method `UsersOperations.list_by_data_box_edge_device` deleted or renamed its parameter `expand` of kind `positional_or_keyword` + - Method `UsersOperations.list_by_data_box_edge_device` re-ordered its parameters from `['self', 'device_name', 'resource_group_name', 'expand', 'kwargs']` to `['self', 'device_name', 'resource_group_name', 'filter', 'kwargs']` + ## 3.0.0b1 (2025-08-06) ### Breaking Changes diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/MANIFEST.in b/sdk/databoxedge/azure-mgmt-databoxedge/MANIFEST.in index 0567a523a7a4..bbc91c0e67d3 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/MANIFEST.in +++ b/sdk/databoxedge/azure-mgmt-databoxedge/MANIFEST.in @@ -1,7 +1,7 @@ -recursive-include tests *.py *.json -recursive-include samples *.py *.md include *.md -include azure/__init__.py -include azure/mgmt/__init__.py include LICENSE include azure/mgmt/databoxedge/py.typed +recursive-include tests *.py +recursive-include samples *.py *.md +include azure/__init__.py +include azure/mgmt/__init__.py diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/_metadata.json b/sdk/databoxedge/azure-mgmt-databoxedge/_metadata.json index 5e251bbee905..9cfe5f04063f 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/_metadata.json +++ b/sdk/databoxedge/azure-mgmt-databoxedge/_metadata.json @@ -1,11 +1,3 @@ { - "commit": "2a6e9b63a0340623c39a25954d11707ffd399fcc", - "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest": "3.10.2", - "use": [ - "@autorest/python@6.37.1", - "@autorest/modelerfour@4.27.0" - ], - "autorest_command": "autorest specification/databoxedge/resource-manager//readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --keep-setup-py=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-2021-02-01-preview --use=@autorest/python@6.37.1 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", - "readme": "specification/databoxedge/resource-manager//readme.md" + "apiVersion": "2023-12-01" } \ No newline at end of file diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/apiview-properties.json b/sdk/databoxedge/azure-mgmt-databoxedge/apiview-properties.json new file mode 100644 index 000000000000..070ce9cfa652 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/apiview-properties.json @@ -0,0 +1,376 @@ +{ + "CrossLanguagePackageId": "Microsoft.DataBoxEdge", + "CrossLanguageDefinitionId": { + "azure.mgmt.databoxedge.models.Resource": "Azure.ResourceManager.CommonTypes.Resource", + "azure.mgmt.databoxedge.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource", + "azure.mgmt.databoxedge.models.Addon": "Microsoft.DataBoxEdge.Addon", + "azure.mgmt.databoxedge.models.Address": "Microsoft.DataBoxEdge.Address", + "azure.mgmt.databoxedge.models.Alert": "Microsoft.DataBoxEdge.Alert", + "azure.mgmt.databoxedge.models.AlertErrorDetails": "Microsoft.DataBoxEdge.AlertErrorDetails", + "azure.mgmt.databoxedge.models.AlertProperties": "Microsoft.DataBoxEdge.AlertProperties", + "azure.mgmt.databoxedge.models.ArcAddon": "Microsoft.DataBoxEdge.ArcAddon", + "azure.mgmt.databoxedge.models.ArcAddonProperties": "Microsoft.DataBoxEdge.ArcAddonProperties", + "azure.mgmt.databoxedge.models.ARMBaseModel": "Microsoft.DataBoxEdge.ARMBaseModel", + "azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret": "Microsoft.DataBoxEdge.AsymmetricEncryptedSecret", + "azure.mgmt.databoxedge.models.Authentication": "Microsoft.DataBoxEdge.Authentication", + "azure.mgmt.databoxedge.models.AzureContainerInfo": "Microsoft.DataBoxEdge.AzureContainerInfo", + "azure.mgmt.databoxedge.models.BandwidthSchedule": "Microsoft.DataBoxEdge.BandwidthSchedule", + "azure.mgmt.databoxedge.models.BandwidthScheduleProperties": "Microsoft.DataBoxEdge.BandwidthScheduleProperties", + "azure.mgmt.databoxedge.models.ClientAccessRight": "Microsoft.DataBoxEdge.ClientAccessRight", + "azure.mgmt.databoxedge.models.Role": "Microsoft.DataBoxEdge.Role", + "azure.mgmt.databoxedge.models.CloudEdgeManagementRole": "Microsoft.DataBoxEdge.CloudEdgeManagementRole", + "azure.mgmt.databoxedge.models.CloudEdgeManagementRoleProperties": "Microsoft.DataBoxEdge.CloudEdgeManagementRoleProperties", + "azure.mgmt.databoxedge.models.CloudError": "Microsoft.DataBoxEdge.CloudError", + "azure.mgmt.databoxedge.models.CloudErrorBody": "Microsoft.DataBoxEdge.CloudErrorBody", + "azure.mgmt.databoxedge.models.ClusterCapacityViewData": "Microsoft.DataBoxEdge.ClusterCapacityViewData", + "azure.mgmt.databoxedge.models.ClusterGpuCapacity": "Microsoft.DataBoxEdge.ClusterGpuCapacity", + "azure.mgmt.databoxedge.models.ClusterMemoryCapacity": "Microsoft.DataBoxEdge.ClusterMemoryCapacity", + "azure.mgmt.databoxedge.models.ClusterStorageViewData": "Microsoft.DataBoxEdge.ClusterStorageViewData", + "azure.mgmt.databoxedge.models.CniConfig": "Microsoft.DataBoxEdge.CniConfig", + "azure.mgmt.databoxedge.models.ComputeResource": "Microsoft.DataBoxEdge.ComputeResource", + "azure.mgmt.databoxedge.models.ContactDetails": "Microsoft.DataBoxEdge.ContactDetails", + "azure.mgmt.databoxedge.models.Container": "Microsoft.DataBoxEdge.Container", + "azure.mgmt.databoxedge.models.ContainerProperties": "Microsoft.DataBoxEdge.ContainerProperties", + "azure.mgmt.databoxedge.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource", + "azure.mgmt.databoxedge.models.DataBoxEdgeDevice": "Microsoft.DataBoxEdge.DataBoxEdgeDevice", + "azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo": "Microsoft.DataBoxEdge.DataBoxEdgeDeviceExtendedInfo", + "azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch": "Microsoft.DataBoxEdge.DataBoxEdgeDeviceExtendedInfoPatch", + "azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfoProperties": "Microsoft.DataBoxEdge.DataBoxEdgeDeviceExtendedInfoProperties", + "azure.mgmt.databoxedge.models.DataBoxEdgeDevicePatch": "Microsoft.DataBoxEdge.DataBoxEdgeDevicePatch", + "azure.mgmt.databoxedge.models.DataBoxEdgeDeviceProperties": "Microsoft.DataBoxEdge.DataBoxEdgeDeviceProperties", + "azure.mgmt.databoxedge.models.DataBoxEdgeDevicePropertiesPatch": "Microsoft.DataBoxEdge.DataBoxEdgeDevicePropertiesPatch", + "azure.mgmt.databoxedge.models.DataBoxEdgeSku": "Microsoft.DataBoxEdge.DataBoxEdgeSku", + "azure.mgmt.databoxedge.models.DataResidency": "Microsoft.DataBoxEdge.DataResidency", + "azure.mgmt.databoxedge.models.DCAccessCode": "Microsoft.DataBoxEdge.DCAccessCode", + "azure.mgmt.databoxedge.models.DCAccessCodeProperties": "Microsoft.DataBoxEdge.DCAccessCodeProperties", + "azure.mgmt.databoxedge.models.DeviceCapacityInfo": "Microsoft.DataBoxEdge.DeviceCapacityInfo", + "azure.mgmt.databoxedge.models.DeviceCapacityInfoProperties": "Microsoft.DataBoxEdge.DeviceCapacityInfoProperties", + "azure.mgmt.databoxedge.models.DeviceCapacityRequestInfo": "Microsoft.DataBoxEdge.DeviceCapacityRequestInfo", + "azure.mgmt.databoxedge.models.DeviceCapacityRequestInfoProperties": "Microsoft.DataBoxEdge.DeviceCapacityRequestInfoProperties", + "azure.mgmt.databoxedge.models.DiagnosticProactiveLogCollectionSettings": "Microsoft.DataBoxEdge.DiagnosticProactiveLogCollectionSettings", + "azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettings": "Microsoft.DataBoxEdge.DiagnosticRemoteSupportSettings", + "azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettingsProperties": "Microsoft.DataBoxEdge.DiagnosticRemoteSupportSettingsProperties", + "azure.mgmt.databoxedge.models.EdgeProfile": "Microsoft.DataBoxEdge.EdgeProfile", + "azure.mgmt.databoxedge.models.EdgeProfilePatch": "Microsoft.DataBoxEdge.EdgeProfilePatch", + "azure.mgmt.databoxedge.models.EdgeProfileSubscription": "Microsoft.DataBoxEdge.EdgeProfileSubscription", + "azure.mgmt.databoxedge.models.EdgeProfileSubscriptionPatch": "Microsoft.DataBoxEdge.EdgeProfileSubscriptionPatch", + "azure.mgmt.databoxedge.models.EtcdInfo": "Microsoft.DataBoxEdge.EtcdInfo", + "azure.mgmt.databoxedge.models.Trigger": "Microsoft.DataBoxEdge.Trigger", + "azure.mgmt.databoxedge.models.FileEventTrigger": "Microsoft.DataBoxEdge.FileEventTrigger", + "azure.mgmt.databoxedge.models.FileSourceInfo": "Microsoft.DataBoxEdge.FileSourceInfo", + "azure.mgmt.databoxedge.models.FileTriggerProperties": "Microsoft.DataBoxEdge.FileTriggerProperties", + "azure.mgmt.databoxedge.models.GenerateCertResponse": "Microsoft.DataBoxEdge.GenerateCertResponse", + "azure.mgmt.databoxedge.models.HostCapacity": "Microsoft.DataBoxEdge.HostCapacity", + "azure.mgmt.databoxedge.models.ImageRepositoryCredential": "Microsoft.DataBoxEdge.ImageRepositoryCredential", + "azure.mgmt.databoxedge.models.IoTAddon": "Microsoft.DataBoxEdge.IoTAddon", + "azure.mgmt.databoxedge.models.IoTAddonProperties": "Microsoft.DataBoxEdge.IoTAddonProperties", + "azure.mgmt.databoxedge.models.IoTDeviceInfo": "Microsoft.DataBoxEdge.IoTDeviceInfo", + "azure.mgmt.databoxedge.models.IoTEdgeAgentInfo": "Microsoft.DataBoxEdge.IoTEdgeAgentInfo", + "azure.mgmt.databoxedge.models.IoTRole": "Microsoft.DataBoxEdge.IoTRole", + "azure.mgmt.databoxedge.models.IoTRoleProperties": "Microsoft.DataBoxEdge.IoTRoleProperties", + "azure.mgmt.databoxedge.models.Ipv4Config": "Microsoft.DataBoxEdge.Ipv4Config", + "azure.mgmt.databoxedge.models.Ipv6Config": "Microsoft.DataBoxEdge.Ipv6Config", + "azure.mgmt.databoxedge.models.Job": "Microsoft.DataBoxEdge.Job", + "azure.mgmt.databoxedge.models.JobErrorDetails": "Microsoft.DataBoxEdge.JobErrorDetails", + "azure.mgmt.databoxedge.models.JobErrorItem": "Microsoft.DataBoxEdge.JobErrorItem", + "azure.mgmt.databoxedge.models.JobProperties": "Microsoft.DataBoxEdge.JobProperties", + "azure.mgmt.databoxedge.models.KubernetesClusterInfo": "Microsoft.DataBoxEdge.KubernetesClusterInfo", + "azure.mgmt.databoxedge.models.KubernetesIPConfiguration": "Microsoft.DataBoxEdge.KubernetesIPConfiguration", + "azure.mgmt.databoxedge.models.KubernetesRole": "Microsoft.DataBoxEdge.KubernetesRole", + "azure.mgmt.databoxedge.models.KubernetesRoleCompute": "Microsoft.DataBoxEdge.KubernetesRoleCompute", + "azure.mgmt.databoxedge.models.KubernetesRoleNetwork": "Microsoft.DataBoxEdge.KubernetesRoleNetwork", + "azure.mgmt.databoxedge.models.KubernetesRoleProperties": "Microsoft.DataBoxEdge.KubernetesRoleProperties", + "azure.mgmt.databoxedge.models.KubernetesRoleResources": "Microsoft.DataBoxEdge.KubernetesRoleResources", + "azure.mgmt.databoxedge.models.KubernetesRoleStorage": "Microsoft.DataBoxEdge.KubernetesRoleStorage", + "azure.mgmt.databoxedge.models.KubernetesRoleStorageClassInfo": "Microsoft.DataBoxEdge.KubernetesRoleStorageClassInfo", + "azure.mgmt.databoxedge.models.LoadBalancerConfig": "Microsoft.DataBoxEdge.LoadBalancerConfig", + "azure.mgmt.databoxedge.models.MECRole": "Microsoft.DataBoxEdge.MECRole", + "azure.mgmt.databoxedge.models.MECRoleProperties": "Microsoft.DataBoxEdge.MECRoleProperties", + "azure.mgmt.databoxedge.models.MetricConfiguration": "Microsoft.DataBoxEdge.MetricConfiguration", + "azure.mgmt.databoxedge.models.MetricCounter": "Microsoft.DataBoxEdge.MetricCounter", + "azure.mgmt.databoxedge.models.MetricCounterSet": "Microsoft.DataBoxEdge.MetricCounterSet", + "azure.mgmt.databoxedge.models.MetricDimension": "Microsoft.DataBoxEdge.MetricDimension", + "azure.mgmt.databoxedge.models.MetricDimension_V1": "Microsoft.DataBoxEdge.MetricDimension_V1", + "azure.mgmt.databoxedge.models.MetricSpecification_V1": "Microsoft.DataBoxEdge.MetricSpecification_V1", + "azure.mgmt.databoxedge.models.MonitoringMetricConfiguration": "Microsoft.DataBoxEdge.MonitoringMetricConfiguration", + "azure.mgmt.databoxedge.models.MonitoringMetricConfigurationProperties": "Microsoft.DataBoxEdge.MonitoringMetricConfigurationProperties", + "azure.mgmt.databoxedge.models.MountPointMap": "Microsoft.DataBoxEdge.MountPointMap", + "azure.mgmt.databoxedge.models.NetworkAdapter": "Microsoft.DataBoxEdge.NetworkAdapter", + "azure.mgmt.databoxedge.models.NetworkAdapterPosition": "Microsoft.DataBoxEdge.NetworkAdapterPosition", + "azure.mgmt.databoxedge.models.NetworkSettings": "Microsoft.DataBoxEdge.NetworkSettings", + "azure.mgmt.databoxedge.models.NetworkSettingsProperties": "Microsoft.DataBoxEdge.NetworkSettingsProperties", + "azure.mgmt.databoxedge.models.Node": "Microsoft.DataBoxEdge.Node", + "azure.mgmt.databoxedge.models.NodeInfo": "Microsoft.DataBoxEdge.NodeInfo", + "azure.mgmt.databoxedge.models.NodeProperties": "Microsoft.DataBoxEdge.NodeProperties", + "azure.mgmt.databoxedge.models.NumaNodeData": "Microsoft.DataBoxEdge.NumaNodeData", + "azure.mgmt.databoxedge.models.Operation": "Microsoft.DataBoxEdge.Operation", + "azure.mgmt.databoxedge.models.OperationDisplay": "Microsoft.DataBoxEdge.OperationDisplay", + "azure.mgmt.databoxedge.models.OperationProperties": "Microsoft.DataBoxEdge.OperationProperties", + "azure.mgmt.databoxedge.models.Order": "Microsoft.DataBoxEdge.Order", + "azure.mgmt.databoxedge.models.OrderProperties": "Microsoft.DataBoxEdge.OrderProperties", + "azure.mgmt.databoxedge.models.OrderStatus": "Microsoft.DataBoxEdge.OrderStatus", + "azure.mgmt.databoxedge.models.PeriodicTimerEventTrigger": "Microsoft.DataBoxEdge.PeriodicTimerEventTrigger", + "azure.mgmt.databoxedge.models.PeriodicTimerProperties": "Microsoft.DataBoxEdge.PeriodicTimerProperties", + "azure.mgmt.databoxedge.models.PeriodicTimerSourceInfo": "Microsoft.DataBoxEdge.PeriodicTimerSourceInfo", + "azure.mgmt.databoxedge.models.ProactiveLogCollectionSettingsProperties": "Microsoft.DataBoxEdge.ProactiveLogCollectionSettingsProperties", + "azure.mgmt.databoxedge.models.RawCertificateData": "Microsoft.DataBoxEdge.RawCertificateData", + "azure.mgmt.databoxedge.models.RefreshDetails": "Microsoft.DataBoxEdge.RefreshDetails", + "azure.mgmt.databoxedge.models.RemoteSupportSettings": "Microsoft.DataBoxEdge.RemoteSupportSettings", + "azure.mgmt.databoxedge.models.ResourceIdentity": "Microsoft.DataBoxEdge.ResourceIdentity", + "azure.mgmt.databoxedge.models.ResourceMoveDetails": "Microsoft.DataBoxEdge.ResourceMoveDetails", + "azure.mgmt.databoxedge.models.RoleSinkInfo": "Microsoft.DataBoxEdge.RoleSinkInfo", + "azure.mgmt.databoxedge.models.Secret": "Microsoft.DataBoxEdge.Secret", + "azure.mgmt.databoxedge.models.SecuritySettings": "Microsoft.DataBoxEdge.SecuritySettings", + "azure.mgmt.databoxedge.models.SecuritySettingsProperties": "Microsoft.DataBoxEdge.SecuritySettingsProperties", + "azure.mgmt.databoxedge.models.ServiceSpecification": "Microsoft.DataBoxEdge.ServiceSpecification", + "azure.mgmt.databoxedge.models.Share": "Microsoft.DataBoxEdge.Share", + "azure.mgmt.databoxedge.models.ShareAccessRight": "Microsoft.DataBoxEdge.ShareAccessRight", + "azure.mgmt.databoxedge.models.ShareProperties": "Microsoft.DataBoxEdge.ShareProperties", + "azure.mgmt.databoxedge.models.Sku": "Microsoft.DataBoxEdge.Sku", + "azure.mgmt.databoxedge.models.SkuCapability": "Microsoft.DataBoxEdge.SkuCapability", + "azure.mgmt.databoxedge.models.SkuCost": "Microsoft.DataBoxEdge.SkuCost", + "azure.mgmt.databoxedge.models.SkuLocationInfo": "Microsoft.DataBoxEdge.SkuLocationInfo", + "azure.mgmt.databoxedge.models.StorageAccount": "Microsoft.DataBoxEdge.StorageAccount", + "azure.mgmt.databoxedge.models.StorageAccountCredential": "Microsoft.DataBoxEdge.StorageAccountCredential", + "azure.mgmt.databoxedge.models.StorageAccountCredentialProperties": "Microsoft.DataBoxEdge.StorageAccountCredentialProperties", + "azure.mgmt.databoxedge.models.StorageAccountProperties": "Microsoft.DataBoxEdge.StorageAccountProperties", + "azure.mgmt.databoxedge.models.SubscriptionProperties": "Microsoft.DataBoxEdge.SubscriptionProperties", + "azure.mgmt.databoxedge.models.SubscriptionRegisteredFeatures": "Microsoft.DataBoxEdge.SubscriptionRegisteredFeatures", + "azure.mgmt.databoxedge.models.SupportPackageRequestProperties": "Microsoft.DataBoxEdge.SupportPackageRequestProperties", + "azure.mgmt.databoxedge.models.SymmetricKey": "Microsoft.DataBoxEdge.SymmetricKey", + "azure.mgmt.databoxedge.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData", + "azure.mgmt.databoxedge.models.TrackingInfo": "Microsoft.DataBoxEdge.TrackingInfo", + "azure.mgmt.databoxedge.models.TriggerSupportPackageRequest": "Microsoft.DataBoxEdge.TriggerSupportPackageRequest", + "azure.mgmt.databoxedge.models.UpdateDetails": "Microsoft.DataBoxEdge.UpdateDetails", + "azure.mgmt.databoxedge.models.UpdateDownloadProgress": "Microsoft.DataBoxEdge.UpdateDownloadProgress", + "azure.mgmt.databoxedge.models.UpdateInstallProgress": "Microsoft.DataBoxEdge.UpdateInstallProgress", + "azure.mgmt.databoxedge.models.UpdateSummary": "Microsoft.DataBoxEdge.UpdateSummary", + "azure.mgmt.databoxedge.models.UpdateSummaryProperties": "Microsoft.DataBoxEdge.UpdateSummaryProperties", + "azure.mgmt.databoxedge.models.UploadCertificateRequest": "Microsoft.DataBoxEdge.UploadCertificateRequest", + "azure.mgmt.databoxedge.models.UploadCertificateResponse": "Microsoft.DataBoxEdge.UploadCertificateResponse", + "azure.mgmt.databoxedge.models.User": "Microsoft.DataBoxEdge.User", + "azure.mgmt.databoxedge.models.UserAccessRight": "Microsoft.DataBoxEdge.UserAccessRight", + "azure.mgmt.databoxedge.models.UserProperties": "Microsoft.DataBoxEdge.UserProperties", + "azure.mgmt.databoxedge.models.VmMemory": "Microsoft.DataBoxEdge.VmMemory", + "azure.mgmt.databoxedge.models.VmPlacementRequestResult": "Microsoft.DataBoxEdge.VmPlacementRequestResult", + "azure.mgmt.databoxedge.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", + "azure.mgmt.databoxedge.models.JobType": "Microsoft.DataBoxEdge.JobType", + "azure.mgmt.databoxedge.models.UpdateOperationStage": "Microsoft.DataBoxEdge.UpdateOperationStage", + "azure.mgmt.databoxedge.models.DownloadPhase": "Microsoft.DataBoxEdge.DownloadPhase", + "azure.mgmt.databoxedge.models.JobStatus": "Microsoft.DataBoxEdge.JobStatus", + "azure.mgmt.databoxedge.models.NetworkGroup": "Microsoft.DataBoxEdge.NetworkGroup", + "azure.mgmt.databoxedge.models.NetworkAdapterStatus": "Microsoft.DataBoxEdge.NetworkAdapterStatus", + "azure.mgmt.databoxedge.models.NetworkAdapterRDMAStatus": "Microsoft.DataBoxEdge.NetworkAdapterRDMAStatus", + "azure.mgmt.databoxedge.models.NetworkAdapterDHCPStatus": "Microsoft.DataBoxEdge.NetworkAdapterDHCPStatus", + "azure.mgmt.databoxedge.models.DataBoxEdgeDeviceStatus": "Microsoft.DataBoxEdge.DataBoxEdgeDeviceStatus", + "azure.mgmt.databoxedge.models.DeviceType": "Microsoft.DataBoxEdge.DeviceType", + "azure.mgmt.databoxedge.models.RoleTypes": "Microsoft.DataBoxEdge.RoleTypes", + "azure.mgmt.databoxedge.models.ResourceMoveStatus": "Microsoft.DataBoxEdge.ResourceMoveStatus", + "azure.mgmt.databoxedge.models.SubscriptionState": "Microsoft.DataBoxEdge.SubscriptionState", + "azure.mgmt.databoxedge.models.DataResidencyType": "Microsoft.DataBoxEdge.DataResidencyType", + "azure.mgmt.databoxedge.models.SkuName": "Microsoft.DataBoxEdge.SkuName", + "azure.mgmt.databoxedge.models.SkuTier": "Microsoft.DataBoxEdge.SkuTier", + "azure.mgmt.databoxedge.models.MsiIdentityType": "Microsoft.DataBoxEdge.MsiIdentityType", + "azure.mgmt.databoxedge.models.DataBoxEdgeDeviceKind": "Microsoft.DataBoxEdge.DataBoxEdgeDeviceKind", + "azure.mgmt.databoxedge.models.KeyVaultSyncStatus": "Microsoft.DataBoxEdge.KeyVaultSyncStatus", + "azure.mgmt.databoxedge.models.EncryptionAlgorithm": "Microsoft.DataBoxEdge.EncryptionAlgorithm", + "azure.mgmt.databoxedge.models.ClusterWitnessType": "Microsoft.DataBoxEdge.ClusterWitnessType", + "azure.mgmt.databoxedge.models.AuthenticationType": "Microsoft.DataBoxEdge.AuthenticationType", + "azure.mgmt.databoxedge.models.InstallRebootBehavior": "Microsoft.DataBoxEdge.InstallRebootBehavior", + "azure.mgmt.databoxedge.models.UpdateOperation": "Microsoft.DataBoxEdge.UpdateOperation", + "azure.mgmt.databoxedge.models.UpdateType": "Microsoft.DataBoxEdge.UpdateType", + "azure.mgmt.databoxedge.models.InstallationImpact": "Microsoft.DataBoxEdge.InstallationImpact", + "azure.mgmt.databoxedge.models.UpdateStatus": "Microsoft.DataBoxEdge.UpdateStatus", + "azure.mgmt.databoxedge.models.MetricUnit": "Microsoft.DataBoxEdge.MetricUnit", + "azure.mgmt.databoxedge.models.MetricAggregationType": "Microsoft.DataBoxEdge.MetricAggregationType", + "azure.mgmt.databoxedge.models.MetricCategory": "Microsoft.DataBoxEdge.MetricCategory", + "azure.mgmt.databoxedge.models.TimeGrain": "Microsoft.DataBoxEdge.TimeGrain", + "azure.mgmt.databoxedge.models.AlertSeverity": "Microsoft.DataBoxEdge.AlertSeverity", + "azure.mgmt.databoxedge.models.DayOfWeek": "Microsoft.DataBoxEdge.DayOfWeek", + "azure.mgmt.databoxedge.models.ProactiveDiagnosticsConsent": "Microsoft.DataBoxEdge.ProactiveDiagnosticsConsent", + "azure.mgmt.databoxedge.models.RemoteApplicationType": "Microsoft.DataBoxEdge.RemoteApplicationType", + "azure.mgmt.databoxedge.models.AccessLevel": "Microsoft.DataBoxEdge.AccessLevel", + "azure.mgmt.databoxedge.models.OrderState": "Microsoft.DataBoxEdge.OrderState", + "azure.mgmt.databoxedge.models.ShipmentType": "Microsoft.DataBoxEdge.ShipmentType", + "azure.mgmt.databoxedge.models.RoleStatus": "Microsoft.DataBoxEdge.RoleStatus", + "azure.mgmt.databoxedge.models.PlatformType": "Microsoft.DataBoxEdge.PlatformType", + "azure.mgmt.databoxedge.models.MountType": "Microsoft.DataBoxEdge.MountType", + "azure.mgmt.databoxedge.models.HostPlatformType": "Microsoft.DataBoxEdge.HostPlatformType", + "azure.mgmt.databoxedge.models.KubernetesState": "Microsoft.DataBoxEdge.KubernetesState", + "azure.mgmt.databoxedge.models.KubernetesNodeType": "Microsoft.DataBoxEdge.KubernetesNodeType", + "azure.mgmt.databoxedge.models.PosixComplianceStatus": "Microsoft.DataBoxEdge.PosixComplianceStatus", + "azure.mgmt.databoxedge.models.AddonType": "Microsoft.DataBoxEdge.AddonType", + "azure.mgmt.databoxedge.models.AddonState": "Microsoft.DataBoxEdge.AddonState", + "azure.mgmt.databoxedge.models.ShareStatus": "Microsoft.DataBoxEdge.ShareStatus", + "azure.mgmt.databoxedge.models.MonitoringStatus": "Microsoft.DataBoxEdge.MonitoringStatus", + "azure.mgmt.databoxedge.models.AzureContainerDataFormat": "Microsoft.DataBoxEdge.AzureContainerDataFormat", + "azure.mgmt.databoxedge.models.ShareAccessProtocol": "Microsoft.DataBoxEdge.ShareAccessProtocol", + "azure.mgmt.databoxedge.models.ShareAccessType": "Microsoft.DataBoxEdge.ShareAccessType", + "azure.mgmt.databoxedge.models.ClientPermissionType": "Microsoft.DataBoxEdge.ClientPermissionType", + "azure.mgmt.databoxedge.models.DataPolicy": "Microsoft.DataBoxEdge.DataPolicy", + "azure.mgmt.databoxedge.models.SSLStatus": "Microsoft.DataBoxEdge.SSLStatus", + "azure.mgmt.databoxedge.models.AccountType": "Microsoft.DataBoxEdge.AccountType", + "azure.mgmt.databoxedge.models.StorageAccountStatus": "Microsoft.DataBoxEdge.StorageAccountStatus", + "azure.mgmt.databoxedge.models.ContainerStatus": "Microsoft.DataBoxEdge.ContainerStatus", + "azure.mgmt.databoxedge.models.TriggerEventType": "Microsoft.DataBoxEdge.TriggerEventType", + "azure.mgmt.databoxedge.models.UserType": "Microsoft.DataBoxEdge.UserType", + "azure.mgmt.databoxedge.models.NodeStatus": "Microsoft.DataBoxEdge.NodeStatus", + "azure.mgmt.databoxedge.models.SkuSignupOption": "Microsoft.DataBoxEdge.SkuSignupOption", + "azure.mgmt.databoxedge.models.SkuVersion": "Microsoft.DataBoxEdge.SkuVersion", + "azure.mgmt.databoxedge.models.SkuAvailability": "Microsoft.DataBoxEdge.SkuAvailability", + "azure.mgmt.databoxedge.operations.OperationsStatusOperations.get": "Microsoft.DataBoxEdge.OperationsStatus.get", + "azure.mgmt.databoxedge.aio.operations.OperationsStatusOperations.get": "Microsoft.DataBoxEdge.OperationsStatus.get", + "azure.mgmt.databoxedge.operations.DevicesOperations.get_network_settings": "Microsoft.DataBoxEdge.Devices.getNetworkSettings", + "azure.mgmt.databoxedge.aio.operations.DevicesOperations.get_network_settings": "Microsoft.DataBoxEdge.Devices.getNetworkSettings", + "azure.mgmt.databoxedge.operations.DevicesOperations.get": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.get", + "azure.mgmt.databoxedge.aio.operations.DevicesOperations.get": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.get", + "azure.mgmt.databoxedge.operations.DevicesOperations.create_or_update": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.createOrUpdate", + "azure.mgmt.databoxedge.aio.operations.DevicesOperations.create_or_update": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.createOrUpdate", + "azure.mgmt.databoxedge.operations.DevicesOperations.update": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.update", + "azure.mgmt.databoxedge.aio.operations.DevicesOperations.update": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.update", + "azure.mgmt.databoxedge.operations.DevicesOperations.begin_delete": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.delete", + "azure.mgmt.databoxedge.aio.operations.DevicesOperations.begin_delete": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.delete", + "azure.mgmt.databoxedge.operations.DevicesOperations.list_by_resource_group": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.listByResourceGroup", + "azure.mgmt.databoxedge.aio.operations.DevicesOperations.list_by_resource_group": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.listByResourceGroup", + "azure.mgmt.databoxedge.operations.DevicesOperations.list_by_subscription": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.listBySubscription", + "azure.mgmt.databoxedge.aio.operations.DevicesOperations.list_by_subscription": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.listBySubscription", + "azure.mgmt.databoxedge.operations.DevicesOperations.begin_download_updates": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.downloadUpdates", + "azure.mgmt.databoxedge.aio.operations.DevicesOperations.begin_download_updates": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.downloadUpdates", + "azure.mgmt.databoxedge.operations.DevicesOperations.generate_certificate": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.generateCertificate", + "azure.mgmt.databoxedge.aio.operations.DevicesOperations.generate_certificate": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.generateCertificate", + "azure.mgmt.databoxedge.operations.DevicesOperations.get_extended_information": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.getExtendedInformation", + "azure.mgmt.databoxedge.aio.operations.DevicesOperations.get_extended_information": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.getExtendedInformation", + "azure.mgmt.databoxedge.operations.DevicesOperations.begin_install_updates": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.installUpdates", + "azure.mgmt.databoxedge.aio.operations.DevicesOperations.begin_install_updates": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.installUpdates", + "azure.mgmt.databoxedge.operations.DevicesOperations.begin_scan_for_updates": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.scanForUpdates", + "azure.mgmt.databoxedge.aio.operations.DevicesOperations.begin_scan_for_updates": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.scanForUpdates", + "azure.mgmt.databoxedge.operations.DevicesOperations.begin_create_or_update_security_settings": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.createOrUpdateSecuritySettings", + "azure.mgmt.databoxedge.aio.operations.DevicesOperations.begin_create_or_update_security_settings": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.createOrUpdateSecuritySettings", + "azure.mgmt.databoxedge.operations.DevicesOperations.update_extended_information": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.updateExtendedInformation", + "azure.mgmt.databoxedge.aio.operations.DevicesOperations.update_extended_information": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.updateExtendedInformation", + "azure.mgmt.databoxedge.operations.DevicesOperations.upload_certificate": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.uploadCertificate", + "azure.mgmt.databoxedge.aio.operations.DevicesOperations.upload_certificate": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.uploadCertificate", + "azure.mgmt.databoxedge.operations.DevicesOperations.get_update_summary": "Microsoft.DataBoxEdge.UpdateSummaries.getUpdateSummary", + "azure.mgmt.databoxedge.aio.operations.DevicesOperations.get_update_summary": "Microsoft.DataBoxEdge.UpdateSummaries.getUpdateSummary", + "azure.mgmt.databoxedge.operations.Operations.list": "Azure.ResourceManager.Legacy.Operations.list", + "azure.mgmt.databoxedge.aio.operations.Operations.list": "Azure.ResourceManager.Legacy.Operations.list", + "azure.mgmt.databoxedge.operations.AlertsOperations.get": "Microsoft.DataBoxEdge.Alerts.get", + "azure.mgmt.databoxedge.aio.operations.AlertsOperations.get": "Microsoft.DataBoxEdge.Alerts.get", + "azure.mgmt.databoxedge.operations.AlertsOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.Alerts.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.aio.operations.AlertsOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.Alerts.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.operations.BandwidthSchedulesOperations.get": "Microsoft.DataBoxEdge.BandwidthSchedules.get", + "azure.mgmt.databoxedge.aio.operations.BandwidthSchedulesOperations.get": "Microsoft.DataBoxEdge.BandwidthSchedules.get", + "azure.mgmt.databoxedge.operations.BandwidthSchedulesOperations.begin_create_or_update": "Microsoft.DataBoxEdge.BandwidthSchedules.createOrUpdate", + "azure.mgmt.databoxedge.aio.operations.BandwidthSchedulesOperations.begin_create_or_update": "Microsoft.DataBoxEdge.BandwidthSchedules.createOrUpdate", + "azure.mgmt.databoxedge.operations.BandwidthSchedulesOperations.begin_delete": "Microsoft.DataBoxEdge.BandwidthSchedules.delete", + "azure.mgmt.databoxedge.aio.operations.BandwidthSchedulesOperations.begin_delete": "Microsoft.DataBoxEdge.BandwidthSchedules.delete", + "azure.mgmt.databoxedge.operations.BandwidthSchedulesOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.BandwidthSchedules.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.aio.operations.BandwidthSchedulesOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.BandwidthSchedules.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.operations.DiagnosticSettingsOperations.get_diagnostic_proactive_log_collection_settings": "Microsoft.DataBoxEdge.DiagnosticSettings.getDiagnosticProactiveLogCollectionSettings", + "azure.mgmt.databoxedge.aio.operations.DiagnosticSettingsOperations.get_diagnostic_proactive_log_collection_settings": "Microsoft.DataBoxEdge.DiagnosticSettings.getDiagnosticProactiveLogCollectionSettings", + "azure.mgmt.databoxedge.operations.DiagnosticSettingsOperations.begin_update_diagnostic_proactive_log_collection_settings": "Microsoft.DataBoxEdge.DiagnosticSettings.updateDiagnosticProactiveLogCollectionSettings", + "azure.mgmt.databoxedge.aio.operations.DiagnosticSettingsOperations.begin_update_diagnostic_proactive_log_collection_settings": "Microsoft.DataBoxEdge.DiagnosticSettings.updateDiagnosticProactiveLogCollectionSettings", + "azure.mgmt.databoxedge.operations.DiagnosticSettingsOperations.get_diagnostic_remote_support_settings": "Microsoft.DataBoxEdge.DiagnosticRemoteSupportSettingsOperationGroup.getDiagnosticRemoteSupportSettings", + "azure.mgmt.databoxedge.aio.operations.DiagnosticSettingsOperations.get_diagnostic_remote_support_settings": "Microsoft.DataBoxEdge.DiagnosticRemoteSupportSettingsOperationGroup.getDiagnosticRemoteSupportSettings", + "azure.mgmt.databoxedge.operations.DiagnosticSettingsOperations.begin_update_diagnostic_remote_support_settings": "Microsoft.DataBoxEdge.DiagnosticRemoteSupportSettingsOperationGroup.updateDiagnosticRemoteSupportSettings", + "azure.mgmt.databoxedge.aio.operations.DiagnosticSettingsOperations.begin_update_diagnostic_remote_support_settings": "Microsoft.DataBoxEdge.DiagnosticRemoteSupportSettingsOperationGroup.updateDiagnosticRemoteSupportSettings", + "azure.mgmt.databoxedge.operations.JobsOperations.get": "Microsoft.DataBoxEdge.Jobs.get", + "azure.mgmt.databoxedge.aio.operations.JobsOperations.get": "Microsoft.DataBoxEdge.Jobs.get", + "azure.mgmt.databoxedge.operations.OrdersOperations.get": "Microsoft.DataBoxEdge.Orders.get", + "azure.mgmt.databoxedge.aio.operations.OrdersOperations.get": "Microsoft.DataBoxEdge.Orders.get", + "azure.mgmt.databoxedge.operations.OrdersOperations.begin_create_or_update": "Microsoft.DataBoxEdge.Orders.createOrUpdate", + "azure.mgmt.databoxedge.aio.operations.OrdersOperations.begin_create_or_update": "Microsoft.DataBoxEdge.Orders.createOrUpdate", + "azure.mgmt.databoxedge.operations.OrdersOperations.begin_delete": "Microsoft.DataBoxEdge.Orders.delete", + "azure.mgmt.databoxedge.aio.operations.OrdersOperations.begin_delete": "Microsoft.DataBoxEdge.Orders.delete", + "azure.mgmt.databoxedge.operations.OrdersOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.Orders.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.aio.operations.OrdersOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.Orders.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.operations.OrdersOperations.list_dc_access_code": "Microsoft.DataBoxEdge.Orders.listDCAccessCode", + "azure.mgmt.databoxedge.aio.operations.OrdersOperations.list_dc_access_code": "Microsoft.DataBoxEdge.Orders.listDCAccessCode", + "azure.mgmt.databoxedge.operations.RolesOperations.get": "Microsoft.DataBoxEdge.Roles.get", + "azure.mgmt.databoxedge.aio.operations.RolesOperations.get": "Microsoft.DataBoxEdge.Roles.get", + "azure.mgmt.databoxedge.operations.RolesOperations.begin_create_or_update": "Microsoft.DataBoxEdge.Roles.createOrUpdate", + "azure.mgmt.databoxedge.aio.operations.RolesOperations.begin_create_or_update": "Microsoft.DataBoxEdge.Roles.createOrUpdate", + "azure.mgmt.databoxedge.operations.RolesOperations.begin_delete": "Microsoft.DataBoxEdge.Roles.delete", + "azure.mgmt.databoxedge.aio.operations.RolesOperations.begin_delete": "Microsoft.DataBoxEdge.Roles.delete", + "azure.mgmt.databoxedge.operations.RolesOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.Roles.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.aio.operations.RolesOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.Roles.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.operations.AddonsOperations.get": "Microsoft.DataBoxEdge.Addons.get", + "azure.mgmt.databoxedge.aio.operations.AddonsOperations.get": "Microsoft.DataBoxEdge.Addons.get", + "azure.mgmt.databoxedge.operations.AddonsOperations.begin_create_or_update": "Microsoft.DataBoxEdge.Addons.createOrUpdate", + "azure.mgmt.databoxedge.aio.operations.AddonsOperations.begin_create_or_update": "Microsoft.DataBoxEdge.Addons.createOrUpdate", + "azure.mgmt.databoxedge.operations.AddonsOperations.begin_delete": "Microsoft.DataBoxEdge.Addons.delete", + "azure.mgmt.databoxedge.aio.operations.AddonsOperations.begin_delete": "Microsoft.DataBoxEdge.Addons.delete", + "azure.mgmt.databoxedge.operations.AddonsOperations.list_by_role": "Microsoft.DataBoxEdge.Addons.listByRole", + "azure.mgmt.databoxedge.aio.operations.AddonsOperations.list_by_role": "Microsoft.DataBoxEdge.Addons.listByRole", + "azure.mgmt.databoxedge.operations.SharesOperations.get": "Microsoft.DataBoxEdge.Shares.get", + "azure.mgmt.databoxedge.aio.operations.SharesOperations.get": "Microsoft.DataBoxEdge.Shares.get", + "azure.mgmt.databoxedge.operations.SharesOperations.begin_create_or_update": "Microsoft.DataBoxEdge.Shares.createOrUpdate", + "azure.mgmt.databoxedge.aio.operations.SharesOperations.begin_create_or_update": "Microsoft.DataBoxEdge.Shares.createOrUpdate", + "azure.mgmt.databoxedge.operations.SharesOperations.begin_delete": "Microsoft.DataBoxEdge.Shares.delete", + "azure.mgmt.databoxedge.aio.operations.SharesOperations.begin_delete": "Microsoft.DataBoxEdge.Shares.delete", + "azure.mgmt.databoxedge.operations.SharesOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.Shares.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.aio.operations.SharesOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.Shares.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.operations.SharesOperations.begin_refresh": "Microsoft.DataBoxEdge.Shares.refresh", + "azure.mgmt.databoxedge.aio.operations.SharesOperations.begin_refresh": "Microsoft.DataBoxEdge.Shares.refresh", + "azure.mgmt.databoxedge.operations.StorageAccountCredentialsOperations.get": "Microsoft.DataBoxEdge.StorageAccountCredentials.get", + "azure.mgmt.databoxedge.aio.operations.StorageAccountCredentialsOperations.get": "Microsoft.DataBoxEdge.StorageAccountCredentials.get", + "azure.mgmt.databoxedge.operations.StorageAccountCredentialsOperations.begin_create_or_update": "Microsoft.DataBoxEdge.StorageAccountCredentials.createOrUpdate", + "azure.mgmt.databoxedge.aio.operations.StorageAccountCredentialsOperations.begin_create_or_update": "Microsoft.DataBoxEdge.StorageAccountCredentials.createOrUpdate", + "azure.mgmt.databoxedge.operations.StorageAccountCredentialsOperations.begin_delete": "Microsoft.DataBoxEdge.StorageAccountCredentials.delete", + "azure.mgmt.databoxedge.aio.operations.StorageAccountCredentialsOperations.begin_delete": "Microsoft.DataBoxEdge.StorageAccountCredentials.delete", + "azure.mgmt.databoxedge.operations.StorageAccountCredentialsOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.StorageAccountCredentials.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.aio.operations.StorageAccountCredentialsOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.StorageAccountCredentials.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.operations.StorageAccountsOperations.get": "Microsoft.DataBoxEdge.StorageAccounts.get", + "azure.mgmt.databoxedge.aio.operations.StorageAccountsOperations.get": "Microsoft.DataBoxEdge.StorageAccounts.get", + "azure.mgmt.databoxedge.operations.StorageAccountsOperations.begin_create_or_update": "Microsoft.DataBoxEdge.StorageAccounts.createOrUpdate", + "azure.mgmt.databoxedge.aio.operations.StorageAccountsOperations.begin_create_or_update": "Microsoft.DataBoxEdge.StorageAccounts.createOrUpdate", + "azure.mgmt.databoxedge.operations.StorageAccountsOperations.begin_delete": "Microsoft.DataBoxEdge.StorageAccounts.delete", + "azure.mgmt.databoxedge.aio.operations.StorageAccountsOperations.begin_delete": "Microsoft.DataBoxEdge.StorageAccounts.delete", + "azure.mgmt.databoxedge.operations.StorageAccountsOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.StorageAccounts.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.aio.operations.StorageAccountsOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.StorageAccounts.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.operations.ContainersOperations.get": "Microsoft.DataBoxEdge.Containers.get", + "azure.mgmt.databoxedge.aio.operations.ContainersOperations.get": "Microsoft.DataBoxEdge.Containers.get", + "azure.mgmt.databoxedge.operations.ContainersOperations.begin_create_or_update": "Microsoft.DataBoxEdge.Containers.createOrUpdate", + "azure.mgmt.databoxedge.aio.operations.ContainersOperations.begin_create_or_update": "Microsoft.DataBoxEdge.Containers.createOrUpdate", + "azure.mgmt.databoxedge.operations.ContainersOperations.begin_delete": "Microsoft.DataBoxEdge.Containers.delete", + "azure.mgmt.databoxedge.aio.operations.ContainersOperations.begin_delete": "Microsoft.DataBoxEdge.Containers.delete", + "azure.mgmt.databoxedge.operations.ContainersOperations.list_by_storage_account": "Microsoft.DataBoxEdge.Containers.listByStorageAccount", + "azure.mgmt.databoxedge.aio.operations.ContainersOperations.list_by_storage_account": "Microsoft.DataBoxEdge.Containers.listByStorageAccount", + "azure.mgmt.databoxedge.operations.ContainersOperations.begin_refresh": "Microsoft.DataBoxEdge.Containers.refresh", + "azure.mgmt.databoxedge.aio.operations.ContainersOperations.begin_refresh": "Microsoft.DataBoxEdge.Containers.refresh", + "azure.mgmt.databoxedge.operations.TriggersOperations.get": "Microsoft.DataBoxEdge.Triggers.get", + "azure.mgmt.databoxedge.aio.operations.TriggersOperations.get": "Microsoft.DataBoxEdge.Triggers.get", + "azure.mgmt.databoxedge.operations.TriggersOperations.begin_create_or_update": "Microsoft.DataBoxEdge.Triggers.createOrUpdate", + "azure.mgmt.databoxedge.aio.operations.TriggersOperations.begin_create_or_update": "Microsoft.DataBoxEdge.Triggers.createOrUpdate", + "azure.mgmt.databoxedge.operations.TriggersOperations.begin_delete": "Microsoft.DataBoxEdge.Triggers.delete", + "azure.mgmt.databoxedge.aio.operations.TriggersOperations.begin_delete": "Microsoft.DataBoxEdge.Triggers.delete", + "azure.mgmt.databoxedge.operations.TriggersOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.Triggers.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.aio.operations.TriggersOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.Triggers.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.operations.UsersOperations.get": "Microsoft.DataBoxEdge.Users.get", + "azure.mgmt.databoxedge.aio.operations.UsersOperations.get": "Microsoft.DataBoxEdge.Users.get", + "azure.mgmt.databoxedge.operations.UsersOperations.begin_create_or_update": "Microsoft.DataBoxEdge.Users.createOrUpdate", + "azure.mgmt.databoxedge.aio.operations.UsersOperations.begin_create_or_update": "Microsoft.DataBoxEdge.Users.createOrUpdate", + "azure.mgmt.databoxedge.operations.UsersOperations.begin_delete": "Microsoft.DataBoxEdge.Users.delete", + "azure.mgmt.databoxedge.aio.operations.UsersOperations.begin_delete": "Microsoft.DataBoxEdge.Users.delete", + "azure.mgmt.databoxedge.operations.UsersOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.Users.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.aio.operations.UsersOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.Users.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.operations.DeviceCapacityCheckOperations.begin_check_resource_creation_feasibility": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.checkResourceCreationFeasibility", + "azure.mgmt.databoxedge.aio.operations.DeviceCapacityCheckOperations.begin_check_resource_creation_feasibility": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.checkResourceCreationFeasibility", + "azure.mgmt.databoxedge.operations.NodesOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.aio.operations.NodesOperations.list_by_data_box_edge_device": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.listByDataBoxEdgeDevice", + "azure.mgmt.databoxedge.operations.SupportPackagesOperations.begin_trigger_support_package": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.triggerSupportPackage", + "azure.mgmt.databoxedge.aio.operations.SupportPackagesOperations.begin_trigger_support_package": "Microsoft.DataBoxEdge.DataBoxEdgeDevices.triggerSupportPackage", + "azure.mgmt.databoxedge.operations.DeviceCapacityInfoOperations.get_device_capacity_info": "Microsoft.DataBoxEdge.DeviceCapacityInfos.getDeviceCapacityInfo", + "azure.mgmt.databoxedge.aio.operations.DeviceCapacityInfoOperations.get_device_capacity_info": "Microsoft.DataBoxEdge.DeviceCapacityInfos.getDeviceCapacityInfo", + "azure.mgmt.databoxedge.operations.MonitoringConfigOperations.get": "Microsoft.DataBoxEdge.MonitoringMetricConfigurations.get", + "azure.mgmt.databoxedge.aio.operations.MonitoringConfigOperations.get": "Microsoft.DataBoxEdge.MonitoringMetricConfigurations.get", + "azure.mgmt.databoxedge.operations.MonitoringConfigOperations.begin_create_or_update": "Microsoft.DataBoxEdge.MonitoringMetricConfigurations.createOrUpdate", + "azure.mgmt.databoxedge.aio.operations.MonitoringConfigOperations.begin_create_or_update": "Microsoft.DataBoxEdge.MonitoringMetricConfigurations.createOrUpdate", + "azure.mgmt.databoxedge.operations.MonitoringConfigOperations.begin_delete": "Microsoft.DataBoxEdge.MonitoringMetricConfigurations.delete", + "azure.mgmt.databoxedge.aio.operations.MonitoringConfigOperations.begin_delete": "Microsoft.DataBoxEdge.MonitoringMetricConfigurations.delete", + "azure.mgmt.databoxedge.operations.MonitoringConfigOperations.list": "Microsoft.DataBoxEdge.MonitoringMetricConfigurations.list", + "azure.mgmt.databoxedge.aio.operations.MonitoringConfigOperations.list": "Microsoft.DataBoxEdge.MonitoringMetricConfigurations.list", + "azure.mgmt.databoxedge.operations.AvailableSkusOperations.list": "Microsoft.DataBoxEdge.AvailableSkusOperationGroup.list", + "azure.mgmt.databoxedge.aio.operations.AvailableSkusOperations.list": "Microsoft.DataBoxEdge.AvailableSkusOperationGroup.list" + } +} \ No newline at end of file diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/__init__.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/__init__.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/__init__.py index 0bedbc7bb26e..32fc7d08200a 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/__init__.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._data_box_edge_management_client import DataBoxEdgeManagementClient # type: ignore +from ._client import DataBoxEdgeManagementClient # type: ignore from ._version import VERSION __version__ = VERSION 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/_client.py similarity index 74% rename from sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_data_box_edge_management_client.py rename to sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_client.py index f486c2d73a49..cdaaee66b7c3 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/_client.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -17,7 +17,6 @@ from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy from azure.mgmt.core.tools import get_arm_endpoints -from . import models as _models from ._configuration import DataBoxEdgeManagementClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( @@ -26,7 +25,10 @@ AvailableSkusOperations, BandwidthSchedulesOperations, ContainersOperations, + DeviceCapacityCheckOperations, + DeviceCapacityInfoOperations, DevicesOperations, + DiagnosticSettingsOperations, JobsOperations, MonitoringConfigOperations, NodesOperations, @@ -37,41 +39,39 @@ SharesOperations, StorageAccountCredentialsOperations, StorageAccountsOperations, + SupportPackagesOperations, TriggersOperations, UsersOperations, ) if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials import TokenCredential class DataBoxEdgeManagementClient: # pylint: disable=too-many-instance-attributes """DataBoxEdgeManagementClient. - :ivar operations: Operations operations - :vartype operations: azure.mgmt.databoxedge.operations.Operations - :ivar available_skus: AvailableSkusOperations operations - :vartype available_skus: azure.mgmt.databoxedge.operations.AvailableSkusOperations + :ivar operations_status: OperationsStatusOperations operations + :vartype operations_status: azure.mgmt.databoxedge.operations.OperationsStatusOperations :ivar devices: DevicesOperations operations :vartype devices: azure.mgmt.databoxedge.operations.DevicesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databoxedge.operations.Operations :ivar alerts: AlertsOperations operations :vartype alerts: azure.mgmt.databoxedge.operations.AlertsOperations :ivar bandwidth_schedules: BandwidthSchedulesOperations operations :vartype bandwidth_schedules: azure.mgmt.databoxedge.operations.BandwidthSchedulesOperations + :ivar diagnostic_settings: DiagnosticSettingsOperations operations + :vartype diagnostic_settings: azure.mgmt.databoxedge.operations.DiagnosticSettingsOperations :ivar jobs: JobsOperations operations :vartype jobs: azure.mgmt.databoxedge.operations.JobsOperations - :ivar nodes: NodesOperations operations - :vartype nodes: azure.mgmt.databoxedge.operations.NodesOperations - :ivar operations_status: OperationsStatusOperations operations - :vartype operations_status: azure.mgmt.databoxedge.operations.OperationsStatusOperations :ivar orders: OrdersOperations operations :vartype orders: azure.mgmt.databoxedge.operations.OrdersOperations :ivar roles: RolesOperations operations :vartype roles: azure.mgmt.databoxedge.operations.RolesOperations :ivar addons: AddonsOperations operations :vartype addons: azure.mgmt.databoxedge.operations.AddonsOperations - :ivar monitoring_config: MonitoringConfigOperations operations - :vartype monitoring_config: azure.mgmt.databoxedge.operations.MonitoringConfigOperations :ivar shares: SharesOperations operations :vartype shares: azure.mgmt.databoxedge.operations.SharesOperations :ivar storage_account_credentials: StorageAccountCredentialsOperations operations @@ -85,29 +85,56 @@ class DataBoxEdgeManagementClient: # pylint: disable=too-many-instance-attribut :vartype triggers: azure.mgmt.databoxedge.operations.TriggersOperations :ivar users: UsersOperations operations :vartype users: azure.mgmt.databoxedge.operations.UsersOperations - :param credential: Credential needed for the client to connect to Azure. Required. + :ivar device_capacity_check: DeviceCapacityCheckOperations operations + :vartype device_capacity_check: azure.mgmt.databoxedge.operations.DeviceCapacityCheckOperations + :ivar nodes: NodesOperations operations + :vartype nodes: azure.mgmt.databoxedge.operations.NodesOperations + :ivar support_packages: SupportPackagesOperations operations + :vartype support_packages: azure.mgmt.databoxedge.operations.SupportPackagesOperations + :ivar device_capacity_info: DeviceCapacityInfoOperations operations + :vartype device_capacity_info: azure.mgmt.databoxedge.operations.DeviceCapacityInfoOperations + :ivar monitoring_config: MonitoringConfigOperations operations + :vartype monitoring_config: azure.mgmt.databoxedge.operations.MonitoringConfigOperations + :ivar available_skus: AvailableSkusOperations operations + :vartype available_skus: azure.mgmt.databoxedge.operations.AvailableSkusOperations + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The subscription ID. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is None. + :param base_url: Service host. Default value is None. :type base_url: str - :keyword api_version: Api Version. Default value is "2021-02-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds + :keyword api_version: The API version to use for this operation. Default value is "2023-12-01". + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( - self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any + self, + credential: "TokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any ) -> None: - _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoint = "{endpoint}" + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: base_url = _endpoints["resource_manager"] credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = DataBoxEdgeManagementClientConfiguration( - credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + cloud_setting=cloud_setting, + credential_scopes=credential_scopes, + **kwargs ) _policies = kwargs.pop("policies", None) @@ -128,30 +155,27 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs) - client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.available_skus = AvailableSkusOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations_status = OperationsStatusOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.devices = DevicesOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(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.diagnostic_settings = DiagnosticSettingsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.jobs = JobsOperations(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 @@ -162,14 +186,28 @@ def __init__( 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) + self.device_capacity_check = DeviceCapacityCheckOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nodes = NodesOperations(self._client, self._config, self._serialize, self._deserialize) + self.support_packages = SupportPackagesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.device_capacity_info = DeviceCapacityInfoOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.monitoring_config = MonitoringConfigOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.available_skus = AvailableSkusOperations(self._client, self._config, self._serialize, self._deserialize) - def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: + def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") - >>> response = client._send_request(request) + >>> response = client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request @@ -182,7 +220,11 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: """ request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore def close(self) -> None: diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_configuration.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_configuration.py index 57e36b7f5023..f377e385bb39 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_configuration.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_configuration.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy @@ -14,6 +14,7 @@ from ._version import VERSION if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials import TokenCredential @@ -23,17 +24,29 @@ class DataBoxEdgeManagementClientConfiguration: # pylint: disable=too-many-inst Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The subscription ID. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2021-02-01-preview". Note that overriding - this default value may result in unsupported behavior. + :param base_url: Service host. Default value is "https://management.azure.com". + :type base_url: str + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds + :keyword api_version: The API version to use for this operation. Default value is "2023-12-01". + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2021-02-01-preview") + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any + ) -> None: + api_version: str = kwargs.pop("api_version", "2023-12-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -42,6 +55,8 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs self.credential = credential self.subscription_id = subscription_id + self.base_url = base_url + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-databoxedge/{}".format(VERSION)) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_patch.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_patch.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_utils/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_utils/__init__.py index 0af9b28f6607..8026245c2abc 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_utils/__init__.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_utils/__init__.py @@ -1,6 +1,6 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_utils/model_base.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_utils/model_base.py new file mode 100644 index 000000000000..12926fa98dcf --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_utils/model_base.py @@ -0,0 +1,1237 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=protected-access, broad-except + +import copy +import calendar +import decimal +import functools +import sys +import logging +import base64 +import re +import typing +import enum +import email.utils +from datetime import datetime, date, time, timedelta, timezone +from json import JSONEncoder +import xml.etree.ElementTree as ET +from collections.abc import MutableMapping +from typing_extensions import Self +import isodate +from azure.core.exceptions import DeserializationError +from azure.core import CaseInsensitiveEnumMeta +from azure.core.pipeline import PipelineResponse +from azure.core.serialization import _Null +from azure.core.rest import HttpResponse + +_LOGGER = logging.getLogger(__name__) + +__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] + +TZ_UTC = timezone.utc +_T = typing.TypeVar("_T") + + +def _timedelta_as_isostr(td: timedelta) -> str: + """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' + + Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython + + :param timedelta td: The timedelta to convert + :rtype: str + :return: ISO8601 version of this timedelta + """ + + # Split seconds to larger units + seconds = td.total_seconds() + minutes, seconds = divmod(seconds, 60) + hours, minutes = divmod(minutes, 60) + days, hours = divmod(hours, 24) + + days, hours, minutes = list(map(int, (days, hours, minutes))) + seconds = round(seconds, 6) + + # Build date + date_str = "" + if days: + date_str = "%sD" % days + + if hours or minutes or seconds: + # Build time + time_str = "T" + + # Hours + bigger_exists = date_str or hours + if bigger_exists: + time_str += "{:02}H".format(hours) + + # Minutes + bigger_exists = bigger_exists or minutes + if bigger_exists: + time_str += "{:02}M".format(minutes) + + # Seconds + try: + if seconds.is_integer(): + seconds_string = "{:02}".format(int(seconds)) + else: + # 9 chars long w/ leading 0, 6 digits after decimal + seconds_string = "%09.6f" % seconds + # Remove trailing zeros + seconds_string = seconds_string.rstrip("0") + except AttributeError: # int.is_integer() raises + seconds_string = "{:02}".format(seconds) + + time_str += "{}S".format(seconds_string) + else: + time_str = "" + + return "P" + date_str + time_str + + +def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: + encoded = base64.b64encode(o).decode() + if format == "base64url": + return encoded.strip("=").replace("+", "-").replace("/", "_") + return encoded + + +def _serialize_datetime(o, format: typing.Optional[str] = None): + if hasattr(o, "year") and hasattr(o, "hour"): + if format == "rfc7231": + return email.utils.format_datetime(o, usegmt=True) + if format == "unix-timestamp": + return int(calendar.timegm(o.utctimetuple())) + + # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) + if not o.tzinfo: + iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = o.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + return o.isoformat() + + +def _is_readonly(p): + try: + return p._visibility == ["read"] + except AttributeError: + return False + + +class SdkJSONEncoder(JSONEncoder): + """A JSON encoder that's capable of serializing datetime objects and bytes.""" + + def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs): + super().__init__(*args, **kwargs) + self.exclude_readonly = exclude_readonly + self.format = format + + def default(self, o): # pylint: disable=too-many-return-statements + if _is_model(o): + if self.exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + return {k: v for k, v in o.items() if k not in readonly_props} + return dict(o.items()) + try: + return super(SdkJSONEncoder, self).default(o) + except TypeError: + if isinstance(o, _Null): + return None + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, self.format) + try: + # First try datetime.datetime + return _serialize_datetime(o, self.format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return super(SdkJSONEncoder, self).default(o) + + +_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") +_VALID_RFC7231 = re.compile( + r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s" + r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" +) + + +def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + attr = attr.upper() + match = _VALID_DATE.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + return date_obj + + +def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize RFC7231 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + match = _VALID_RFC7231.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + return email.utils.parsedate_to_datetime(attr) + + +def _deserialize_datetime_unix_timestamp(attr: typing.Union[float, datetime]) -> datetime: + """Deserialize unix timestamp into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + return datetime.fromtimestamp(attr, TZ_UTC) + + +def _deserialize_date(attr: typing.Union[str, date]) -> date: + """Deserialize ISO-8601 formatted string into Date object. + :param str attr: response string to be deserialized. + :rtype: date + :returns: The date object from that input + """ + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + if isinstance(attr, date): + return attr + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) # type: ignore + + +def _deserialize_time(attr: typing.Union[str, time]) -> time: + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :returns: The time object from that input + """ + if isinstance(attr, time): + return attr + return isodate.parse_time(attr) + + +def _deserialize_bytes(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + return bytes(base64.b64decode(attr)) + + +def _deserialize_bytes_base64(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return bytes(base64.b64decode(encoded)) + + +def _deserialize_duration(attr): + if isinstance(attr, timedelta): + return attr + return isodate.parse_duration(attr) + + +def _deserialize_decimal(attr): + if isinstance(attr, decimal.Decimal): + return attr + return decimal.Decimal(str(attr)) + + +def _deserialize_int_as_str(attr): + if isinstance(attr, int): + return attr + return int(attr) + + +_DESERIALIZE_MAPPING = { + datetime: _deserialize_datetime, + date: _deserialize_date, + time: _deserialize_time, + bytes: _deserialize_bytes, + bytearray: _deserialize_bytes, + timedelta: _deserialize_duration, + typing.Any: lambda x: x, + decimal.Decimal: _deserialize_decimal, +} + +_DESERIALIZE_MAPPING_WITHFORMAT = { + "rfc3339": _deserialize_datetime, + "rfc7231": _deserialize_datetime_rfc7231, + "unix-timestamp": _deserialize_datetime_unix_timestamp, + "base64": _deserialize_bytes, + "base64url": _deserialize_bytes_base64, +} + + +def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None): + if annotation is int and rf and rf._format == "str": + return _deserialize_int_as_str + if rf and rf._format: + return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) + return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore + + +def _get_type_alias_type(module_name: str, alias_name: str): + types = { + k: v + for k, v in sys.modules[module_name].__dict__.items() + if isinstance(v, typing._GenericAlias) # type: ignore + } + if alias_name not in types: + return alias_name + return types[alias_name] + + +def _get_model(module_name: str, model_name: str): + models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} + module_end = module_name.rsplit(".", 1)[0] + models.update({k: v for k, v in sys.modules[module_end].__dict__.items() if isinstance(v, type)}) + if isinstance(model_name, str): + model_name = model_name.split(".")[-1] + if model_name not in models: + return model_name + return models[model_name] + + +_UNSET = object() + + +class _MyMutableMapping(MutableMapping[str, typing.Any]): + def __init__(self, data: dict[str, typing.Any]) -> None: + self._data = data + + def __contains__(self, key: typing.Any) -> bool: + return key in self._data + + def __getitem__(self, key: str) -> typing.Any: + return self._data.__getitem__(key) + + def __setitem__(self, key: str, value: typing.Any) -> None: + self._data.__setitem__(key, value) + + def __delitem__(self, key: str) -> None: + self._data.__delitem__(key) + + def __iter__(self) -> typing.Iterator[typing.Any]: + return self._data.__iter__() + + def __len__(self) -> int: + return self._data.__len__() + + def __ne__(self, other: typing.Any) -> bool: + return not self.__eq__(other) + + def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ + return self._data.keys() + + def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ + return self._data.values() + + def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ + return self._data.items() + + def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ + try: + return self[key] + except KeyError: + return default + + @typing.overload + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ + + @typing.overload + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs + + @typing.overload + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ + if default is _UNSET: + return self._data.pop(key) + return self._data.pop(key, default) + + def popitem(self) -> tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ + return self._data.popitem() + + def clear(self) -> None: + """ + Remove all items from D. + """ + self._data.clear() + + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ + self._data.update(*args, **kwargs) + + @typing.overload + def setdefault(self, key: str, default: None = None) -> None: ... + + @typing.overload + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ + if default is _UNSET: + return self._data.setdefault(key) + return self._data.setdefault(key, default) + + def __eq__(self, other: typing.Any) -> bool: + try: + other_model = self.__class__(other) + except Exception: + return False + return self._data == other_model._data + + def __repr__(self) -> str: + return str(self._data) + + +def _is_model(obj: typing.Any) -> bool: + return getattr(obj, "_is_model", False) + + +def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements + if isinstance(o, list): + return [_serialize(x, format) for x in o] + if isinstance(o, dict): + return {k: _serialize(v, format) for k, v in o.items()} + if isinstance(o, set): + return {_serialize(x, format) for x in o} + if isinstance(o, tuple): + return tuple(_serialize(x, format) for x in o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, format) + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, enum.Enum): + return o.value + if isinstance(o, int): + if format == "str": + return str(o) + return o + try: + # First try datetime.datetime + return _serialize_datetime(o, format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return o + + +def _get_rest_field(attr_to_rest_field: dict[str, "_RestField"], rest_name: str) -> typing.Optional["_RestField"]: + try: + return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) + except StopIteration: + return None + + +def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: + if not rf: + return _serialize(value, None) + if rf._is_multipart_file_input: + return value + if rf._is_model: + return _deserialize(rf._type, value) + if isinstance(value, ET.Element): + value = _deserialize(rf._type, value) + return _serialize(value, rf._format) + + +class Model(_MyMutableMapping): + _is_model = True + # label whether current class's _attr_to_rest_field has been calculated + # could not see _attr_to_rest_field directly because subclass inherits it from parent class + _calculated: set[str] = set() + + def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: + class_name = self.__class__.__name__ + if len(args) > 1: + raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") + dict_to_pass = { + rest_field._rest_name: rest_field._default + for rest_field in self._attr_to_rest_field.values() + if rest_field._default is not _UNSET + } + if args: # pylint: disable=too-many-nested-blocks + if isinstance(args[0], ET.Element): + existed_attr_keys = [] + model_meta = getattr(self, "_xml", {}) + + for rf in self._attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + # attribute + if prop_meta.get("attribute", False) and args[0].get(xml_name) is not None: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].get(xml_name)) + continue + + # unwrapped element is array + if prop_meta.get("unwrapped", False): + # unwrapped array could either use prop items meta/prop meta + if prop_meta.get("itemsName"): + xml_name = prop_meta.get("itemsName") + xml_ns = prop_meta.get("itemNs") + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + items = args[0].findall(xml_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, items) + continue + + # text element is primitive type + if prop_meta.get("text", False): + if args[0].text is not None: + dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].text) + continue + + # wrapped element could be normal property or array, it should only have one element + item = args[0].find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, item) + + # rest thing is additional properties + for e in args[0]: + if e.tag not in existed_attr_keys: + dict_to_pass[e.tag] = _convert_element(e) + else: + dict_to_pass.update( + {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} + ) + else: + non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] + if non_attr_kwargs: + # actual type errors only throw the first wrong keyword arg they see, so following that. + raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") + dict_to_pass.update( + { + self._attr_to_rest_field[k]._rest_name: _create_value(self._attr_to_rest_field[k], v) + for k, v in kwargs.items() + if v is not None + } + ) + super().__init__(dict_to_pass) + + def copy(self) -> "Model": + return Model(self.__dict__) + + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: + if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: + # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', + # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' + mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order + attr_to_rest_field: dict[str, _RestField] = { # map attribute name to rest_field property + k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") + } + annotations = { + k: v + for mro_class in mros + if hasattr(mro_class, "__annotations__") + for k, v in mro_class.__annotations__.items() + } + for attr, rf in attr_to_rest_field.items(): + rf._module = cls.__module__ + if not rf._type: + rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) + if not rf._rest_name_input: + rf._rest_name_input = attr + cls._attr_to_rest_field: dict[str, _RestField] = dict(attr_to_rest_field.items()) + cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") + + return super().__new__(cls) + + def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: + for base in cls.__bases__: + if hasattr(base, "__mapping__"): + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore + + @classmethod + def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: + for v in cls.__dict__.values(): + if isinstance(v, _RestField) and v._is_discriminator and v._rest_name not in exist_discriminators: + return v + return None + + @classmethod + def _deserialize(cls, data, exist_discriminators): + if not hasattr(cls, "__mapping__"): + return cls(data) + discriminator = cls._get_discriminator(exist_discriminators) + if discriminator is None: + return cls(data) + exist_discriminators.append(discriminator._rest_name) + if isinstance(data, ET.Element): + model_meta = getattr(cls, "_xml", {}) + prop_meta = getattr(discriminator, "_xml", {}) + xml_name = prop_meta.get("name", discriminator._rest_name) + xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + if data.get(xml_name) is not None: + discriminator_value = data.get(xml_name) + else: + discriminator_value = data.find(xml_name).text # pyright: ignore + else: + discriminator_value = data.get(discriminator._rest_name) + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member + return mapped_cls._deserialize(data, exist_discriminators) + + def as_dict(self, *, exclude_readonly: bool = False) -> dict[str, typing.Any]: + """Return a dict that can be turned into json using json.dump. + + :keyword bool exclude_readonly: Whether to remove the readonly properties. + :returns: A dict JSON compatible object + :rtype: dict + """ + + result = {} + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)] + for k, v in self.items(): + if exclude_readonly and k in readonly_props: # pyright: ignore + continue + is_multipart_file_input = False + try: + is_multipart_file_input = next( + rf for rf in self._attr_to_rest_field.values() if rf._rest_name == k + )._is_multipart_file_input + except StopIteration: + pass + result[k] = v if is_multipart_file_input else Model._as_dict_value(v, exclude_readonly=exclude_readonly) + return result + + @staticmethod + def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any: + if v is None or isinstance(v, _Null): + return None + if isinstance(v, (list, tuple, set)): + return type(v)(Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v) + if isinstance(v, dict): + return {dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) for dk, dv in v.items()} + return v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v + + +def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): + if _is_model(obj): + return obj + return _deserialize(model_deserializer, obj) + + +def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): + if obj is None: + return obj + return _deserialize_with_callable(if_obj_deserializer, obj) + + +def _deserialize_with_union(deserializers, obj): + for deserializer in deserializers: + try: + return _deserialize(deserializer, obj) + except DeserializationError: + pass + raise DeserializationError() + + +def _deserialize_dict( + value_deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj: dict[typing.Any, typing.Any], +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = {child.tag: child for child in obj} + return {k: _deserialize(value_deserializer, v, module) for k, v in obj.items()} + + +def _deserialize_multiple_sequence( + entry_deserializers: list[typing.Optional[typing.Callable]], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) + + +def _deserialize_sequence( + deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = list(obj) + return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) + + +def _sorted_annotations(types: list[typing.Any]) -> list[typing.Any]: + return sorted( + types, + key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), + ) + + +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-statements, too-many-branches + annotation: typing.Any, + module: typing.Optional[str], + rf: typing.Optional["_RestField"] = None, +) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + if not annotation: + return None + + # is it a type alias? + if isinstance(annotation, str): + if module is not None: + annotation = _get_type_alias_type(module, annotation) + + # is it a forward ref / in quotes? + if isinstance(annotation, (str, typing.ForwardRef)): + try: + model_name = annotation.__forward_arg__ # type: ignore + except AttributeError: + model_name = annotation + if module is not None: + annotation = _get_model(module, model_name) # type: ignore + + try: + if module and _is_model(annotation): + if rf: + rf._is_model = True + + return functools.partial(_deserialize_model, annotation) # pyright: ignore + except Exception: + pass + + # is it a literal? + try: + if annotation.__origin__ is typing.Literal: # pyright: ignore + return None + except AttributeError: + pass + + # is it optional? + try: + if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore + if len(annotation.__args__) <= 2: # pyright: ignore + if_obj_deserializer = _get_deserialize_callable_from_annotation( + next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_with_optional, if_obj_deserializer) + # the type is Optional[Union[...]], we need to remove the None type from the Union + annotation_copy = copy.copy(annotation) + annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore + return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) + except AttributeError: + pass + + # is it union? + if getattr(annotation, "__origin__", None) is typing.Union: + # initial ordering is we make `string` the last deserialization option, because it is often them most generic + deserializers = [ + _get_deserialize_callable_from_annotation(arg, module, rf) + for arg in _sorted_annotations(annotation.__args__) # pyright: ignore + ] + + return functools.partial(_deserialize_with_union, deserializers) + + try: + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() == "dict": + value_deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[1], module, rf # pyright: ignore + ) + + return functools.partial( + _deserialize_dict, + value_deserializer, + module, + ) + except (AttributeError, IndexError): + pass + try: + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() in ["list", "set", "tuple", "sequence"]: + if len(annotation.__args__) > 1: # pyright: ignore + entry_deserializers = [ + _get_deserialize_callable_from_annotation(dt, module, rf) + for dt in annotation.__args__ # pyright: ignore + ] + return functools.partial(_deserialize_multiple_sequence, entry_deserializers, module) + deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[0], module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_sequence, deserializer, module) + except (TypeError, IndexError, AttributeError, SyntaxError): + pass + + def _deserialize_default( + deserializer, + obj, + ): + if obj is None: + return obj + try: + return _deserialize_with_callable(deserializer, obj) + except Exception: + pass + return obj + + if get_deserializer(annotation, rf): + return functools.partial(_deserialize_default, get_deserializer(annotation, rf)) + + return functools.partial(_deserialize_default, annotation) + + +def _deserialize_with_callable( + deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], + value: typing.Any, +): # pylint: disable=too-many-return-statements + try: + if value is None or isinstance(value, _Null): + return None + if isinstance(value, ET.Element): + if deserializer is str: + return value.text or "" + if deserializer is int: + return int(value.text) if value.text else None + if deserializer is float: + return float(value.text) if value.text else None + if deserializer is bool: + return value.text == "true" if value.text else None + if deserializer is None: + return value + if deserializer in [int, float, bool]: + return deserializer(value) + if isinstance(deserializer, CaseInsensitiveEnumMeta): + try: + return deserializer(value) + except ValueError: + # for unknown value, return raw value + return value + if isinstance(deserializer, type) and issubclass(deserializer, Model): + return deserializer._deserialize(value, []) + return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) + except Exception as e: + raise DeserializationError() from e + + +def _deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + if isinstance(value, PipelineResponse): + value = value.http_response.json() + if rf is None and format: + rf = _RestField(format=format) + if not isinstance(deserializer, functools.partial): + deserializer = _get_deserialize_callable_from_annotation(deserializer, module, rf) + return _deserialize_with_callable(deserializer, value) + + +def _failsafe_deserialize( + deserializer: typing.Any, + response: HttpResponse, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + try: + return _deserialize(deserializer, response.json(), module, rf, format) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +def _failsafe_deserialize_xml( + deserializer: typing.Any, + response: HttpResponse, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, response.text()) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +class _RestField: + def __init__( + self, + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + is_discriminator: bool = False, + visibility: typing.Optional[list[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[dict[str, typing.Any]] = None, + ): + self._type = type + self._rest_name_input = name + self._module: typing.Optional[str] = None + self._is_discriminator = is_discriminator + self._visibility = visibility + self._is_model = False + self._default = default + self._format = format + self._is_multipart_file_input = is_multipart_file_input + self._xml = xml if xml is not None else {} + + @property + def _class_type(self) -> typing.Any: + return getattr(self._type, "args", [None])[0] + + @property + def _rest_name(self) -> str: + if self._rest_name_input is None: + raise ValueError("Rest name was never set") + return self._rest_name_input + + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + # by this point, type and rest_name will have a value bc we default + # them in __new__ of the Model class + item = obj.get(self._rest_name) + if item is None: + return item + if self._is_model: + return item + return _deserialize(self._type, _serialize(item, self._format), rf=self) + + def __set__(self, obj: Model, value) -> None: + if value is None: + # we want to wipe out entries if users set attr to None + try: + obj.__delitem__(self._rest_name) + except KeyError: + pass + return + if self._is_model: + if not _is_model(value): + value = _deserialize(self._type, value) + obj.__setitem__(self._rest_name, value) + return + obj.__setitem__(self._rest_name, _serialize(value, self._format)) + + def _get_deserialize_callable_from_annotation( + self, annotation: typing.Any + ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + return _get_deserialize_callable_from_annotation(annotation, self._module, self) + + +def rest_field( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[list[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField( + name=name, + type=type, + visibility=visibility, + default=default, + format=format, + is_multipart_file_input=is_multipart_file_input, + xml=xml, + ) + + +def rest_discriminator( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[list[str]] = None, + xml: typing.Optional[dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) + + +def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: + """Serialize a model to XML. + + :param Model model: The model to serialize. + :param bool exclude_readonly: Whether to exclude readonly properties. + :returns: The XML representation of the model. + :rtype: str + """ + return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore + + +def _get_element( + o: typing.Any, + exclude_readonly: bool = False, + parent_meta: typing.Optional[dict[str, typing.Any]] = None, + wrapped_element: typing.Optional[ET.Element] = None, +) -> typing.Union[ET.Element, list[ET.Element]]: + if _is_model(o): + model_meta = getattr(o, "_xml", {}) + + # if prop is a model, then use the prop element directly, else generate a wrapper of model + if wrapped_element is None: + wrapped_element = _create_xml_element( + model_meta.get("name", o.__class__.__name__), + model_meta.get("prefix"), + model_meta.get("ns"), + ) + + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + + for k, v in o.items(): + # do not serialize readonly properties + if exclude_readonly and k in readonly_props: + continue + + prop_rest_field = _get_rest_field(o._attr_to_rest_field, k) + if prop_rest_field: + prop_meta = getattr(prop_rest_field, "_xml").copy() + # use the wire name as xml name if no specific name is set + if prop_meta.get("name") is None: + prop_meta["name"] = k + else: + # additional properties will not have rest field, use the wire name as xml name + prop_meta = {"name": k} + + # if no ns for prop, use model's + if prop_meta.get("ns") is None and model_meta.get("ns"): + prop_meta["ns"] = model_meta.get("ns") + prop_meta["prefix"] = model_meta.get("prefix") + + if prop_meta.get("unwrapped", False): + # unwrapped could only set on array + wrapped_element.extend(_get_element(v, exclude_readonly, prop_meta)) + elif prop_meta.get("text", False): + # text could only set on primitive type + wrapped_element.text = _get_primitive_type_value(v) + elif prop_meta.get("attribute", False): + xml_name = prop_meta.get("name", k) + if prop_meta.get("ns"): + ET.register_namespace(prop_meta.get("prefix"), prop_meta.get("ns")) # pyright: ignore + xml_name = "{" + prop_meta.get("ns") + "}" + xml_name # pyright: ignore + # attribute should be primitive type + wrapped_element.set(xml_name, _get_primitive_type_value(v)) + else: + # other wrapped prop element + wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) + return wrapped_element + if isinstance(o, list): + return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore + if isinstance(o, dict): + result = [] + for k, v in o.items(): + result.append( + _get_wrapped_element( + v, + exclude_readonly, + { + "name": k, + "ns": parent_meta.get("ns") if parent_meta else None, + "prefix": parent_meta.get("prefix") if parent_meta else None, + }, + ) + ) + return result + + # primitive case need to create element based on parent_meta + if parent_meta: + return _get_wrapped_element( + o, + exclude_readonly, + { + "name": parent_meta.get("itemsName", parent_meta.get("name")), + "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), + "ns": parent_meta.get("itemsNs", parent_meta.get("ns")), + }, + ) + + raise ValueError("Could not serialize value into xml: " + o) + + +def _get_wrapped_element( + v: typing.Any, + exclude_readonly: bool, + meta: typing.Optional[dict[str, typing.Any]], +) -> ET.Element: + wrapped_element = _create_xml_element( + meta.get("name") if meta else None, meta.get("prefix") if meta else None, meta.get("ns") if meta else None + ) + if isinstance(v, (dict, list)): + wrapped_element.extend(_get_element(v, exclude_readonly, meta)) + elif _is_model(v): + _get_element(v, exclude_readonly, meta, wrapped_element) + else: + wrapped_element.text = _get_primitive_type_value(v) + return wrapped_element + + +def _get_primitive_type_value(v) -> str: + if v is True: + return "true" + if v is False: + return "false" + if isinstance(v, _Null): + return "" + return str(v) + + +def _create_xml_element(tag, prefix=None, ns=None): + if prefix and ns: + ET.register_namespace(prefix, ns) + if ns: + return ET.Element("{" + ns + "}" + tag) + return ET.Element(tag) + + +def _deserialize_xml( + deserializer: typing.Any, + value: str, +) -> typing.Any: + element = ET.fromstring(value) # nosec + return _deserialize(deserializer, element) + + +def _convert_element(e: ET.Element): + # dict case + if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: + dict_result: dict[str, typing.Any] = {} + for child in e: + if dict_result.get(child.tag) is not None: + if isinstance(dict_result[child.tag], list): + dict_result[child.tag].append(_convert_element(child)) + else: + dict_result[child.tag] = [dict_result[child.tag], _convert_element(child)] + else: + dict_result[child.tag] = _convert_element(child) + dict_result.update(e.attrib) + return dict_result + # array case + if len(e) > 0: + array_result: list[typing.Any] = [] + for child in e: + array_result.append(_convert_element(child)) + return array_result + # primitive case + return e.text diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_utils/serialization.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_utils/serialization.py index f5187701d7be..45a3e44e45cb 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_utils/serialization.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_utils/serialization.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -21,7 +21,6 @@ import sys import codecs from typing import ( - Dict, Any, cast, Optional, @@ -31,7 +30,6 @@ Mapping, Callable, MutableMapping, - List, ) try: @@ -229,12 +227,12 @@ class Model: serialization and deserialization. """ - _subtype_map: Dict[str, Dict[str, Any]] = {} - _attribute_map: Dict[str, Dict[str, Any]] = {} - _validation: Dict[str, Dict[str, Any]] = {} + _subtype_map: dict[str, dict[str, Any]] = {} + _attribute_map: dict[str, dict[str, Any]] = {} + _validation: dict[str, dict[str, Any]] = {} def __init__(self, **kwargs: Any) -> None: - self.additional_properties: Optional[Dict[str, Any]] = {} + self.additional_properties: Optional[dict[str, Any]] = {} for k in kwargs: # pylint: disable=consider-using-dict-items if k not in self._attribute_map: _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) @@ -311,7 +309,7 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: def as_dict( self, keep_readonly: bool = True, - key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer, **kwargs: Any ) -> JSON: """Return a dict that can be serialized using json.dump. @@ -380,7 +378,7 @@ def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: def from_dict( cls, data: Any, - key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, ) -> Self: """Parse a dict using given key extractor return a model. @@ -414,7 +412,7 @@ def _flatten_subtype(cls, key, objects): return {} result = dict(cls._subtype_map[key]) for valuetype in cls._subtype_map[key].values(): - result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access + result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access return result @classmethod @@ -528,7 +526,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: "[]": self.serialize_iter, "{}": self.serialize_dict, } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer self.client_side_validation = True @@ -579,7 +577,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to if attr_name == "additional_properties" and attr_desc["key"] == "": if target_obj.additional_properties is not None: - serialized.update(target_obj.additional_properties) + serialized |= target_obj.additional_properties continue try: @@ -789,7 +787,7 @@ def serialize_data(self, data, data_type, **kwargs): # If dependencies is empty, try with current data class # It has to be a subclass of Enum anyway - enum_type = self.dependencies.get(data_type, data.__class__) + enum_type = self.dependencies.get(data_type, cast(type, data.__class__)) if issubclass(enum_type, Enum): return Serializer.serialize_enum(data, enum_obj=enum_type) @@ -1184,7 +1182,7 @@ def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argumen while "." in key: # Need the cast, as for some reasons "split" is typed as list[str | Any] - dict_keys = cast(List[str], _FLATTEN.split(key)) + dict_keys = cast(list[str], _FLATTEN.split(key)) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) break @@ -1386,7 +1384,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: "duration": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_version.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_version.py index 3dd4685104d4..be71c81bd282 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_version.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/_version.py @@ -1,8 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.0.0b1" +VERSION = "1.0.0b1" diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/__init__.py index c86847aa9e87..4e7eb07f3351 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/__init__.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._data_box_edge_management_client import DataBoxEdgeManagementClient # type: ignore +from ._client import DataBoxEdgeManagementClient # type: ignore try: from ._patch import __all__ as _patch_all diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_data_box_edge_management_client.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_client.py similarity index 74% rename from sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_data_box_edge_management_client.py rename to sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_client.py index 52e89580c6cf..84340bb40501 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_data_box_edge_management_client.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_client.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -17,7 +17,6 @@ from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy from azure.mgmt.core.tools import get_arm_endpoints -from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import DataBoxEdgeManagementClientConfiguration from .operations import ( @@ -26,7 +25,10 @@ AvailableSkusOperations, BandwidthSchedulesOperations, ContainersOperations, + DeviceCapacityCheckOperations, + DeviceCapacityInfoOperations, DevicesOperations, + DiagnosticSettingsOperations, JobsOperations, MonitoringConfigOperations, NodesOperations, @@ -37,42 +39,41 @@ SharesOperations, StorageAccountCredentialsOperations, StorageAccountsOperations, + SupportPackagesOperations, TriggersOperations, UsersOperations, ) if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential class DataBoxEdgeManagementClient: # pylint: disable=too-many-instance-attributes """DataBoxEdgeManagementClient. - :ivar operations: Operations operations - :vartype operations: azure.mgmt.databoxedge.aio.operations.Operations - :ivar available_skus: AvailableSkusOperations operations - :vartype available_skus: azure.mgmt.databoxedge.aio.operations.AvailableSkusOperations + :ivar operations_status: OperationsStatusOperations operations + :vartype operations_status: azure.mgmt.databoxedge.aio.operations.OperationsStatusOperations :ivar devices: DevicesOperations operations :vartype devices: azure.mgmt.databoxedge.aio.operations.DevicesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.databoxedge.aio.operations.Operations :ivar alerts: AlertsOperations operations :vartype alerts: azure.mgmt.databoxedge.aio.operations.AlertsOperations :ivar bandwidth_schedules: BandwidthSchedulesOperations operations :vartype bandwidth_schedules: azure.mgmt.databoxedge.aio.operations.BandwidthSchedulesOperations + :ivar diagnostic_settings: DiagnosticSettingsOperations operations + :vartype diagnostic_settings: + azure.mgmt.databoxedge.aio.operations.DiagnosticSettingsOperations :ivar jobs: JobsOperations operations :vartype jobs: azure.mgmt.databoxedge.aio.operations.JobsOperations - :ivar nodes: NodesOperations operations - :vartype nodes: azure.mgmt.databoxedge.aio.operations.NodesOperations - :ivar operations_status: OperationsStatusOperations operations - :vartype operations_status: azure.mgmt.databoxedge.aio.operations.OperationsStatusOperations :ivar orders: OrdersOperations operations :vartype orders: azure.mgmt.databoxedge.aio.operations.OrdersOperations :ivar roles: RolesOperations operations :vartype roles: azure.mgmt.databoxedge.aio.operations.RolesOperations :ivar addons: AddonsOperations operations :vartype addons: azure.mgmt.databoxedge.aio.operations.AddonsOperations - :ivar monitoring_config: MonitoringConfigOperations operations - :vartype monitoring_config: azure.mgmt.databoxedge.aio.operations.MonitoringConfigOperations :ivar shares: SharesOperations operations :vartype shares: azure.mgmt.databoxedge.aio.operations.SharesOperations :ivar storage_account_credentials: StorageAccountCredentialsOperations operations @@ -86,29 +87,58 @@ class DataBoxEdgeManagementClient: # pylint: disable=too-many-instance-attribut :vartype triggers: azure.mgmt.databoxedge.aio.operations.TriggersOperations :ivar users: UsersOperations operations :vartype users: azure.mgmt.databoxedge.aio.operations.UsersOperations - :param credential: Credential needed for the client to connect to Azure. Required. + :ivar device_capacity_check: DeviceCapacityCheckOperations operations + :vartype device_capacity_check: + azure.mgmt.databoxedge.aio.operations.DeviceCapacityCheckOperations + :ivar nodes: NodesOperations operations + :vartype nodes: azure.mgmt.databoxedge.aio.operations.NodesOperations + :ivar support_packages: SupportPackagesOperations operations + :vartype support_packages: azure.mgmt.databoxedge.aio.operations.SupportPackagesOperations + :ivar device_capacity_info: DeviceCapacityInfoOperations operations + :vartype device_capacity_info: + azure.mgmt.databoxedge.aio.operations.DeviceCapacityInfoOperations + :ivar monitoring_config: MonitoringConfigOperations operations + :vartype monitoring_config: azure.mgmt.databoxedge.aio.operations.MonitoringConfigOperations + :ivar available_skus: AvailableSkusOperations operations + :vartype available_skus: azure.mgmt.databoxedge.aio.operations.AvailableSkusOperations + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The subscription ID. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is None. + :param base_url: Service host. Default value is None. :type base_url: str - :keyword api_version: Api Version. Default value is "2021-02-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds + :keyword api_version: The API version to use for this operation. Default value is "2023-12-01". + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( - self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any ) -> None: - _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoint = "{endpoint}" + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: base_url = _endpoints["resource_manager"] credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = DataBoxEdgeManagementClientConfiguration( - credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + cloud_setting=cloud_setting, + credential_scopes=credential_scopes, + **kwargs ) _policies = kwargs.pop("policies", None) @@ -130,31 +160,28 @@ def __init__( self._config.http_logging_policy, ] self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( - base_url=cast(str, base_url), policies=_policies, **kwargs + base_url=cast(str, _endpoint), policies=_policies, **kwargs ) - client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.available_skus = AvailableSkusOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations_status = OperationsStatusOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.devices = DevicesOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(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.diagnostic_settings = DiagnosticSettingsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.jobs = JobsOperations(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 @@ -165,8 +192,22 @@ def __init__( 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) + self.device_capacity_check = DeviceCapacityCheckOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nodes = NodesOperations(self._client, self._config, self._serialize, self._deserialize) + self.support_packages = SupportPackagesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.device_capacity_info = DeviceCapacityInfoOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.monitoring_config = MonitoringConfigOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.available_skus = AvailableSkusOperations(self._client, self._config, self._serialize, self._deserialize) - def _send_request( + def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. @@ -174,7 +215,7 @@ def _send_request( >>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") - >>> response = await client._send_request(request) + >>> response = await client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request @@ -187,7 +228,11 @@ def _send_request( """ request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore async def close(self) -> None: diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_configuration.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_configuration.py index 444bce0d903c..cf991dddc3e3 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_configuration.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_configuration.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy @@ -14,6 +14,7 @@ from .._version import VERSION if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential @@ -23,17 +24,29 @@ class DataBoxEdgeManagementClientConfiguration: # pylint: disable=too-many-inst Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The subscription ID. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2021-02-01-preview". Note that overriding - this default value may result in unsupported behavior. + :param base_url: Service host. Default value is "https://management.azure.com". + :type base_url: str + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds + :keyword api_version: The API version to use for this operation. Default value is "2023-12-01". + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2021-02-01-preview") + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any + ) -> None: + api_version: str = kwargs.pop("api_version", "2023-12-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -42,6 +55,8 @@ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **k self.credential = credential self.subscription_id = subscription_id + self.base_url = base_url + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-databoxedge/{}".format(VERSION)) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_patch.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_patch.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/__init__.py index c122f949d439..33aed06b0cfb 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/__init__.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,48 +12,56 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import OperationsStatusOperations # type: ignore +from ._operations import DevicesOperations # type: ignore from ._operations import Operations # type: ignore -from ._available_skus_operations import AvailableSkusOperations # type: ignore -from ._devices_operations import DevicesOperations # type: ignore -from ._alerts_operations import AlertsOperations # type: ignore -from ._bandwidth_schedules_operations import BandwidthSchedulesOperations # type: ignore -from ._jobs_operations import JobsOperations # type: ignore -from ._nodes_operations import NodesOperations # type: ignore -from ._operations_status_operations import OperationsStatusOperations # type: ignore -from ._orders_operations import OrdersOperations # type: ignore -from ._roles_operations import RolesOperations # type: ignore -from ._addons_operations import AddonsOperations # type: ignore -from ._monitoring_config_operations import MonitoringConfigOperations # type: ignore -from ._shares_operations import SharesOperations # type: ignore -from ._storage_account_credentials_operations import StorageAccountCredentialsOperations # type: ignore -from ._storage_accounts_operations import StorageAccountsOperations # type: ignore -from ._containers_operations import ContainersOperations # type: ignore -from ._triggers_operations import TriggersOperations # type: ignore -from ._users_operations import UsersOperations # type: ignore +from ._operations import AlertsOperations # type: ignore +from ._operations import BandwidthSchedulesOperations # type: ignore +from ._operations import DiagnosticSettingsOperations # type: ignore +from ._operations import JobsOperations # type: ignore +from ._operations import OrdersOperations # type: ignore +from ._operations import RolesOperations # type: ignore +from ._operations import AddonsOperations # type: ignore +from ._operations import SharesOperations # type: ignore +from ._operations import StorageAccountCredentialsOperations # type: ignore +from ._operations import StorageAccountsOperations # type: ignore +from ._operations import ContainersOperations # type: ignore +from ._operations import TriggersOperations # type: ignore +from ._operations import UsersOperations # type: ignore +from ._operations import DeviceCapacityCheckOperations # type: ignore +from ._operations import NodesOperations # type: ignore +from ._operations import SupportPackagesOperations # type: ignore +from ._operations import DeviceCapacityInfoOperations # type: ignore +from ._operations import MonitoringConfigOperations # type: ignore +from ._operations import AvailableSkusOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Operations", - "AvailableSkusOperations", + "OperationsStatusOperations", "DevicesOperations", + "Operations", "AlertsOperations", "BandwidthSchedulesOperations", + "DiagnosticSettingsOperations", "JobsOperations", - "NodesOperations", - "OperationsStatusOperations", "OrdersOperations", "RolesOperations", "AddonsOperations", - "MonitoringConfigOperations", "SharesOperations", "StorageAccountCredentialsOperations", "StorageAccountsOperations", "ContainersOperations", "TriggersOperations", "UsersOperations", + "DeviceCapacityCheckOperations", + "NodesOperations", + "SupportPackagesOperations", + "DeviceCapacityInfoOperations", + "MonitoringConfigOperations", + "AvailableSkusOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_addons_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_addons_operations.py deleted file mode 100644 index 27209ad23521..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_addons_operations.py +++ /dev/null @@ -1,537 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._addons_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_role_request, -) -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class AddonsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`addons` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_role( - self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Addon"]: - """Lists all the addons configured in the role. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either Addon or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Addon] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AddonList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_role_request( - device_name=device_name, - role_name=role_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("AddonList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, device_name: str, role_name: str, addon_name: str, resource_group_name: str, **kwargs: Any - ) -> _models.Addon: - """Gets a specific addon by name. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param addon_name: The addon name. Required. - :type addon_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Addon or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Addon - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Addon] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - role_name=role_name, - addon_name=addon_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Addon", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - device_name: str, - role_name: str, - addon_name: str, - resource_group_name: str, - addon: Union[_models.Addon, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(addon, (IOBase, bytes)): - _content = addon - else: - _json = self._serialize.body(addon, "Addon") - - _request = build_create_or_update_request( - device_name=device_name, - role_name=role_name, - addon_name=addon_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - device_name: str, - role_name: str, - addon_name: str, - resource_group_name: str, - addon: _models.Addon, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Addon]: - """Create or update a addon. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param addon_name: The addon name. Required. - :type addon_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param addon: The addon properties. Required. - :type addon: ~azure.mgmt.databoxedge.models.Addon - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Addon or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Addon] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - device_name: str, - role_name: str, - addon_name: str, - resource_group_name: str, - addon: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Addon]: - """Create or update a addon. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param addon_name: The addon name. Required. - :type addon_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param addon: The addon properties. Required. - :type addon: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Addon or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Addon] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - device_name: str, - role_name: str, - addon_name: str, - resource_group_name: str, - addon: Union[_models.Addon, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Addon]: - """Create or update a addon. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param addon_name: The addon name. Required. - :type addon_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param addon: The addon properties. Is either a Addon type or a IO[bytes] type. Required. - :type addon: ~azure.mgmt.databoxedge.models.Addon or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Addon or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Addon] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Addon] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - device_name=device_name, - role_name=role_name, - addon_name=addon_name, - resource_group_name=resource_group_name, - addon=addon, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Addon", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Addon].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Addon]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, device_name: str, role_name: str, addon_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - role_name=role_name, - addon_name=addon_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, device_name: str, role_name: str, addon_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the addon on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param addon_name: The addon name. Required. - :type addon_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - device_name=device_name, - role_name=role_name, - addon_name=addon_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_alerts_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_alerts_operations.py deleted file mode 100644 index 9ee67b4a0e72..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_alerts_operations.py +++ /dev/null @@ -1,198 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._alerts_operations import build_get_request, build_list_by_data_box_edge_device_request -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class AlertsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`alerts` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Alert"]: - """Gets all the alerts for a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either Alert or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Alert] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AlertList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("AlertList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Alert: - """Gets an alert by name. - - Gets an alert by name. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The alert name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Alert or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Alert - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Alert] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Alert", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_available_skus_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_available_skus_operations.py deleted file mode 100644 index bd9a40978269..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_available_skus_operations.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._available_skus_operations import build_list_request -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class AvailableSkusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`available_skus` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.DataBoxEdgeSku"]: - """List all the available Skus and information related to them. - - List all the available Skus and information related to them. - - :return: An iterator like instance of either DataBoxEdgeSku or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.DataBoxEdgeSku] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DataBoxEdgeSkuList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("DataBoxEdgeSkuList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_bandwidth_schedules_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_bandwidth_schedules_operations.py deleted file mode 100644 index 2fc233598b88..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_bandwidth_schedules_operations.py +++ /dev/null @@ -1,518 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._bandwidth_schedules_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_data_box_edge_device_request, -) -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class BandwidthSchedulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`bandwidth_schedules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.BandwidthSchedule"]: - """Gets all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either BandwidthSchedule or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.BandwidthSchedule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BandwidthSchedulesList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("BandwidthSchedulesList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> _models.BandwidthSchedule: - """Gets the properties of the specified bandwidth schedule. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The bandwidth schedule name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: BandwidthSchedule or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.BandwidthSchedule - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BandwidthSchedule] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("BandwidthSchedule", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - device_name: str, - name: str, - resource_group_name: str, - parameters: Union[_models.BandwidthSchedule, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "BandwidthSchedule") - - _request = build_create_or_update_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - parameters: _models.BandwidthSchedule, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.BandwidthSchedule]: - """Creates or updates a bandwidth schedule. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The bandwidth schedule name which needs to be added/updated. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The bandwidth schedule to be added or updated. Required. - :type parameters: ~azure.mgmt.databoxedge.models.BandwidthSchedule - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either BandwidthSchedule or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.BandwidthSchedule]: - """Creates or updates a bandwidth schedule. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The bandwidth schedule name which needs to be added/updated. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The bandwidth schedule to be added or updated. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either BandwidthSchedule or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - parameters: Union[_models.BandwidthSchedule, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.BandwidthSchedule]: - """Creates or updates a bandwidth schedule. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The bandwidth schedule name which needs to be added/updated. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The bandwidth schedule to be added or updated. Is either a BandwidthSchedule - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.databoxedge.models.BandwidthSchedule or IO[bytes] - :return: An instance of AsyncLROPoller that returns either BandwidthSchedule or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BandwidthSchedule] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("BandwidthSchedule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.BandwidthSchedule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.BandwidthSchedule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified bandwidth schedule. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The bandwidth schedule name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_containers_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_containers_operations.py deleted file mode 100644 index c42aae66a0b3..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_containers_operations.py +++ /dev/null @@ -1,664 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._containers_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_storage_account_request, - build_refresh_request, -) -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class ContainersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`containers` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_storage_account( - self, device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Container"]: - """Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device. - - Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The storage Account name. Required. - :type storage_account_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either Container or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Container] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ContainerList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_storage_account_request( - device_name=device_name, - storage_account_name=storage_account_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ContainerList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any - ) -> _models.Container: - """Gets a container by name. - - Gets a container by name. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The Storage Account Name. Required. - :type storage_account_name: str - :param container_name: The container Name. Required. - :type container_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Container or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Container - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Container] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - storage_account_name=storage_account_name, - container_name=container_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Container", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - device_name: str, - storage_account_name: str, - container_name: str, - resource_group_name: str, - container: Union[_models.Container, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(container, (IOBase, bytes)): - _content = container - else: - _json = self._serialize.body(container, "Container") - - _request = build_create_or_update_request( - device_name=device_name, - storage_account_name=storage_account_name, - container_name=container_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - device_name: str, - storage_account_name: str, - container_name: str, - resource_group_name: str, - container: _models.Container, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Container]: - """Creates a new container or updates an existing container on the device. - - Creates a new container or updates an existing container on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The Storage Account Name. Required. - :type storage_account_name: str - :param container_name: The container name. Required. - :type container_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param container: The container properties. Required. - :type container: ~azure.mgmt.databoxedge.models.Container - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Container or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Container] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - device_name: str, - storage_account_name: str, - container_name: str, - resource_group_name: str, - container: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Container]: - """Creates a new container or updates an existing container on the device. - - Creates a new container or updates an existing container on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The Storage Account Name. Required. - :type storage_account_name: str - :param container_name: The container name. Required. - :type container_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param container: The container properties. Required. - :type container: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Container or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Container] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - device_name: str, - storage_account_name: str, - container_name: str, - resource_group_name: str, - container: Union[_models.Container, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Container]: - """Creates a new container or updates an existing container on the device. - - Creates a new container or updates an existing container on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The Storage Account Name. Required. - :type storage_account_name: str - :param container_name: The container name. Required. - :type container_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param container: The container properties. Is either a Container type or a IO[bytes] type. - Required. - :type container: ~azure.mgmt.databoxedge.models.Container or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Container or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Container] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Container] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - device_name=device_name, - storage_account_name=storage_account_name, - container_name=container_name, - resource_group_name=resource_group_name, - container=container, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Container", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Container].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Container]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - storage_account_name=storage_account_name, - container_name=container_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the container on the Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The Storage Account Name. Required. - :type storage_account_name: str - :param container_name: The container name. Required. - :type container_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - device_name=device_name, - storage_account_name=storage_account_name, - container_name=container_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _refresh_initial( - self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_request( - device_name=device_name, - storage_account_name=storage_account_name, - container_name=container_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_refresh( - self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Refreshes the container metadata with the data from the cloud. - - Refreshes the container metadata with the data from the cloud. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The Storage Account Name. Required. - :type storage_account_name: str - :param container_name: The container name. Required. - :type container_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._refresh_initial( - device_name=device_name, - storage_account_name=storage_account_name, - container_name=container_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_devices_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_devices_operations.py deleted file mode 100644 index d3853cfab123..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_devices_operations.py +++ /dev/null @@ -1,1700 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._devices_operations import ( - build_create_or_update_request, - build_create_or_update_security_settings_request, - build_delete_request, - build_download_updates_request, - build_generate_certificate_request, - build_get_extended_information_request, - build_get_network_settings_request, - build_get_request, - build_get_update_summary_request, - build_install_updates_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_scan_for_updates_request, - build_update_extended_information_request, - build_update_request, - build_upload_certificate_request, -) -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class DevicesOperations: # pylint: disable=too-many-public-methods - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`devices` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_subscription( - self, expand: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.DataBoxEdgeDevice"]: - """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=\\ :code:`` to populate the next page in the list. Default value is - None. - :type expand: str - :return: An iterator like instance of either DataBoxEdgeDevice or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DataBoxEdgeDeviceList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("DataBoxEdgeDeviceList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, expand: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.DataBoxEdgeDevice"]: - """Gets all the Data Box Edge/Data Box Gateway devices in a resource group. - - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param expand: Specify $expand=details to populate additional fields related to the resource or - Specify $skipToken=\\ :code:`` to populate the next page in the list. Default value is - None. - :type expand: str - :return: An iterator like instance of either DataBoxEdgeDevice or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DataBoxEdgeDeviceList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("DataBoxEdgeDeviceList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get(self, device_name: str, resource_group_name: str, **kwargs: Any) -> _models.DataBoxEdgeDevice: - """Gets the properties of the Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: DataBoxEdgeDevice or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DataBoxEdgeDevice] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DataBoxEdgeDevice", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - device_name: str, - resource_group_name: str, - data_box_edge_device: Union[_models.DataBoxEdgeDevice, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(data_box_edge_device, (IOBase, bytes)): - _content = data_box_edge_device - else: - _json = self._serialize.body(data_box_edge_device, "DataBoxEdgeDevice") - - _request = build_create_or_update_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - device_name: str, - resource_group_name: str, - data_box_edge_device: _models.DataBoxEdgeDevice, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.DataBoxEdgeDevice]: - """Creates or updates a Data Box Edge/Data Box Gateway resource. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param data_box_edge_device: The resource object. Required. - :type data_box_edge_device: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either DataBoxEdgeDevice or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - device_name: str, - resource_group_name: str, - data_box_edge_device: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.DataBoxEdgeDevice]: - """Creates or updates a Data Box Edge/Data Box Gateway resource. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param data_box_edge_device: The resource object. Required. - :type data_box_edge_device: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either DataBoxEdgeDevice or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - device_name: str, - resource_group_name: str, - data_box_edge_device: Union[_models.DataBoxEdgeDevice, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.DataBoxEdgeDevice]: - """Creates or updates a Data Box Edge/Data Box Gateway resource. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param data_box_edge_device: The resource object. Is either a DataBoxEdgeDevice type or a - IO[bytes] type. Required. - :type data_box_edge_device: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice or IO[bytes] - :return: An instance of AsyncLROPoller that returns either DataBoxEdgeDevice or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DataBoxEdgeDevice] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - device_name=device_name, - resource_group_name=resource_group_name, - data_box_edge_device=data_box_edge_device, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DataBoxEdgeDevice", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.DataBoxEdgeDevice].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.DataBoxEdgeDevice]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial(self, device_name: str, resource_group_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete(self, device_name: str, resource_group_name: str, **kwargs: Any) -> AsyncLROPoller[None]: - """Deletes the Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - device_name=device_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @overload - async def update( - self, - device_name: str, - resource_group_name: str, - parameters: _models.DataBoxEdgeDevicePatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DataBoxEdgeDevice: - """Modifies a Data Box Edge/Data Box Gateway resource. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The resource parameters. Required. - :type parameters: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DataBoxEdgeDevice or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - device_name: str, - resource_group_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DataBoxEdgeDevice: - """Modifies a Data Box Edge/Data Box Gateway resource. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The resource parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DataBoxEdgeDevice or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - device_name: str, - resource_group_name: str, - parameters: Union[_models.DataBoxEdgeDevicePatch, IO[bytes]], - **kwargs: Any - ) -> _models.DataBoxEdgeDevice: - """Modifies a Data Box Edge/Data Box Gateway resource. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The resource parameters. Is either a DataBoxEdgeDevicePatch type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePatch or IO[bytes] - :return: DataBoxEdgeDevice or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DataBoxEdgeDevice] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DataBoxEdgeDevicePatch") - - _request = build_update_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DataBoxEdgeDevice", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _download_updates_initial( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_download_updates_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_download_updates( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Downloads the updates on a Data Box Edge/Data Box Gateway device. - - Downloads the updates on a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._download_updates_initial( - device_name=device_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace_async - async def generate_certificate( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> _models.GenerateCertResponse: - """Generates certificate for activation key. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: GenerateCertResponse or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.GenerateCertResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GenerateCertResponse] = kwargs.pop("cls", None) - - _request = build_generate_certificate_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GenerateCertResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_extended_information( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> _models.DataBoxEdgeDeviceExtendedInfo: - """Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: DataBoxEdgeDeviceExtendedInfo or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DataBoxEdgeDeviceExtendedInfo] = kwargs.pop("cls", None) - - _request = build_get_extended_information_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DataBoxEdgeDeviceExtendedInfo", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _install_updates_initial( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_install_updates_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_install_updates( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Installs the updates on the Data Box Edge/Data Box Gateway device. - - Installs the updates on the Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._install_updates_initial( - device_name=device_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace_async - async def get_network_settings( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> _models.NetworkSettings: - """Gets the network settings of the specified Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: NetworkSettings or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.NetworkSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkSettings] = kwargs.pop("cls", None) - - _request = build_get_network_settings_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkSettings", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _scan_for_updates_initial( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_scan_for_updates_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_scan_for_updates( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Scans for updates on a Data Box Edge/Data Box Gateway device. - - Scans for updates on a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._scan_for_updates_initial( - device_name=device_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _create_or_update_security_settings_initial( # pylint: disable=name-too-long - self, - device_name: str, - resource_group_name: str, - security_settings: Union[_models.SecuritySettings, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(security_settings, (IOBase, bytes)): - _content = security_settings - else: - _json = self._serialize.body(security_settings, "SecuritySettings") - - _request = build_create_or_update_security_settings_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update_security_settings( - self, - device_name: str, - resource_group_name: str, - security_settings: _models.SecuritySettings, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Updates the security settings on a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param security_settings: The security settings. Required. - :type security_settings: ~azure.mgmt.databoxedge.models.SecuritySettings - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update_security_settings( - self, - device_name: str, - resource_group_name: str, - security_settings: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Updates the security settings on a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param security_settings: The security settings. Required. - :type security_settings: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update_security_settings( - self, - device_name: str, - resource_group_name: str, - security_settings: Union[_models.SecuritySettings, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Updates the security settings on a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param security_settings: The security settings. Is either a SecuritySettings type or a - IO[bytes] type. Required. - :type security_settings: ~azure.mgmt.databoxedge.models.SecuritySettings or IO[bytes] - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_security_settings_initial( - device_name=device_name, - resource_group_name=resource_group_name, - security_settings=security_settings, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @overload - async def update_extended_information( - self, - device_name: str, - resource_group_name: str, - parameters: _models.DataBoxEdgeDeviceExtendedInfoPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DataBoxEdgeDeviceExtendedInfo: - """Gets additional information for the specified Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The patch object. Required. - :type parameters: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DataBoxEdgeDeviceExtendedInfo or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update_extended_information( - self, - device_name: str, - resource_group_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DataBoxEdgeDeviceExtendedInfo: - """Gets additional information for the specified Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The patch object. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DataBoxEdgeDeviceExtendedInfo or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update_extended_information( - self, - device_name: str, - resource_group_name: str, - parameters: Union[_models.DataBoxEdgeDeviceExtendedInfoPatch, IO[bytes]], - **kwargs: Any - ) -> _models.DataBoxEdgeDeviceExtendedInfo: - """Gets additional information for the specified Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The patch object. Is either a DataBoxEdgeDeviceExtendedInfoPatch type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch or - IO[bytes] - :return: DataBoxEdgeDeviceExtendedInfo or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DataBoxEdgeDeviceExtendedInfo] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DataBoxEdgeDeviceExtendedInfoPatch") - - _request = build_update_extended_information_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DataBoxEdgeDeviceExtendedInfo", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_update_summary( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> _models.UpdateSummary: - """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. - - 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. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: UpdateSummary or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.UpdateSummary - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UpdateSummary] = kwargs.pop("cls", None) - - _request = build_get_update_summary_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("UpdateSummary", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def upload_certificate( - self, - device_name: str, - resource_group_name: str, - parameters: _models.UploadCertificateRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.UploadCertificateResponse: - """Uploads registration certificate for the device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The upload certificate request. Required. - :type parameters: ~azure.mgmt.databoxedge.models.UploadCertificateRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: UploadCertificateResponse or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def upload_certificate( - self, - device_name: str, - resource_group_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.UploadCertificateResponse: - """Uploads registration certificate for the device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The upload certificate request. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: UploadCertificateResponse or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def upload_certificate( - self, - device_name: str, - resource_group_name: str, - parameters: Union[_models.UploadCertificateRequest, IO[bytes]], - **kwargs: Any - ) -> _models.UploadCertificateResponse: - """Uploads registration certificate for the device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The upload certificate request. Is either a UploadCertificateRequest type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.databoxedge.models.UploadCertificateRequest or IO[bytes] - :return: UploadCertificateResponse or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.UploadCertificateResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "UploadCertificateRequest") - - _request = build_upload_certificate_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("UploadCertificateResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_jobs_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_jobs_operations.py deleted file mode 100644 index 76dc689f1e78..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_jobs_operations.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._jobs_operations import build_get_request -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class JobsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`jobs` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Job: - """Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. - - Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The job name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Job or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Job - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Job] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Job", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_monitoring_config_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_monitoring_config_operations.py deleted file mode 100644 index ac013a0afcb4..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_monitoring_config_operations.py +++ /dev/null @@ -1,539 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._monitoring_config_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_request, -) -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class MonitoringConfigOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`monitoring_config` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.MonitoringMetricConfiguration"]: - """Lists metric configurations in a role. - - Lists metric configurations in a role. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either MonitoringMetricConfiguration or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.MonitoringMetricConfigurationList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - device_name=device_name, - role_name=role_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("MonitoringMetricConfigurationList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any - ) -> _models.MonitoringMetricConfiguration: - """Gets a metric configuration of a role. - - Gets a metric configuration of a role. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: MonitoringMetricConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.MonitoringMetricConfiguration] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - role_name=role_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("MonitoringMetricConfiguration", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - device_name: str, - role_name: str, - resource_group_name: str, - monitoring_metric_configuration: Union[_models.MonitoringMetricConfiguration, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(monitoring_metric_configuration, (IOBase, bytes)): - _content = monitoring_metric_configuration - else: - _json = self._serialize.body(monitoring_metric_configuration, "MonitoringMetricConfiguration") - - _request = build_create_or_update_request( - device_name=device_name, - role_name=role_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - device_name: str, - role_name: str, - resource_group_name: str, - monitoring_metric_configuration: _models.MonitoringMetricConfiguration, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.MonitoringMetricConfiguration]: - """Creates a new metric configuration or updates an existing one for a role. - - Creates a new metric configuration or updates an existing one for a role. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param monitoring_metric_configuration: The metric configuration. Required. - :type monitoring_metric_configuration: - ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either MonitoringMetricConfiguration or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - device_name: str, - role_name: str, - resource_group_name: str, - monitoring_metric_configuration: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.MonitoringMetricConfiguration]: - """Creates a new metric configuration or updates an existing one for a role. - - Creates a new metric configuration or updates an existing one for a role. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param monitoring_metric_configuration: The metric configuration. Required. - :type monitoring_metric_configuration: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either MonitoringMetricConfiguration or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - device_name: str, - role_name: str, - resource_group_name: str, - monitoring_metric_configuration: Union[_models.MonitoringMetricConfiguration, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.MonitoringMetricConfiguration]: - """Creates a new metric configuration or updates an existing one for a role. - - Creates a new metric configuration or updates an existing one for a role. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param monitoring_metric_configuration: The metric configuration. Is either a - MonitoringMetricConfiguration type or a IO[bytes] type. Required. - :type monitoring_metric_configuration: - ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration or IO[bytes] - :return: An instance of AsyncLROPoller that returns either MonitoringMetricConfiguration or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.MonitoringMetricConfiguration] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - device_name=device_name, - role_name=role_name, - resource_group_name=resource_group_name, - monitoring_metric_configuration=monitoring_metric_configuration, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("MonitoringMetricConfiguration", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.MonitoringMetricConfiguration].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.MonitoringMetricConfiguration]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - role_name=role_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """deletes a new metric configuration for a role. - - deletes a new metric configuration for a role. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - device_name=device_name, - role_name=role_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_nodes_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_nodes_operations.py deleted file mode 100644 index ef8f210ef9ed..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_nodes_operations.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._nodes_operations import build_list_by_data_box_edge_device_request -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class NodesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`nodes` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Node"]: - """Gets all the nodes currently configured under this Data Box Edge device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either Node or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Node] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NodeList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NodeList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_operations.py index ac4264616b9b..893796367df5 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_operations.py @@ -1,12 +1,15 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar +from io import IOBase +import json +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core import AsyncPipelineClient @@ -17,34 +20,207 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer -from ...operations._operations import build_list_request +from ...operations._operations import ( + build_addons_create_or_update_request, + build_addons_delete_request, + build_addons_get_request, + build_addons_list_by_role_request, + build_alerts_get_request, + build_alerts_list_by_data_box_edge_device_request, + build_available_skus_list_request, + build_bandwidth_schedules_create_or_update_request, + build_bandwidth_schedules_delete_request, + build_bandwidth_schedules_get_request, + build_bandwidth_schedules_list_by_data_box_edge_device_request, + build_containers_create_or_update_request, + build_containers_delete_request, + build_containers_get_request, + build_containers_list_by_storage_account_request, + build_containers_refresh_request, + build_device_capacity_check_check_resource_creation_feasibility_request, + build_device_capacity_info_get_device_capacity_info_request, + build_devices_create_or_update_request, + build_devices_create_or_update_security_settings_request, + build_devices_delete_request, + build_devices_download_updates_request, + build_devices_generate_certificate_request, + build_devices_get_extended_information_request, + build_devices_get_network_settings_request, + build_devices_get_request, + build_devices_get_update_summary_request, + build_devices_install_updates_request, + build_devices_list_by_resource_group_request, + build_devices_list_by_subscription_request, + build_devices_scan_for_updates_request, + build_devices_update_extended_information_request, + build_devices_update_request, + build_devices_upload_certificate_request, + build_diagnostic_settings_get_diagnostic_proactive_log_collection_settings_request, + build_diagnostic_settings_get_diagnostic_remote_support_settings_request, + build_diagnostic_settings_update_diagnostic_proactive_log_collection_settings_request, + build_diagnostic_settings_update_diagnostic_remote_support_settings_request, + build_jobs_get_request, + build_monitoring_config_create_or_update_request, + build_monitoring_config_delete_request, + build_monitoring_config_get_request, + build_monitoring_config_list_request, + build_nodes_list_by_data_box_edge_device_request, + build_operations_list_request, + build_operations_status_get_request, + build_orders_create_or_update_request, + build_orders_delete_request, + build_orders_get_request, + build_orders_list_by_data_box_edge_device_request, + build_orders_list_dc_access_code_request, + build_roles_create_or_update_request, + build_roles_delete_request, + build_roles_get_request, + build_roles_list_by_data_box_edge_device_request, + build_shares_create_or_update_request, + build_shares_delete_request, + build_shares_get_request, + build_shares_list_by_data_box_edge_device_request, + build_shares_refresh_request, + build_storage_account_credentials_create_or_update_request, + build_storage_account_credentials_delete_request, + build_storage_account_credentials_get_request, + build_storage_account_credentials_list_by_data_box_edge_device_request, + build_storage_accounts_create_or_update_request, + build_storage_accounts_delete_request, + build_storage_accounts_get_request, + build_storage_accounts_list_by_data_box_edge_device_request, + build_support_packages_trigger_support_package_request, + build_triggers_create_or_update_request, + build_triggers_delete_request, + build_triggers_get_request, + build_triggers_list_by_data_box_edge_device_request, + build_users_create_or_update_request, + build_users_delete_request, + build_users_get_request, + build_users_list_by_data_box_edge_device_request, +) from .._configuration import DataBoxEdgeManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +JSON = MutableMapping[str, Any] +List = list -class Operations: +class OperationsStatusOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`operations` attribute. + :attr:`operations_status` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Job: + """Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. + + Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The job name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Job. The Job is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Job + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Job] = kwargs.pop("cls", None) + + _request = build_operations_status_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Job, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class DevicesOperations: # pylint: disable=too-many-public-methods """ + .. warning:: + **DO NOT** instantiate this class directly. - models = _models + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`devices` attribute. + """ def __init__(self, *args, **kwargs) -> None: input_args = list(args) @@ -55,21 +231,598 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: - """List all the supported operations. + @distributed_trace_async + async def get_network_settings( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> _models.NetworkSettings: + """Gets the network settings of the specified Data Box Edge/Data Box Gateway device. - List all the supported operations. + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: NetworkSettings. The NetworkSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.NetworkSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - :return: An iterator like instance of either Operation or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Operation] + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkSettings] = kwargs.pop("cls", None) + + _request = build_devices_get_network_settings_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.NetworkSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get(self, device_name: str, resource_group_name: str, **kwargs: Any) -> _models.DataBoxEdgeDevice: + """Gets the properties of the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DataBoxEdgeDevice] = kwargs.pop("cls", None) + + _request = build_devices_get_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DataBoxEdgeDevice, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + device_name: str, + data_box_edge_device: _models.DataBoxEdgeDevice, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDevice: + """Creates or updates a Data Box Edge/Data Box Gateway resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param data_box_edge_device: The resource object. Required. + :type data_box_edge_device: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + device_name: str, + data_box_edge_device: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDevice: + """Creates or updates a Data Box Edge/Data Box Gateway resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param data_box_edge_device: The resource object. Required. + :type data_box_edge_device: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + device_name: str, + data_box_edge_device: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDevice: + """Creates or updates a Data Box Edge/Data Box Gateway resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param data_box_edge_device: The resource object. Required. + :type data_box_edge_device: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + device_name: str, + data_box_edge_device: Union[_models.DataBoxEdgeDevice, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.DataBoxEdgeDevice: + """Creates or updates a Data Box Edge/Data Box Gateway resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param data_box_edge_device: The resource object. Is one of the following types: + DataBoxEdgeDevice, JSON, IO[bytes] Required. + :type data_box_edge_device: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice or JSON or + IO[bytes] + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DataBoxEdgeDevice] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(data_box_edge_device, (IOBase, bytes)): + _content = data_box_edge_device + else: + _content = json.dumps(data_box_edge_device, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_devices_create_or_update_request( + resource_group_name=resource_group_name, + device_name=device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DataBoxEdgeDevice, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + device_name: str, + resource_group_name: str, + parameters: _models.DataBoxEdgeDevicePatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDevice: + """Modifies a Data Box Edge/Data Box Gateway resource. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The resource parameters. Required. + :type parameters: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + device_name: str, + resource_group_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDevice: + """Modifies a Data Box Edge/Data Box Gateway resource. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The resource parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + device_name: str, + resource_group_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDevice: + """Modifies a Data Box Edge/Data Box Gateway resource. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The resource parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + device_name: str, + resource_group_name: str, + parameters: Union[_models.DataBoxEdgeDevicePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.DataBoxEdgeDevice: + """Modifies a Data Box Edge/Data Box Gateway resource. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The resource parameters. Is one of the following types: + DataBoxEdgeDevicePatch, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePatch or JSON or IO[bytes] + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DataBoxEdgeDevice] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_devices_update_request( + device_name=device_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DataBoxEdgeDevice, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _delete_initial(self, device_name: str, resource_group_name: str, **kwargs: Any) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_devices_delete_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete(self, device_name: str, resource_group_name: str, **kwargs: Any) -> AsyncLROPoller[None]: + """Deletes the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + device_name=device_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, *, expand: Optional[str] = None, **kwargs: Any + ) -> AsyncItemPaged["_models.DataBoxEdgeDevice"]: + """Gets all the Data Box Edge/Data Box Gateway devices in a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword expand: Specify $expand=details to populate additional fields related to the resource + or Specify $skipToken= to populate the next page in the list. Default value is None. + :paramtype expand: str + :return: An iterator like instance of DataBoxEdgeDevice + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + _params = kwargs.pop("params", {}) or {} - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationsList] = kwargs.pop("cls", None) + cls: ClsType[List[_models.DataBoxEdgeDevice]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -82,12 +835,20 @@ def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: def prepare_request(next_link=None): if not next_link: - _request = build_list_request( - api_version=api_version, + _request = build_devices_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + expand=expand, + api_version=self._config.api_version, headers=_headers, params=_params, ) - _request.url = self._client.format_url(_request.url) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) else: # make call to next link with the client's api-version @@ -102,16 +863,9404 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.DataBoxEdgeDevice], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription( + self, *, expand: Optional[str] = None, **kwargs: Any + ) -> AsyncItemPaged["_models.DataBoxEdgeDevice"]: + """Gets all the Data Box Edge/Data Box Gateway devices in a subscription. + + :keyword expand: Specify $expand=details to populate additional fields related to the resource + or Specify $skipToken= to populate the next page in the list. Default value is None. + :paramtype expand: str + :return: An iterator like instance of DataBoxEdgeDevice + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DataBoxEdgeDevice]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_devices_list_by_subscription_request( + subscription_id=self._config.subscription_id, + expand=expand, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.DataBoxEdgeDevice], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _download_updates_initial( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_devices_download_updates_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_download_updates( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Downloads the updates on a Data Box Edge/Data Box Gateway device. + + Downloads the updates on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._download_updates_initial( + device_name=device_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace_async + async def generate_certificate( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> _models.GenerateCertResponse: + """Generates certificate for activation key. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: GenerateCertResponse. The GenerateCertResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.GenerateCertResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GenerateCertResponse] = kwargs.pop("cls", None) + + _request = build_devices_generate_certificate_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.GenerateCertResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_extended_information( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> _models.DataBoxEdgeDeviceExtendedInfo: + """Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: DataBoxEdgeDeviceExtendedInfo. The DataBoxEdgeDeviceExtendedInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DataBoxEdgeDeviceExtendedInfo] = kwargs.pop("cls", None) + + _request = build_devices_get_extended_information_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DataBoxEdgeDeviceExtendedInfo, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _install_updates_initial( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_devices_install_updates_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_install_updates( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Installs the updates on the Data Box Edge/Data Box Gateway device. + + Installs the updates on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._install_updates_initial( + device_name=device_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + async def _scan_for_updates_initial( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_devices_scan_for_updates_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_scan_for_updates( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Scans for updates on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._scan_for_updates_initial( + device_name=device_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + async def _create_or_update_security_settings_initial( # pylint: disable=name-too-long + self, + device_name: str, + resource_group_name: str, + security_settings: Union[_models.SecuritySettings, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(security_settings, (IOBase, bytes)): + _content = security_settings + else: + _content = json.dumps(security_settings, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_devices_create_or_update_security_settings_request( + device_name=device_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update_security_settings( + self, + device_name: str, + resource_group_name: str, + security_settings: _models.SecuritySettings, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Updates the security settings on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param security_settings: The security settings. Required. + :type security_settings: ~azure.mgmt.databoxedge.models.SecuritySettings + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update_security_settings( + self, + device_name: str, + resource_group_name: str, + security_settings: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Updates the security settings on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param security_settings: The security settings. Required. + :type security_settings: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update_security_settings( + self, + device_name: str, + resource_group_name: str, + security_settings: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Updates the security settings on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param security_settings: The security settings. Required. + :type security_settings: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update_security_settings( + self, + device_name: str, + resource_group_name: str, + security_settings: Union[_models.SecuritySettings, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Updates the security settings on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param security_settings: The security settings. Is one of the following types: + SecuritySettings, JSON, IO[bytes] Required. + :type security_settings: ~azure.mgmt.databoxedge.models.SecuritySettings or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_security_settings_initial( + device_name=device_name, + resource_group_name=resource_group_name, + security_settings=security_settings, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @overload + async def update_extended_information( + self, + device_name: str, + resource_group_name: str, + parameters: _models.DataBoxEdgeDeviceExtendedInfoPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDeviceExtendedInfo: + """Gets additional information for the specified Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The patch object. Required. + :type parameters: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDeviceExtendedInfo. The DataBoxEdgeDeviceExtendedInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update_extended_information( + self, + device_name: str, + resource_group_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDeviceExtendedInfo: + """Gets additional information for the specified Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The patch object. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDeviceExtendedInfo. The DataBoxEdgeDeviceExtendedInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update_extended_information( + self, + device_name: str, + resource_group_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDeviceExtendedInfo: + """Gets additional information for the specified Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The patch object. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDeviceExtendedInfo. The DataBoxEdgeDeviceExtendedInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update_extended_information( + self, + device_name: str, + resource_group_name: str, + parameters: Union[_models.DataBoxEdgeDeviceExtendedInfoPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.DataBoxEdgeDeviceExtendedInfo: + """Gets additional information for the specified Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The patch object. Is one of the following types: + DataBoxEdgeDeviceExtendedInfoPatch, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch or JSON or + IO[bytes] + :return: DataBoxEdgeDeviceExtendedInfo. The DataBoxEdgeDeviceExtendedInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DataBoxEdgeDeviceExtendedInfo] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_devices_update_extended_information_request( + device_name=device_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DataBoxEdgeDeviceExtendedInfo, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def upload_certificate( + self, + device_name: str, + resource_group_name: str, + parameters: _models.UploadCertificateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UploadCertificateResponse: + """Uploads registration certificate for the device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The upload certificate request. Required. + :type parameters: ~azure.mgmt.databoxedge.models.UploadCertificateRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: UploadCertificateResponse. The UploadCertificateResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def upload_certificate( + self, + device_name: str, + resource_group_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UploadCertificateResponse: + """Uploads registration certificate for the device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The upload certificate request. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: UploadCertificateResponse. The UploadCertificateResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def upload_certificate( + self, + device_name: str, + resource_group_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UploadCertificateResponse: + """Uploads registration certificate for the device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The upload certificate request. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: UploadCertificateResponse. The UploadCertificateResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def upload_certificate( + self, + device_name: str, + resource_group_name: str, + parameters: Union[_models.UploadCertificateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.UploadCertificateResponse: + """Uploads registration certificate for the device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The upload certificate request. Is one of the following types: + UploadCertificateRequest, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.databoxedge.models.UploadCertificateRequest or JSON or IO[bytes] + :return: UploadCertificateResponse. The UploadCertificateResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UploadCertificateResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_devices_upload_certificate_request( + device_name=device_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.UploadCertificateResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_update_summary( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> _models.UpdateSummary: + """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. + + 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. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: UpdateSummary. The UpdateSummary is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.UpdateSummary + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.UpdateSummary] = kwargs.pop("cls", None) + + _request = build_devices_get_update_summary_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.UpdateSummary, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class Operations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`operations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: + """List all the supported operations. + + List the operations for the provider. + + :return: An iterator like instance of Operation + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Operation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_operations_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class AlertsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`alerts` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Alert: + """Gets an alert by name. + + Gets an alert by name. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The alert name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Alert. The Alert is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Alert + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Alert] = kwargs.pop("cls", None) + + _request = build_alerts_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Alert, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Alert"]: + """Gets all the alerts for a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Alert + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Alert] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Alert]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_alerts_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Alert], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class BandwidthSchedulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`bandwidth_schedules` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> _models.BandwidthSchedule: + """Gets the properties of the specified bandwidth schedule. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The bandwidth schedule name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: BandwidthSchedule. The BandwidthSchedule is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.BandwidthSchedule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.BandwidthSchedule] = kwargs.pop("cls", None) + + _request = build_bandwidth_schedules_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.BandwidthSchedule, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + device_name: str, + name: str, + resource_group_name: str, + parameters: Union[_models.BandwidthSchedule, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_bandwidth_schedules_create_or_update_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + parameters: _models.BandwidthSchedule, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BandwidthSchedule]: + """Creates or updates a bandwidth schedule. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The bandwidth schedule name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The bandwidth schedule to be added or updated. Required. + :type parameters: ~azure.mgmt.databoxedge.models.BandwidthSchedule + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BandwidthSchedule. The BandwidthSchedule is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BandwidthSchedule]: + """Creates or updates a bandwidth schedule. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The bandwidth schedule name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The bandwidth schedule to be added or updated. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BandwidthSchedule. The BandwidthSchedule is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.BandwidthSchedule]: + """Creates or updates a bandwidth schedule. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The bandwidth schedule name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The bandwidth schedule to be added or updated. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns BandwidthSchedule. The BandwidthSchedule is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + parameters: Union[_models.BandwidthSchedule, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.BandwidthSchedule]: + """Creates or updates a bandwidth schedule. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The bandwidth schedule name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The bandwidth schedule to be added or updated. Is one of the following + types: BandwidthSchedule, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.databoxedge.models.BandwidthSchedule or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns BandwidthSchedule. The BandwidthSchedule is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BandwidthSchedule] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.BandwidthSchedule, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.BandwidthSchedule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.BandwidthSchedule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_bandwidth_schedules_delete_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified bandwidth schedule. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The bandwidth schedule name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.BandwidthSchedule"]: + """Gets all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of BandwidthSchedule + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.BandwidthSchedule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.BandwidthSchedule]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_bandwidth_schedules_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.BandwidthSchedule], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class DiagnosticSettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`diagnostic_settings` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get_diagnostic_proactive_log_collection_settings( # pylint: disable=name-too-long + self, resource_group_name: str, device_name: str, **kwargs: Any + ) -> _models.DiagnosticProactiveLogCollectionSettings: + """Gets the proactive log collection settings of the specified Data Box Edge/Data Box Gateway + device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :return: DiagnosticProactiveLogCollectionSettings. The DiagnosticProactiveLogCollectionSettings + is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DiagnosticProactiveLogCollectionSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DiagnosticProactiveLogCollectionSettings] = kwargs.pop("cls", None) + + _request = build_diagnostic_settings_get_diagnostic_proactive_log_collection_settings_request( + resource_group_name=resource_group_name, + device_name=device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DiagnosticProactiveLogCollectionSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _update_diagnostic_proactive_log_collection_settings_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + proactive_log_collection_settings: Union[_models.DiagnosticProactiveLogCollectionSettings, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(proactive_log_collection_settings, (IOBase, bytes)): + _content = proactive_log_collection_settings + else: + _content = json.dumps(proactive_log_collection_settings, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_diagnostic_settings_update_diagnostic_proactive_log_collection_settings_request( + resource_group_name=resource_group_name, + device_name=device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_diagnostic_proactive_log_collection_settings( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + proactive_log_collection_settings: _models.DiagnosticProactiveLogCollectionSettings, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DiagnosticProactiveLogCollectionSettings]: + """Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param proactive_log_collection_settings: The proactive log collection settings. Required. + :type proactive_log_collection_settings: + ~azure.mgmt.databoxedge.models.DiagnosticProactiveLogCollectionSettings + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DiagnosticProactiveLogCollectionSettings. + The DiagnosticProactiveLogCollectionSettings is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.DiagnosticProactiveLogCollectionSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_diagnostic_proactive_log_collection_settings( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + proactive_log_collection_settings: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DiagnosticProactiveLogCollectionSettings]: + """Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param proactive_log_collection_settings: The proactive log collection settings. Required. + :type proactive_log_collection_settings: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DiagnosticProactiveLogCollectionSettings. + The DiagnosticProactiveLogCollectionSettings is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.DiagnosticProactiveLogCollectionSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_diagnostic_proactive_log_collection_settings( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + proactive_log_collection_settings: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DiagnosticProactiveLogCollectionSettings]: + """Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param proactive_log_collection_settings: The proactive log collection settings. Required. + :type proactive_log_collection_settings: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DiagnosticProactiveLogCollectionSettings. + The DiagnosticProactiveLogCollectionSettings is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.DiagnosticProactiveLogCollectionSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update_diagnostic_proactive_log_collection_settings( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + proactive_log_collection_settings: Union[_models.DiagnosticProactiveLogCollectionSettings, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.DiagnosticProactiveLogCollectionSettings]: + """Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param proactive_log_collection_settings: The proactive log collection settings. Is one of the + following types: DiagnosticProactiveLogCollectionSettings, JSON, IO[bytes] Required. + :type proactive_log_collection_settings: + ~azure.mgmt.databoxedge.models.DiagnosticProactiveLogCollectionSettings or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns DiagnosticProactiveLogCollectionSettings. + The DiagnosticProactiveLogCollectionSettings is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.DiagnosticProactiveLogCollectionSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticProactiveLogCollectionSettings] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_diagnostic_proactive_log_collection_settings_initial( + resource_group_name=resource_group_name, + device_name=device_name, + proactive_log_collection_settings=proactive_log_collection_settings, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.DiagnosticProactiveLogCollectionSettings, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.DiagnosticProactiveLogCollectionSettings].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.DiagnosticProactiveLogCollectionSettings]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def get_diagnostic_remote_support_settings( + self, resource_group_name: str, device_name: str, **kwargs: Any + ) -> _models.DiagnosticRemoteSupportSettings: + """Gets the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway + device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :return: DiagnosticRemoteSupportSettings. The DiagnosticRemoteSupportSettings is compatible + with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DiagnosticRemoteSupportSettings] = kwargs.pop("cls", None) + + _request = build_diagnostic_settings_get_diagnostic_remote_support_settings_request( + resource_group_name=resource_group_name, + device_name=device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DiagnosticRemoteSupportSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _update_diagnostic_remote_support_settings_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + diagnostic_remote_support_settings: Union[_models.DiagnosticRemoteSupportSettings, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(diagnostic_remote_support_settings, (IOBase, bytes)): + _content = diagnostic_remote_support_settings + else: + _content = json.dumps(diagnostic_remote_support_settings, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_diagnostic_settings_update_diagnostic_remote_support_settings_request( + resource_group_name=resource_group_name, + device_name=device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update_diagnostic_remote_support_settings( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + diagnostic_remote_support_settings: _models.DiagnosticRemoteSupportSettings, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DiagnosticRemoteSupportSettings]: + """Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param diagnostic_remote_support_settings: The diagnostic remote support settings. Required. + :type diagnostic_remote_support_settings: + ~azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettings + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DiagnosticRemoteSupportSettings. The + DiagnosticRemoteSupportSettings is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_diagnostic_remote_support_settings( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + diagnostic_remote_support_settings: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DiagnosticRemoteSupportSettings]: + """Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param diagnostic_remote_support_settings: The diagnostic remote support settings. Required. + :type diagnostic_remote_support_settings: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DiagnosticRemoteSupportSettings. The + DiagnosticRemoteSupportSettings is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_diagnostic_remote_support_settings( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + diagnostic_remote_support_settings: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DiagnosticRemoteSupportSettings]: + """Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param diagnostic_remote_support_settings: The diagnostic remote support settings. Required. + :type diagnostic_remote_support_settings: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DiagnosticRemoteSupportSettings. The + DiagnosticRemoteSupportSettings is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update_diagnostic_remote_support_settings( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + diagnostic_remote_support_settings: Union[_models.DiagnosticRemoteSupportSettings, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.DiagnosticRemoteSupportSettings]: + """Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param diagnostic_remote_support_settings: The diagnostic remote support settings. Is one of + the following types: DiagnosticRemoteSupportSettings, JSON, IO[bytes] Required. + :type diagnostic_remote_support_settings: + ~azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettings or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns DiagnosticRemoteSupportSettings. The + DiagnosticRemoteSupportSettings is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticRemoteSupportSettings] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_diagnostic_remote_support_settings_initial( + resource_group_name=resource_group_name, + device_name=device_name, + diagnostic_remote_support_settings=diagnostic_remote_support_settings, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.DiagnosticRemoteSupportSettings, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.DiagnosticRemoteSupportSettings].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.DiagnosticRemoteSupportSettings]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class JobsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`jobs` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Job: + """Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. + + Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The job name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Job. The Job is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Job + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Job] = kwargs.pop("cls", None) + + _request = build_jobs_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Job, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class OrdersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`orders` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, device_name: str, resource_group_name: str, **kwargs: Any) -> _models.Order: + """Gets a specific order by name. + + Gets a specific order by name. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Order. The Order is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Order + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Order] = kwargs.pop("cls", None) + + _request = build_orders_get_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Order, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, device_name: str, resource_group_name: str, order: Union[_models.Order, JSON, IO[bytes]], **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(order, (IOBase, bytes)): + _content = order + else: + _content = json.dumps(order, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_orders_create_or_update_request( + device_name=device_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + device_name: str, + resource_group_name: str, + order: _models.Order, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Order]: + """Creates or updates an order. + + Creates or updates an order. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param order: The order to be created or updated. Required. + :type order: ~azure.mgmt.databoxedge.models.Order + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Order. The Order is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Order] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + resource_group_name: str, + order: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Order]: + """Creates or updates an order. + + Creates or updates an order. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param order: The order to be created or updated. Required. + :type order: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Order. The Order is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Order] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + resource_group_name: str, + order: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Order]: + """Creates or updates an order. + + Creates or updates an order. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param order: The order to be created or updated. Required. + :type order: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Order. The Order is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Order] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, device_name: str, resource_group_name: str, order: Union[_models.Order, JSON, IO[bytes]], **kwargs: Any + ) -> AsyncLROPoller[_models.Order]: + """Creates or updates an order. + + Creates or updates an order. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param order: The order to be created or updated. Is one of the following types: Order, JSON, + IO[bytes] Required. + :type order: ~azure.mgmt.databoxedge.models.Order or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns Order. The Order is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Order] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Order] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + device_name=device_name, + resource_group_name=resource_group_name, + order=order, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Order, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Order].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Order]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial(self, device_name: str, resource_group_name: str, **kwargs: Any) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_orders_delete_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete(self, device_name: str, resource_group_name: str, **kwargs: Any) -> AsyncLROPoller[None]: + """Deletes the order related to the device. + + Deletes the order related to the device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + device_name=device_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Order"]: + """Lists all the orders related to a Data Box Edge/Data Box Gateway device. + + Lists all the orders related to a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Order + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Order] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Order]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_orders_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Order], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def list_dc_access_code( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> _models.DCAccessCode: + """Gets the DCAccess Code. + + Gets the DCAccess Code. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: DCAccessCode. The DCAccessCode is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DCAccessCode + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DCAccessCode] = kwargs.pop("cls", None) + + _request = build_orders_list_dc_access_code_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DCAccessCode, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class RolesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`roles` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Role: + """Gets a specific role by name. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The role name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Role. The Role is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Role + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Role] = kwargs.pop("cls", None) + + _request = build_roles_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Role, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + device_name: str, + name: str, + resource_group_name: str, + role: Union[_models.Role, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(role, (IOBase, bytes)): + _content = role + else: + _content = json.dumps(role, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_roles_create_or_update_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + role: _models.Role, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Role]: + """Create or update a role. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The role name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param role: The role properties. Required. + :type role: ~azure.mgmt.databoxedge.models.Role + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Role. The Role is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Role] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + role: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Role]: + """Create or update a role. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The role name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param role: The role properties. Required. + :type role: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Role. The Role is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Role] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + role: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Role]: + """Create or update a role. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The role name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param role: The role properties. Required. + :type role: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Role. The Role is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Role] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + role: Union[_models.Role, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Role]: + """Create or update a role. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The role name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param role: The role properties. Is one of the following types: Role, JSON, IO[bytes] + Required. + :type role: ~azure.mgmt.databoxedge.models.Role or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns Role. The Role is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Role] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Role] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + role=role, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Role, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Role].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Role]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_roles_delete_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the role on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The role name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Role"]: + """Lists all the roles configured in a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Role + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Role] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Role]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_roles_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Role], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class AddonsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`addons` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, device_name: str, role_name: str, addon_name: str, resource_group_name: str, **kwargs: Any + ) -> _models.Addon: + """Gets a specific addon by name. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param addon_name: The name of the addon. Required. + :type addon_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Addon. The Addon is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Addon + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Addon] = kwargs.pop("cls", None) + + _request = build_addons_get_request( + device_name=device_name, + role_name=role_name, + addon_name=addon_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Addon, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + device_name: str, + role_name: str, + addon_name: str, + resource_group_name: str, + addon: Union[_models.Addon, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(addon, (IOBase, bytes)): + _content = addon + else: + _content = json.dumps(addon, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_addons_create_or_update_request( + device_name=device_name, + role_name=role_name, + addon_name=addon_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + device_name: str, + role_name: str, + addon_name: str, + resource_group_name: str, + addon: _models.Addon, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Addon]: + """Create or update a addon. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param addon_name: The name of the addon. Required. + :type addon_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param addon: The addon properties. Required. + :type addon: ~azure.mgmt.databoxedge.models.Addon + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Addon. The Addon is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Addon] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + role_name: str, + addon_name: str, + resource_group_name: str, + addon: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Addon]: + """Create or update a addon. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param addon_name: The name of the addon. Required. + :type addon_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param addon: The addon properties. Required. + :type addon: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Addon. The Addon is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Addon] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + role_name: str, + addon_name: str, + resource_group_name: str, + addon: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Addon]: + """Create or update a addon. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param addon_name: The name of the addon. Required. + :type addon_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param addon: The addon properties. Required. + :type addon: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Addon. The Addon is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Addon] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + device_name: str, + role_name: str, + addon_name: str, + resource_group_name: str, + addon: Union[_models.Addon, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Addon]: + """Create or update a addon. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param addon_name: The name of the addon. Required. + :type addon_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param addon: The addon properties. Is one of the following types: Addon, JSON, IO[bytes] + Required. + :type addon: ~azure.mgmt.databoxedge.models.Addon or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns Addon. The Addon is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Addon] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Addon] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + device_name=device_name, + role_name=role_name, + addon_name=addon_name, + resource_group_name=resource_group_name, + addon=addon, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Addon, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Addon].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Addon]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, device_name: str, role_name: str, addon_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_addons_delete_request( + device_name=device_name, + role_name=role_name, + addon_name=addon_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, device_name: str, role_name: str, addon_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the addon on the device. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param addon_name: The name of the addon. Required. + :type addon_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + device_name=device_name, + role_name=role_name, + addon_name=addon_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_role( + self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Addon"]: + """Lists all the addons configured in the role. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Addon + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Addon] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Addon]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_addons_list_by_role_request( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Addon], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class SharesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`shares` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Share: + """Gets a share by name. + + Gets a share by name. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The share name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Share. The Share is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Share + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Share] = kwargs.pop("cls", None) + + _request = build_shares_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Share, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + device_name: str, + name: str, + resource_group_name: str, + share: Union[_models.Share, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(share, (IOBase, bytes)): + _content = share + else: + _content = json.dumps(share, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_shares_create_or_update_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + share: _models.Share, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Share]: + """Creates a new share or updates an existing share on the device. + + Creates a new share or updates an existing share on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The share name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param share: The share properties. Required. + :type share: ~azure.mgmt.databoxedge.models.Share + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Share. The Share is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Share] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + share: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Share]: + """Creates a new share or updates an existing share on the device. + + Creates a new share or updates an existing share on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The share name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param share: The share properties. Required. + :type share: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Share. The Share is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Share] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + share: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Share]: + """Creates a new share or updates an existing share on the device. + + Creates a new share or updates an existing share on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The share name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param share: The share properties. Required. + :type share: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Share. The Share is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Share] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + share: Union[_models.Share, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Share]: + """Creates a new share or updates an existing share on the device. + + Creates a new share or updates an existing share on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The share name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param share: The share properties. Is one of the following types: Share, JSON, IO[bytes] + Required. + :type share: ~azure.mgmt.databoxedge.models.Share or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns Share. The Share is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Share] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Share] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + share=share, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Share, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Share].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Share]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_shares_delete_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the share on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The share name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Share"]: + """Lists all the shares in a Data Box Edge/Data Box Gateway device. + + Lists all the shares in a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Share + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Share] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Share]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_shares_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Share], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _refresh_initial( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_shares_refresh_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_refresh( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Refreshes the share metadata with the data from the cloud. + + Refreshes the share metadata with the data from the cloud. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The share name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._refresh_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class StorageAccountCredentialsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`storage_account_credentials` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> _models.StorageAccountCredential: + """Gets the properties of the specified storage account credential. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The storage account credential name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: StorageAccountCredential. The StorageAccountCredential is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.StorageAccountCredential + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.StorageAccountCredential] = kwargs.pop("cls", None) + + _request = build_storage_account_credentials_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.StorageAccountCredential, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + device_name: str, + name: str, + resource_group_name: str, + storage_account_credential: Union[_models.StorageAccountCredential, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(storage_account_credential, (IOBase, bytes)): + _content = storage_account_credential + else: + _content = json.dumps(storage_account_credential, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_storage_account_credentials_create_or_update_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + storage_account_credential: _models.StorageAccountCredential, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.StorageAccountCredential]: + """Creates or updates the storage account credential. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The storage account credential name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param storage_account_credential: The storage account credential. Required. + :type storage_account_credential: ~azure.mgmt.databoxedge.models.StorageAccountCredential + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns StorageAccountCredential. The + StorageAccountCredential is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + storage_account_credential: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.StorageAccountCredential]: + """Creates or updates the storage account credential. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The storage account credential name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param storage_account_credential: The storage account credential. Required. + :type storage_account_credential: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns StorageAccountCredential. The + StorageAccountCredential is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + storage_account_credential: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.StorageAccountCredential]: + """Creates or updates the storage account credential. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The storage account credential name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param storage_account_credential: The storage account credential. Required. + :type storage_account_credential: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns StorageAccountCredential. The + StorageAccountCredential is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + storage_account_credential: Union[_models.StorageAccountCredential, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.StorageAccountCredential]: + """Creates or updates the storage account credential. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The storage account credential name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param storage_account_credential: The storage account credential. Is one of the following + types: StorageAccountCredential, JSON, IO[bytes] Required. + :type storage_account_credential: ~azure.mgmt.databoxedge.models.StorageAccountCredential or + JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns StorageAccountCredential. The + StorageAccountCredential is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.StorageAccountCredential] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + storage_account_credential=storage_account_credential, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.StorageAccountCredential, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.StorageAccountCredential].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.StorageAccountCredential]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_storage_account_credentials_delete_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the storage account credential. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The storage account credential name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.StorageAccountCredential"]: + """Gets all the storage account credentials in a Data Box Edge/Data Box Gateway device. + + Gets all the storage account credentials in a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of StorageAccountCredential + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.StorageAccountCredential] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.StorageAccountCredential]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_storage_account_credentials_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.StorageAccountCredential], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class StorageAccountsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`storage_accounts` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any + ) -> _models.StorageAccount: + """Gets a StorageAccount by name. + + Gets a StorageAccount by name. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: StorageAccount. The StorageAccount is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.StorageAccount + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.StorageAccount] = kwargs.pop("cls", None) + + _request = build_storage_accounts_get_request( + device_name=device_name, + storage_account_name=storage_account_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.StorageAccount, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + device_name: str, + storage_account_name: str, + resource_group_name: str, + storage_account: Union[_models.StorageAccount, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(storage_account, (IOBase, bytes)): + _content = storage_account + else: + _content = json.dumps(storage_account, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_storage_accounts_create_or_update_request( + device_name=device_name, + storage_account_name=storage_account_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + device_name: str, + storage_account_name: str, + resource_group_name: str, + storage_account: _models.StorageAccount, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.StorageAccount]: + """Creates a new StorageAccount or updates an existing StorageAccount on the device. + + Creates a new StorageAccount or updates an existing StorageAccount on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param storage_account: The StorageAccount properties. Required. + :type storage_account: ~azure.mgmt.databoxedge.models.StorageAccount + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns StorageAccount. The StorageAccount is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.StorageAccount] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + storage_account_name: str, + resource_group_name: str, + storage_account: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.StorageAccount]: + """Creates a new StorageAccount or updates an existing StorageAccount on the device. + + Creates a new StorageAccount or updates an existing StorageAccount on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param storage_account: The StorageAccount properties. Required. + :type storage_account: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns StorageAccount. The StorageAccount is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.StorageAccount] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + storage_account_name: str, + resource_group_name: str, + storage_account: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.StorageAccount]: + """Creates a new StorageAccount or updates an existing StorageAccount on the device. + + Creates a new StorageAccount or updates an existing StorageAccount on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param storage_account: The StorageAccount properties. Required. + :type storage_account: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns StorageAccount. The StorageAccount is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.StorageAccount] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + device_name: str, + storage_account_name: str, + resource_group_name: str, + storage_account: Union[_models.StorageAccount, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.StorageAccount]: + """Creates a new StorageAccount or updates an existing StorageAccount on the device. + + Creates a new StorageAccount or updates an existing StorageAccount on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param storage_account: The StorageAccount properties. Is one of the following types: + StorageAccount, JSON, IO[bytes] Required. + :type storage_account: ~azure.mgmt.databoxedge.models.StorageAccount or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns StorageAccount. The StorageAccount is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.StorageAccount] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.StorageAccount] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + device_name=device_name, + storage_account_name=storage_account_name, + resource_group_name=resource_group_name, + storage_account=storage_account, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.StorageAccount, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.StorageAccount].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.StorageAccount]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_storage_accounts_delete_request( + device_name=device_name, + storage_account_name=storage_account_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the StorageAccount on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + device_name=device_name, + storage_account_name=storage_account_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.StorageAccount"]: + """Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. + + Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of StorageAccount + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.StorageAccount] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.StorageAccount]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_storage_accounts_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.StorageAccount], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ContainersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`containers` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any + ) -> _models.Container: + """Gets a container by name. + + Gets a container by name. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param container_name: The container Name. Required. + :type container_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Container. The Container is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Container + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Container] = kwargs.pop("cls", None) + + _request = build_containers_get_request( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Container, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + device_name: str, + storage_account_name: str, + container_name: str, + resource_group_name: str, + container: Union[_models.Container, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(container, (IOBase, bytes)): + _content = container + else: + _content = json.dumps(container, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_containers_create_or_update_request( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + device_name: str, + storage_account_name: str, + container_name: str, + resource_group_name: str, + container: _models.Container, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Container]: + """Creates a new container or updates an existing container on the device. + + Creates a new container or updates an existing container on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param container_name: The container Name. Required. + :type container_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param container: The container properties. Required. + :type container: ~azure.mgmt.databoxedge.models.Container + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Container. The Container is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Container] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + storage_account_name: str, + container_name: str, + resource_group_name: str, + container: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Container]: + """Creates a new container or updates an existing container on the device. + + Creates a new container or updates an existing container on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param container_name: The container Name. Required. + :type container_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param container: The container properties. Required. + :type container: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Container. The Container is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Container] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + storage_account_name: str, + container_name: str, + resource_group_name: str, + container: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Container]: + """Creates a new container or updates an existing container on the device. + + Creates a new container or updates an existing container on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param container_name: The container Name. Required. + :type container_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param container: The container properties. Required. + :type container: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Container. The Container is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Container] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + device_name: str, + storage_account_name: str, + container_name: str, + resource_group_name: str, + container: Union[_models.Container, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Container]: + """Creates a new container or updates an existing container on the device. + + Creates a new container or updates an existing container on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param container_name: The container Name. Required. + :type container_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param container: The container properties. Is one of the following types: Container, JSON, + IO[bytes] Required. + :type container: ~azure.mgmt.databoxedge.models.Container or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns Container. The Container is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Container] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Container] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_name, + container=container, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Container, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Container].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Container]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_containers_delete_request( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the container on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param container_name: The container Name. Required. + :type container_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_storage_account( + self, device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Container"]: + """Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device. + + Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Container + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Container] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Container]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_containers_list_by_storage_account_request( + device_name=device_name, + storage_account_name=storage_account_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Container], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _refresh_initial( + self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_containers_refresh_request( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_refresh( + self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Refreshes the container metadata with the data from the cloud. + + Refreshes the container metadata with the data from the cloud. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param container_name: The container Name. Required. + :type container_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._refresh_initial( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class TriggersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`triggers` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Trigger: + """Get a specific trigger by name. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The trigger name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Trigger. The Trigger is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Trigger + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Trigger] = kwargs.pop("cls", None) + + _request = build_triggers_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Trigger, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + device_name: str, + name: str, + resource_group_name: str, + trigger: Union[_models.Trigger, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(trigger, (IOBase, bytes)): + _content = trigger + else: + _content = json.dumps(trigger, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_triggers_create_or_update_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + trigger: _models.Trigger, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Trigger]: + """Creates or updates a trigger. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The trigger name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param trigger: The trigger. Required. + :type trigger: ~azure.mgmt.databoxedge.models.Trigger + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Trigger. The Trigger is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Trigger] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + trigger: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Trigger]: + """Creates or updates a trigger. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The trigger name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param trigger: The trigger. Required. + :type trigger: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Trigger. The Trigger is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Trigger] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + trigger: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Trigger]: + """Creates or updates a trigger. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The trigger name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param trigger: The trigger. Required. + :type trigger: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Trigger. The Trigger is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Trigger] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + trigger: Union[_models.Trigger, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Trigger]: + """Creates or updates a trigger. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The trigger name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param trigger: The trigger. Is one of the following types: Trigger, JSON, IO[bytes] Required. + :type trigger: ~azure.mgmt.databoxedge.models.Trigger or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns Trigger. The Trigger is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Trigger] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Trigger] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + trigger=trigger, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Trigger, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Trigger].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Trigger]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_triggers_delete_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the trigger on the gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The trigger name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, *, filter: Optional[str] = None, **kwargs: Any + ) -> AsyncItemPaged["_models.Trigger"]: + """Lists all the triggers configured in the device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword filter: Specify $filter='CustomContextTag eq ' to filter on custom context tag + property. Default value is None. + :paramtype filter: str + :return: An iterator like instance of Trigger + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Trigger] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Trigger]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_triggers_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + filter=filter, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Trigger], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class UsersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`users` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.User: + """Gets the properties of the specified user. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The user name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: User. The User is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.User + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.User] = kwargs.pop("cls", None) + + _request = build_users_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.User, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + device_name: str, + name: str, + resource_group_name: str, + user: Union[_models.User, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(user, (IOBase, bytes)): + _content = user + else: + _content = json.dumps(user, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_users_create_or_update_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + user: _models.User, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.User]: + """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. Required. + :type device_name: str + :param name: The user name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param user: The user details. Required. + :type user: ~azure.mgmt.databoxedge.models.User + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns User. The User is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.User] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + user: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.User]: + """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. Required. + :type device_name: str + :param name: The user name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param user: The user details. Required. + :type user: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns User. The User is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.User] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + user: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.User]: + """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. Required. + :type device_name: str + :param name: The user name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param user: The user details. Required. + :type user: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns User. The User is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.User] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + user: Union[_models.User, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.User]: + """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. Required. + :type device_name: str + :param name: The user name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param user: The user details. Is one of the following types: User, JSON, IO[bytes] Required. + :type user: ~azure.mgmt.databoxedge.models.User or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns User. The User is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.User] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.User] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + user=user, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.User, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.User].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.User]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_users_delete_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the user on a databox edge/gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The user name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, *, filter: Optional[str] = None, **kwargs: Any + ) -> AsyncItemPaged["_models.User"]: + """Gets all the users registered on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword filter: Specify $filter='Type eq ' to filter on user type property. Default + value is None. + :paramtype filter: str + :return: An iterator like instance of User + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.User] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.User]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_users_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + filter=filter, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.User], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class DeviceCapacityCheckOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`device_capacity_check` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _check_resource_creation_feasibility_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + device_capacity_request_info: Union[_models.DeviceCapacityRequestInfo, JSON, IO[bytes]], + *, + capacity_name: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(device_capacity_request_info, (IOBase, bytes)): + _content = device_capacity_request_info + else: + _content = json.dumps(device_capacity_request_info, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_device_capacity_check_check_resource_creation_feasibility_request( + resource_group_name=resource_group_name, + device_name=device_name, + subscription_id=self._config.subscription_id, + capacity_name=capacity_name, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_check_resource_creation_feasibility( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + device_capacity_request_info: _models.DeviceCapacityRequestInfo, + *, + capacity_name: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Posts the device capacity request info to check feasibility. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param device_capacity_request_info: The device capacity request info. Required. + :type device_capacity_request_info: ~azure.mgmt.databoxedge.models.DeviceCapacityRequestInfo + :keyword capacity_name: The capacity name. Default value is None. + :paramtype capacity_name: str + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_check_resource_creation_feasibility( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + device_capacity_request_info: JSON, + *, + capacity_name: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Posts the device capacity request info to check feasibility. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param device_capacity_request_info: The device capacity request info. Required. + :type device_capacity_request_info: JSON + :keyword capacity_name: The capacity name. Default value is None. + :paramtype capacity_name: str + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_check_resource_creation_feasibility( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + device_capacity_request_info: IO[bytes], + *, + capacity_name: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Posts the device capacity request info to check feasibility. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param device_capacity_request_info: The device capacity request info. Required. + :type device_capacity_request_info: IO[bytes] + :keyword capacity_name: The capacity name. Default value is None. + :paramtype capacity_name: str + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_check_resource_creation_feasibility( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + device_capacity_request_info: Union[_models.DeviceCapacityRequestInfo, JSON, IO[bytes]], + *, + capacity_name: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Posts the device capacity request info to check feasibility. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param device_capacity_request_info: The device capacity request info. Is one of the following + types: DeviceCapacityRequestInfo, JSON, IO[bytes] Required. + :type device_capacity_request_info: ~azure.mgmt.databoxedge.models.DeviceCapacityRequestInfo or + JSON or IO[bytes] + :keyword capacity_name: The capacity name. Default value is None. + :paramtype capacity_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._check_resource_creation_feasibility_initial( + resource_group_name=resource_group_name, + device_name=device_name, + device_capacity_request_info=device_capacity_request_info, + capacity_name=capacity_name, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class NodesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`nodes` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Node"]: + """Gets all the nodes currently configured under this Data Box Edge device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Node + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Node] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Node]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_nodes_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Node], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class SupportPackagesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`support_packages` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _trigger_support_package_initial( + self, + resource_group_name: str, + device_name: str, + trigger_support_package_request: Union[_models.TriggerSupportPackageRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(trigger_support_package_request, (IOBase, bytes)): + _content = trigger_support_package_request + else: + _content = json.dumps(trigger_support_package_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_support_packages_trigger_support_package_request( + resource_group_name=resource_group_name, + device_name=device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_trigger_support_package( + self, + resource_group_name: str, + device_name: str, + trigger_support_package_request: _models.TriggerSupportPackageRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Triggers support package on the device. + + Triggers support package on the device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param trigger_support_package_request: The trigger support package request object. Required. + :type trigger_support_package_request: + ~azure.mgmt.databoxedge.models.TriggerSupportPackageRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_trigger_support_package( + self, + resource_group_name: str, + device_name: str, + trigger_support_package_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Triggers support package on the device. + + Triggers support package on the device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param trigger_support_package_request: The trigger support package request object. Required. + :type trigger_support_package_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_trigger_support_package( + self, + resource_group_name: str, + device_name: str, + trigger_support_package_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Triggers support package on the device. + + Triggers support package on the device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param trigger_support_package_request: The trigger support package request object. Required. + :type trigger_support_package_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_trigger_support_package( + self, + resource_group_name: str, + device_name: str, + trigger_support_package_request: Union[_models.TriggerSupportPackageRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Triggers support package on the device. + + Triggers support package on the device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param trigger_support_package_request: The trigger support package request object. Is one of + the following types: TriggerSupportPackageRequest, JSON, IO[bytes] Required. + :type trigger_support_package_request: + ~azure.mgmt.databoxedge.models.TriggerSupportPackageRequest or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._trigger_support_package_initial( + resource_group_name=resource_group_name, + device_name=device_name, + trigger_support_package_request=trigger_support_package_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class DeviceCapacityInfoOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`device_capacity_info` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get_device_capacity_info( + self, resource_group_name: str, device_name: str, **kwargs: Any + ) -> _models.DeviceCapacityInfo: + """Gets the properties of the specified device capacity info. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :return: DeviceCapacityInfo. The DeviceCapacityInfo is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DeviceCapacityInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DeviceCapacityInfo] = kwargs.pop("cls", None) + + _request = build_device_capacity_info_get_device_capacity_info_request( + resource_group_name=resource_group_name, + device_name=device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DeviceCapacityInfo, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class MonitoringConfigOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`monitoring_config` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any + ) -> _models.MonitoringMetricConfiguration: + """Gets a metric configuration of a role. + + Gets a metric configuration of a role. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: MonitoringMetricConfiguration. The MonitoringMetricConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MonitoringMetricConfiguration] = kwargs.pop("cls", None) + + _request = build_monitoring_config_get_request( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.MonitoringMetricConfiguration, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + device_name: str, + role_name: str, + resource_group_name: str, + monitoring_metric_configuration: Union[_models.MonitoringMetricConfiguration, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(monitoring_metric_configuration, (IOBase, bytes)): + _content = monitoring_metric_configuration + else: + _content = json.dumps(monitoring_metric_configuration, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_monitoring_config_create_or_update_request( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + device_name: str, + role_name: str, + resource_group_name: str, + monitoring_metric_configuration: _models.MonitoringMetricConfiguration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MonitoringMetricConfiguration]: + """Creates a new metric configuration or updates an existing one for a role. + + Creates a new metric configuration or updates an existing one for a role. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param monitoring_metric_configuration: The metric configuration. Required. + :type monitoring_metric_configuration: + ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns MonitoringMetricConfiguration. The + MonitoringMetricConfiguration is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + role_name: str, + resource_group_name: str, + monitoring_metric_configuration: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MonitoringMetricConfiguration]: + """Creates a new metric configuration or updates an existing one for a role. + + Creates a new metric configuration or updates an existing one for a role. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param monitoring_metric_configuration: The metric configuration. Required. + :type monitoring_metric_configuration: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns MonitoringMetricConfiguration. The + MonitoringMetricConfiguration is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + device_name: str, + role_name: str, + resource_group_name: str, + monitoring_metric_configuration: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.MonitoringMetricConfiguration]: + """Creates a new metric configuration or updates an existing one for a role. + + Creates a new metric configuration or updates an existing one for a role. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param monitoring_metric_configuration: The metric configuration. Required. + :type monitoring_metric_configuration: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns MonitoringMetricConfiguration. The + MonitoringMetricConfiguration is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + device_name: str, + role_name: str, + resource_group_name: str, + monitoring_metric_configuration: Union[_models.MonitoringMetricConfiguration, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.MonitoringMetricConfiguration]: + """Creates a new metric configuration or updates an existing one for a role. + + Creates a new metric configuration or updates an existing one for a role. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param monitoring_metric_configuration: The metric configuration. Is one of the following + types: MonitoringMetricConfiguration, JSON, IO[bytes] Required. + :type monitoring_metric_configuration: + ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns MonitoringMetricConfiguration. The + MonitoringMetricConfiguration is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MonitoringMetricConfiguration] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_name, + monitoring_metric_configuration=monitoring_metric_configuration, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.MonitoringMetricConfiguration, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.MonitoringMetricConfiguration].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.MonitoringMetricConfiguration]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_monitoring_config_delete_request( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """deletes a new metric configuration for a role. + + deletes a new metric configuration for a role. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list( + self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.MonitoringMetricConfiguration"]: + """Lists metric configurations in a role. + + Lists metric configurations in a role. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of MonitoringMetricConfiguration + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.MonitoringMetricConfiguration]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_monitoring_config_list_request( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.MonitoringMetricConfiguration], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class AvailableSkusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s + :attr:`available_skus` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.DataBoxEdgeSku"]: + """List all the available Skus and information related to them. + + List all the available Skus and information related to them. + + :return: An iterator like instance of DataBoxEdgeSku + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.DataBoxEdgeSku] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DataBoxEdgeSku]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_available_skus_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("OperationsList", pipeline_response) - list_of_elem = deserialized.value + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.DataBoxEdgeSku], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) async def get_next(next_link=None): _request = prepare_request(next_link) @@ -124,7 +10273,8 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_operations_status_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_operations_status_operations.py deleted file mode 100644 index b35bc6f2c3c4..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_operations_status_operations.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._operations_status_operations import build_get_request -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class OperationsStatusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`operations_status` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Job: - """Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. - - Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The job name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Job or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Job - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Job] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Job", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_orders_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_orders_operations.py deleted file mode 100644 index a9550124cc6f..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_orders_operations.py +++ /dev/null @@ -1,552 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._orders_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_data_box_edge_device_request, - build_list_dc_access_code_request, -) -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class OrdersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`orders` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Order"]: - """Lists all the orders related to a Data Box Edge/Data Box Gateway device. - - Lists all the orders related to a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either Order or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Order] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OrderList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("OrderList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get(self, device_name: str, resource_group_name: str, **kwargs: Any) -> _models.Order: - """Gets a specific order by name. - - Gets a specific order by name. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Order or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Order - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Order] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Order", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, device_name: str, resource_group_name: str, order: Union[_models.Order, IO[bytes]], **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(order, (IOBase, bytes)): - _content = order - else: - _json = self._serialize.body(order, "Order") - - _request = build_create_or_update_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - device_name: str, - resource_group_name: str, - order: _models.Order, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Order]: - """Creates or updates an order. - - Creates or updates an order. - - :param device_name: The order details of a device. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param order: The order to be created or updated. Required. - :type order: ~azure.mgmt.databoxedge.models.Order - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Order or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Order] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - device_name: str, - resource_group_name: str, - order: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Order]: - """Creates or updates an order. - - Creates or updates an order. - - :param device_name: The order details of a device. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param order: The order to be created or updated. Required. - :type order: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Order or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Order] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, device_name: str, resource_group_name: str, order: Union[_models.Order, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.Order]: - """Creates or updates an order. - - Creates or updates an order. - - :param device_name: The order details of a device. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param order: The order to be created or updated. Is either a Order type or a IO[bytes] type. - Required. - :type order: ~azure.mgmt.databoxedge.models.Order or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Order or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Order] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Order] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - device_name=device_name, - resource_group_name=resource_group_name, - order=order, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Order", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Order].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Order]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial(self, device_name: str, resource_group_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete(self, device_name: str, resource_group_name: str, **kwargs: Any) -> AsyncLROPoller[None]: - """Deletes the order related to the device. - - Deletes the order related to the device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - device_name=device_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace_async - async def list_dc_access_code( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> _models.DCAccessCode: - """Gets the DCAccess Code. - - Gets the DCAccess Code. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: DCAccessCode or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DCAccessCode - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DCAccessCode] = kwargs.pop("cls", None) - - _request = build_list_dc_access_code_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DCAccessCode", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_patch.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_patch.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_roles_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_roles_operations.py deleted file mode 100644 index 99d57249de86..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_roles_operations.py +++ /dev/null @@ -1,501 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._roles_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_data_box_edge_device_request, -) -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class RolesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`roles` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Role"]: - """Lists all the roles configured in a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either Role or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Role] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RoleList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("RoleList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Role: - """Gets a specific role by name. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The role name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Role or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Role - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Role] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Role", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, device_name: str, name: str, resource_group_name: str, role: Union[_models.Role, IO[bytes]], **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(role, (IOBase, bytes)): - _content = role - else: - _json = self._serialize.body(role, "Role") - - _request = build_create_or_update_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - role: _models.Role, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Role]: - """Create or update a role. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The role name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param role: The role properties. Required. - :type role: ~azure.mgmt.databoxedge.models.Role - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Role or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Role] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - role: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Role]: - """Create or update a role. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The role name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param role: The role properties. Required. - :type role: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Role or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Role] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, device_name: str, name: str, resource_group_name: str, role: Union[_models.Role, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.Role]: - """Create or update a role. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The role name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param role: The role properties. Is either a Role type or a IO[bytes] type. Required. - :type role: ~azure.mgmt.databoxedge.models.Role or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Role or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Role] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Role] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - role=role, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Role", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Role].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Role]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the role on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The role name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_shares_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_shares_operations.py deleted file mode 100644 index c9a39fb81938..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_shares_operations.py +++ /dev/null @@ -1,632 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._shares_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_data_box_edge_device_request, - build_refresh_request, -) -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class SharesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`shares` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Share"]: - """Lists all the shares in a Data Box Edge/Data Box Gateway device. - - Lists all the shares in a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either Share or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Share] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ShareList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ShareList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Share: - """Gets a share by name. - - Gets a share by name. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The share name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Share or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Share - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Share] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Share", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - device_name: str, - name: str, - resource_group_name: str, - share: Union[_models.Share, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(share, (IOBase, bytes)): - _content = share - else: - _json = self._serialize.body(share, "Share") - - _request = build_create_or_update_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - share: _models.Share, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Share]: - """Creates a new share or updates an existing share on the device. - - Creates a new share or updates an existing share on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The share name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param share: The share properties. Required. - :type share: ~azure.mgmt.databoxedge.models.Share - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Share or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Share] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - share: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Share]: - """Creates a new share or updates an existing share on the device. - - Creates a new share or updates an existing share on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The share name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param share: The share properties. Required. - :type share: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Share or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Share] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - share: Union[_models.Share, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Share]: - """Creates a new share or updates an existing share on the device. - - Creates a new share or updates an existing share on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The share name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param share: The share properties. Is either a Share type or a IO[bytes] type. Required. - :type share: ~azure.mgmt.databoxedge.models.Share or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Share or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Share] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Share] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - share=share, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Share", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Share].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Share]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the share on the Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The share name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _refresh_initial( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_refresh( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Refreshes the share metadata with the data from the cloud. - - Refreshes the share metadata with the data from the cloud. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The share name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._refresh_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_storage_account_credentials_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_storage_account_credentials_operations.py deleted file mode 100644 index 87df7bf1ab90..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_storage_account_credentials_operations.py +++ /dev/null @@ -1,525 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._storage_account_credentials_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_data_box_edge_device_request, -) -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class StorageAccountCredentialsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`storage_account_credentials` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.StorageAccountCredential"]: - """Gets all the storage account credentials in a Data Box Edge/Data Box Gateway device. - - Gets all the storage account credentials in a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either StorageAccountCredential or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.StorageAccountCredential] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.StorageAccountCredentialList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("StorageAccountCredentialList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> _models.StorageAccountCredential: - """Gets the properties of the specified storage account credential. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The storage account credential name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: StorageAccountCredential or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.StorageAccountCredential - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.StorageAccountCredential] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("StorageAccountCredential", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - device_name: str, - name: str, - resource_group_name: str, - storage_account_credential: Union[_models.StorageAccountCredential, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(storage_account_credential, (IOBase, bytes)): - _content = storage_account_credential - else: - _json = self._serialize.body(storage_account_credential, "StorageAccountCredential") - - _request = build_create_or_update_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - storage_account_credential: _models.StorageAccountCredential, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.StorageAccountCredential]: - """Creates or updates the storage account credential. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The storage account credential name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param storage_account_credential: The storage account credential. Required. - :type storage_account_credential: ~azure.mgmt.databoxedge.models.StorageAccountCredential - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either StorageAccountCredential or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - storage_account_credential: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.StorageAccountCredential]: - """Creates or updates the storage account credential. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The storage account credential name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param storage_account_credential: The storage account credential. Required. - :type storage_account_credential: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either StorageAccountCredential or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - storage_account_credential: Union[_models.StorageAccountCredential, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.StorageAccountCredential]: - """Creates or updates the storage account credential. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The storage account credential name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param storage_account_credential: The storage account credential. Is either a - StorageAccountCredential type or a IO[bytes] type. Required. - :type storage_account_credential: ~azure.mgmt.databoxedge.models.StorageAccountCredential or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either StorageAccountCredential or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.StorageAccountCredential] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - storage_account_credential=storage_account_credential, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("StorageAccountCredential", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.StorageAccountCredential].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.StorageAccountCredential]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the storage account credential. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The storage account credential name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_storage_accounts_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_storage_accounts_operations.py deleted file mode 100644 index 3a134688a78c..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_storage_accounts_operations.py +++ /dev/null @@ -1,527 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._storage_accounts_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_data_box_edge_device_request, -) -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class StorageAccountsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`storage_accounts` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.StorageAccount"]: - """Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. - - Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either StorageAccount or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.StorageAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.StorageAccountList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("StorageAccountList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any - ) -> _models.StorageAccount: - """Gets a StorageAccount by name. - - Gets a StorageAccount by name. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The storage account name. Required. - :type storage_account_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: StorageAccount or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.StorageAccount - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.StorageAccount] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - storage_account_name=storage_account_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("StorageAccount", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - device_name: str, - storage_account_name: str, - resource_group_name: str, - storage_account: Union[_models.StorageAccount, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(storage_account, (IOBase, bytes)): - _content = storage_account - else: - _json = self._serialize.body(storage_account, "StorageAccount") - - _request = build_create_or_update_request( - device_name=device_name, - storage_account_name=storage_account_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - device_name: str, - storage_account_name: str, - resource_group_name: str, - storage_account: _models.StorageAccount, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.StorageAccount]: - """Creates a new StorageAccount or updates an existing StorageAccount on the device. - - Creates a new StorageAccount or updates an existing StorageAccount on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The StorageAccount name. Required. - :type storage_account_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param storage_account: The StorageAccount properties. Required. - :type storage_account: ~azure.mgmt.databoxedge.models.StorageAccount - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either StorageAccount or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.StorageAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - device_name: str, - storage_account_name: str, - resource_group_name: str, - storage_account: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.StorageAccount]: - """Creates a new StorageAccount or updates an existing StorageAccount on the device. - - Creates a new StorageAccount or updates an existing StorageAccount on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The StorageAccount name. Required. - :type storage_account_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param storage_account: The StorageAccount properties. Required. - :type storage_account: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either StorageAccount or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.StorageAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - device_name: str, - storage_account_name: str, - resource_group_name: str, - storage_account: Union[_models.StorageAccount, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.StorageAccount]: - """Creates a new StorageAccount or updates an existing StorageAccount on the device. - - Creates a new StorageAccount or updates an existing StorageAccount on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The StorageAccount name. Required. - :type storage_account_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param storage_account: The StorageAccount properties. Is either a StorageAccount type or a - IO[bytes] type. Required. - :type storage_account: ~azure.mgmt.databoxedge.models.StorageAccount or IO[bytes] - :return: An instance of AsyncLROPoller that returns either StorageAccount or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.StorageAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.StorageAccount] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - device_name=device_name, - storage_account_name=storage_account_name, - resource_group_name=resource_group_name, - storage_account=storage_account, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("StorageAccount", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.StorageAccount].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.StorageAccount]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - storage_account_name=storage_account_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the StorageAccount on the Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The StorageAccount name. Required. - :type storage_account_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - device_name=device_name, - storage_account_name=storage_account_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_triggers_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_triggers_operations.py deleted file mode 100644 index 05e3c5a52ff9..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_triggers_operations.py +++ /dev/null @@ -1,518 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._triggers_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_data_box_edge_device_request, -) -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class TriggersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`triggers` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, filter: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.Trigger"]: - """Lists all the triggers configured in the device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param filter: Specify $filter='CustomContextTag eq :code:``' to filter on custom context - tag property. Default value is None. - :type filter: str - :return: An iterator like instance of either Trigger or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.Trigger] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TriggerList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - filter=filter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("TriggerList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Trigger: - """Get a specific trigger by name. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The trigger name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Trigger or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Trigger - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Trigger] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Trigger", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - device_name: str, - name: str, - resource_group_name: str, - trigger: Union[_models.Trigger, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(trigger, (IOBase, bytes)): - _content = trigger - else: - _json = self._serialize.body(trigger, "Trigger") - - _request = build_create_or_update_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - trigger: _models.Trigger, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Trigger]: - """Creates or updates a trigger. - - :param device_name: Creates or updates a trigger. Required. - :type device_name: str - :param name: The trigger name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param trigger: The trigger. Required. - :type trigger: ~azure.mgmt.databoxedge.models.Trigger - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Trigger or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Trigger] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - trigger: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Trigger]: - """Creates or updates a trigger. - - :param device_name: Creates or updates a trigger. Required. - :type device_name: str - :param name: The trigger name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param trigger: The trigger. Required. - :type trigger: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Trigger or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Trigger] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - trigger: Union[_models.Trigger, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Trigger]: - """Creates or updates a trigger. - - :param device_name: Creates or updates a trigger. Required. - :type device_name: str - :param name: The trigger name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param trigger: The trigger. Is either a Trigger type or a IO[bytes] type. Required. - :type trigger: ~azure.mgmt.databoxedge.models.Trigger or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Trigger or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.Trigger] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Trigger] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - trigger=trigger, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Trigger", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Trigger].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Trigger]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the trigger on the gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The trigger name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_users_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_users_operations.py deleted file mode 100644 index 7119ff6b9ae2..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/aio/operations/_users_operations.py +++ /dev/null @@ -1,509 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._users_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_data_box_edge_device_request, -) -from .._configuration import DataBoxEdgeManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class UsersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.aio.DataBoxEdgeManagementClient`'s - :attr:`users` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, expand: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.User"]: - """Gets all the users registered on a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param expand: Specify $expand=details to populate additional fields related to the resource or - Specify $skipToken=\\ :code:`` to populate the next page in the list. Default value is - None. - :type expand: str - :return: An iterator like instance of either User or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.databoxedge.models.User] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("UserList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.User: - """Gets the properties of the specified user. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The user name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: User or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.User - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.User] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("User", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, device_name: str, name: str, resource_group_name: str, user: Union[_models.User, IO[bytes]], **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(user, (IOBase, bytes)): - _content = user - else: - _json = self._serialize.body(user, "User") - - _request = build_create_or_update_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - user: _models.User, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.User]: - """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. Required. - :type device_name: str - :param name: The user name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param user: The user details. Required. - :type user: ~azure.mgmt.databoxedge.models.User - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either User or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.User] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - user: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.User]: - """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. Required. - :type device_name: str - :param name: The user name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param user: The user details. Required. - :type user: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either User or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.User] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, device_name: str, name: str, resource_group_name: str, user: Union[_models.User, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.User]: - """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. Required. - :type device_name: str - :param name: The user name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param user: The user details. Is either a User type or a IO[bytes] type. Required. - :type user: ~azure.mgmt.databoxedge.models.User or IO[bytes] - :return: An instance of AsyncLROPoller that returns either User or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.databoxedge.models.User] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.User] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - user=user, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("User", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.User].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.User]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the user on a databox edge/gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The user name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/__init__.py index 44ee704a4c25..b4730665c95e 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/__init__.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -13,37 +13,52 @@ from ._patch import * # pylint: disable=unused-wildcard-import -from ._models_py3 import ( # type: ignore +from ._models import ( # type: ignore ARMBaseModel, Addon, - AddonList, Address, Alert, AlertErrorDetails, - AlertList, + AlertProperties, ArcAddon, + ArcAddonProperties, AsymmetricEncryptedSecret, Authentication, AzureContainerInfo, BandwidthSchedule, - BandwidthSchedulesList, + BandwidthScheduleProperties, ClientAccessRight, CloudEdgeManagementRole, + CloudEdgeManagementRoleProperties, + CloudError, CloudErrorBody, + ClusterCapacityViewData, + ClusterGpuCapacity, + ClusterMemoryCapacity, + ClusterStorageViewData, CniConfig, ComputeResource, ContactDetails, Container, - ContainerList, + ContainerProperties, DCAccessCode, + DCAccessCodeProperties, DataBoxEdgeDevice, DataBoxEdgeDeviceExtendedInfo, DataBoxEdgeDeviceExtendedInfoPatch, - DataBoxEdgeDeviceList, + DataBoxEdgeDeviceExtendedInfoProperties, DataBoxEdgeDevicePatch, - DataBoxEdgeMoveRequest, + DataBoxEdgeDeviceProperties, + DataBoxEdgeDevicePropertiesPatch, DataBoxEdgeSku, - DataBoxEdgeSkuList, + DataResidency, + DeviceCapacityInfo, + DeviceCapacityInfoProperties, + DeviceCapacityRequestInfo, + DeviceCapacityRequestInfoProperties, + DiagnosticProactiveLogCollectionSettings, + DiagnosticRemoteSupportSettings, + DiagnosticRemoteSupportSettingsProperties, EdgeProfile, EdgeProfilePatch, EdgeProfileSubscription, @@ -51,91 +66,110 @@ EtcdInfo, FileEventTrigger, FileSourceInfo, + FileTriggerProperties, GenerateCertResponse, + HostCapacity, ImageRepositoryCredential, IoTAddon, + IoTAddonProperties, IoTDeviceInfo, IoTEdgeAgentInfo, IoTRole, + IoTRoleProperties, Ipv4Config, Ipv6Config, Job, JobErrorDetails, JobErrorItem, + JobProperties, KubernetesClusterInfo, KubernetesIPConfiguration, KubernetesRole, KubernetesRoleCompute, KubernetesRoleNetwork, + KubernetesRoleProperties, KubernetesRoleResources, KubernetesRoleStorage, KubernetesRoleStorageClassInfo, LoadBalancerConfig, MECRole, + MECRoleProperties, MetricConfiguration, MetricCounter, MetricCounterSet, MetricDimension, - MetricDimensionV1, - MetricSpecificationV1, + MetricDimension_V1, + MetricSpecification_V1, MonitoringMetricConfiguration, - MonitoringMetricConfigurationList, + MonitoringMetricConfigurationProperties, MountPointMap, NetworkAdapter, NetworkAdapterPosition, NetworkSettings, + NetworkSettingsProperties, Node, NodeInfo, - NodeList, + NodeProperties, + NumaNodeData, Operation, OperationDisplay, - OperationsList, + OperationProperties, Order, - OrderList, + OrderProperties, OrderStatus, PeriodicTimerEventTrigger, + PeriodicTimerProperties, PeriodicTimerSourceInfo, + ProactiveLogCollectionSettingsProperties, + ProxyResource, + RawCertificateData, RefreshDetails, + RemoteSupportSettings, + Resource, ResourceIdentity, ResourceMoveDetails, - ResourceTypeSku, Role, - RoleList, RoleSinkInfo, Secret, SecuritySettings, + SecuritySettingsProperties, ServiceSpecification, Share, ShareAccessRight, - ShareList, + ShareProperties, Sku, SkuCapability, SkuCost, - SkuInformation, - SkuInformationList, SkuLocationInfo, StorageAccount, StorageAccountCredential, - StorageAccountCredentialList, - StorageAccountList, + StorageAccountCredentialProperties, + StorageAccountProperties, + SubscriptionProperties, SubscriptionRegisteredFeatures, + SupportPackageRequestProperties, SymmetricKey, SystemData, + TrackedResource, TrackingInfo, Trigger, - TriggerList, + TriggerSupportPackageRequest, UpdateDetails, UpdateDownloadProgress, UpdateInstallProgress, UpdateSummary, + UpdateSummaryProperties, UploadCertificateRequest, UploadCertificateResponse, User, UserAccessRight, - UserList, + UserProperties, + VmMemory, + VmPlacementRequestResult, ) -from ._data_box_edge_management_client_enums import ( # type: ignore +from ._enums import ( # type: ignore + AccessLevel, AccountType, AddonState, AddonType, @@ -143,17 +177,20 @@ AuthenticationType, AzureContainerDataFormat, ClientPermissionType, + ClusterWitnessType, ContainerStatus, CreatedByType, DataBoxEdgeDeviceKind, DataBoxEdgeDeviceStatus, DataPolicy, + DataResidencyType, DayOfWeek, DeviceType, DownloadPhase, EncryptionAlgorithm, HostPlatformType, InstallRebootBehavior, + InstallationImpact, JobStatus, JobType, KeyVaultSyncStatus, @@ -173,6 +210,8 @@ OrderState, PlatformType, PosixComplianceStatus, + ProactiveDiagnosticsConsent, + RemoteApplicationType, ResourceMoveStatus, RoleStatus, RoleTypes, @@ -203,34 +242,49 @@ __all__ = [ "ARMBaseModel", "Addon", - "AddonList", "Address", "Alert", "AlertErrorDetails", - "AlertList", + "AlertProperties", "ArcAddon", + "ArcAddonProperties", "AsymmetricEncryptedSecret", "Authentication", "AzureContainerInfo", "BandwidthSchedule", - "BandwidthSchedulesList", + "BandwidthScheduleProperties", "ClientAccessRight", "CloudEdgeManagementRole", + "CloudEdgeManagementRoleProperties", + "CloudError", "CloudErrorBody", + "ClusterCapacityViewData", + "ClusterGpuCapacity", + "ClusterMemoryCapacity", + "ClusterStorageViewData", "CniConfig", "ComputeResource", "ContactDetails", "Container", - "ContainerList", + "ContainerProperties", "DCAccessCode", + "DCAccessCodeProperties", "DataBoxEdgeDevice", "DataBoxEdgeDeviceExtendedInfo", "DataBoxEdgeDeviceExtendedInfoPatch", - "DataBoxEdgeDeviceList", + "DataBoxEdgeDeviceExtendedInfoProperties", "DataBoxEdgeDevicePatch", - "DataBoxEdgeMoveRequest", + "DataBoxEdgeDeviceProperties", + "DataBoxEdgeDevicePropertiesPatch", "DataBoxEdgeSku", - "DataBoxEdgeSkuList", + "DataResidency", + "DeviceCapacityInfo", + "DeviceCapacityInfoProperties", + "DeviceCapacityRequestInfo", + "DeviceCapacityRequestInfoProperties", + "DiagnosticProactiveLogCollectionSettings", + "DiagnosticRemoteSupportSettings", + "DiagnosticRemoteSupportSettingsProperties", "EdgeProfile", "EdgeProfilePatch", "EdgeProfileSubscription", @@ -238,88 +292,107 @@ "EtcdInfo", "FileEventTrigger", "FileSourceInfo", + "FileTriggerProperties", "GenerateCertResponse", + "HostCapacity", "ImageRepositoryCredential", "IoTAddon", + "IoTAddonProperties", "IoTDeviceInfo", "IoTEdgeAgentInfo", "IoTRole", + "IoTRoleProperties", "Ipv4Config", "Ipv6Config", "Job", "JobErrorDetails", "JobErrorItem", + "JobProperties", "KubernetesClusterInfo", "KubernetesIPConfiguration", "KubernetesRole", "KubernetesRoleCompute", "KubernetesRoleNetwork", + "KubernetesRoleProperties", "KubernetesRoleResources", "KubernetesRoleStorage", "KubernetesRoleStorageClassInfo", "LoadBalancerConfig", "MECRole", + "MECRoleProperties", "MetricConfiguration", "MetricCounter", "MetricCounterSet", "MetricDimension", - "MetricDimensionV1", - "MetricSpecificationV1", + "MetricDimension_V1", + "MetricSpecification_V1", "MonitoringMetricConfiguration", - "MonitoringMetricConfigurationList", + "MonitoringMetricConfigurationProperties", "MountPointMap", "NetworkAdapter", "NetworkAdapterPosition", "NetworkSettings", + "NetworkSettingsProperties", "Node", "NodeInfo", - "NodeList", + "NodeProperties", + "NumaNodeData", "Operation", "OperationDisplay", - "OperationsList", + "OperationProperties", "Order", - "OrderList", + "OrderProperties", "OrderStatus", "PeriodicTimerEventTrigger", + "PeriodicTimerProperties", "PeriodicTimerSourceInfo", + "ProactiveLogCollectionSettingsProperties", + "ProxyResource", + "RawCertificateData", "RefreshDetails", + "RemoteSupportSettings", + "Resource", "ResourceIdentity", "ResourceMoveDetails", - "ResourceTypeSku", "Role", - "RoleList", "RoleSinkInfo", "Secret", "SecuritySettings", + "SecuritySettingsProperties", "ServiceSpecification", "Share", "ShareAccessRight", - "ShareList", + "ShareProperties", "Sku", "SkuCapability", "SkuCost", - "SkuInformation", - "SkuInformationList", "SkuLocationInfo", "StorageAccount", "StorageAccountCredential", - "StorageAccountCredentialList", - "StorageAccountList", + "StorageAccountCredentialProperties", + "StorageAccountProperties", + "SubscriptionProperties", "SubscriptionRegisteredFeatures", + "SupportPackageRequestProperties", "SymmetricKey", "SystemData", + "TrackedResource", "TrackingInfo", "Trigger", - "TriggerList", + "TriggerSupportPackageRequest", "UpdateDetails", "UpdateDownloadProgress", "UpdateInstallProgress", "UpdateSummary", + "UpdateSummaryProperties", "UploadCertificateRequest", "UploadCertificateResponse", "User", "UserAccessRight", - "UserList", + "UserProperties", + "VmMemory", + "VmPlacementRequestResult", + "AccessLevel", "AccountType", "AddonState", "AddonType", @@ -327,17 +400,20 @@ "AuthenticationType", "AzureContainerDataFormat", "ClientPermissionType", + "ClusterWitnessType", "ContainerStatus", "CreatedByType", "DataBoxEdgeDeviceKind", "DataBoxEdgeDeviceStatus", "DataPolicy", + "DataResidencyType", "DayOfWeek", "DeviceType", "DownloadPhase", "EncryptionAlgorithm", "HostPlatformType", "InstallRebootBehavior", + "InstallationImpact", "JobStatus", "JobType", "KeyVaultSyncStatus", @@ -357,6 +433,8 @@ "OrderState", "PlatformType", "PosixComplianceStatus", + "ProactiveDiagnosticsConsent", + "RemoteApplicationType", "ResourceMoveStatus", "RoleStatus", "RoleTypes", diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_data_box_edge_management_client_enums.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_enums.py similarity index 87% rename from sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_data_box_edge_management_client_enums.py rename to sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_enums.py index 81c785c3710d..deacebe818e1 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_data_box_edge_management_client_enums.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_enums.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -10,6 +10,15 @@ from azure.core import CaseInsensitiveEnumMeta +class AccessLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Access level allowed for this remote application type.""" + + NONE = "None" + READ_ONLY = "ReadOnly" + READ_WRITE = "ReadWrite" + FULL_ACCESS = "FullAccess" + + class AccountType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Type of storage accessed on the storage account.""" @@ -67,6 +76,14 @@ class ClientPermissionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): READ_WRITE = "ReadWrite" +class ClusterWitnessType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Cluster Witness Type.""" + + NONE = "None" + CLOUD = "Cloud" + FILE_SHARE = "FileShare" + + class ContainerStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Current status of the container.""" @@ -78,16 +95,20 @@ class ContainerStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of identity that created the resource.""" + """The kind of entity that created the resource.""" USER = "User" + """The entity was created by a user.""" APPLICATION = "Application" + """The entity was created by an application.""" MANAGED_IDENTITY = "ManagedIdentity" + """The entity was created by a managed identity.""" KEY = "Key" + """The entity was created by a key.""" class DataBoxEdgeDeviceKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The etag for the devices.""" + """The kind of the device.""" AZURE_DATA_BOX_GATEWAY = "AzureDataBoxGateway" AZURE_STACK_EDGE = "AzureStackEdge" @@ -114,8 +135,15 @@ class DataPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): LOCAL = "Local" +class DataResidencyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """DataResidencyType enum.""" + + GEO_ZONE_REPLICATION = "GeoZoneReplication" + ZONE_REPLICATION = "ZoneReplication" + + class DayOfWeek(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """DayOfWeek.""" + """Type of DayOfWeek.""" SUNDAY = "Sunday" MONDAY = "Monday" @@ -156,6 +184,14 @@ class HostPlatformType(str, Enum, metaclass=CaseInsensitiveEnumMeta): LINUX_VM = "LinuxVM" +class InstallationImpact(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Impact of Installing an updateType.""" + + NONE = "None" + DEVICE_REBOOTED = "DeviceRebooted" + KUBERNETES_WORKLOADS_DOWN = "KubernetesWorkloadsDown" + + class InstallRebootBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Indicates if updates are available and at least one of the updates needs a reboot.""" @@ -353,6 +389,22 @@ class PosixComplianceStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): DISABLED = "Disabled" +class ProactiveDiagnosticsConsent(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Proactive diagnostic collection consent flag.""" + + ENABLED = "Enabled" + DISABLED = "Disabled" + + +class RemoteApplicationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Remote application type.""" + + POWERSHELL = "Powershell" + WAC = "WAC" + LOCAL_UI = "LocalUI" + ALL_APPLICATIONS = "AllApplications" + + class ResourceMoveStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Denotes whether move operation is in progress.""" @@ -369,7 +421,7 @@ class RoleStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): class RoleTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """RoleTypes.""" + """Type of RoleTypes.""" IOT = "IOT" ASA = "ASA" @@ -406,7 +458,7 @@ class ShareStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ShipmentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """ShipmentType.""" + """Type of ShipmentType.""" NOT_APPLICABLE = "NotApplicable" SHIPPED_TO_CUSTOMER = "ShippedToCustomer" @@ -440,14 +492,18 @@ class SkuName(str, Enum, metaclass=CaseInsensitiveEnumMeta): 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_64_1VPU_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" + EP2_256_2T4_W = "EP2_256_2T4_W" EDGE_MR_MINI = "EdgeMR_Mini" RCA_SMALL = "RCA_Small" RCA_LARGE = "RCA_Large" RDC = "RDC" MANAGEMENT = "Management" + EP2_64_MX1_W = "EP2_64_Mx1_W" + EP2_128_GPU1_MX1_W = "EP2_128_GPU1_Mx1_W" + EP2_256_GPU2_MX1 = "EP2_256_GPU2_Mx1" + EDGE_MR_TCP = "EdgeMR_TCP" class SkuSignupOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -488,7 +544,7 @@ class StorageAccountStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): class SubscriptionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """SubscriptionState.""" + """Type of SubscriptionState.""" REGISTERED = "Registered" WARNED = "Warned" @@ -498,16 +554,16 @@ class SubscriptionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): class TimeGrain(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """TimeGrain.""" - - PT1_M = "PT1M" - PT5_M = "PT5M" - PT15_M = "PT15M" - PT30_M = "PT30M" - PT1_H = "PT1H" - PT6_H = "PT6H" - PT12_H = "PT12H" - PT1_D = "PT1D" + """Type of TimeGrain.""" + + PT1M = "PT1M" + PT5M = "PT5M" + PT15M = "PT15M" + PT30M = "PT30M" + PT1H = "PT1H" + PT6H = "PT6H" + PT12H = "PT12H" + PT1D = "PT1D" class TriggerEventType(str, Enum, metaclass=CaseInsensitiveEnumMeta): diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_models.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_models.py new file mode 100644 index 000000000000..27f1f8ea2992 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_models.py @@ -0,0 +1,7605 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=useless-super-delegation + +import datetime +from typing import Any, Literal, Mapping, Optional, TYPE_CHECKING, Union, overload + +from .._utils.model_base import Model as _Model, rest_discriminator, rest_field +from ._enums import AddonType, RoleTypes, TriggerEventType + +if TYPE_CHECKING: + from .. import models as _models + + +class Resource(_Model): + """Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" + name: Optional[str] = rest_field(visibility=["read"]) + """The name of the resource.""" + type: Optional[str] = rest_field(visibility=["read"]) + """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or + \"Microsoft.Storage/storageAccounts\".""" + system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"]) + """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" + + +class ProxyResource(Resource): + """Proxy Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + """ + + +class Addon(ProxyResource): + """Role Addon. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + ArcAddon, IoTAddon + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar kind: Addon type. Known values are: "IotEdge" and "ArcForKubernetes". + :vartype kind: str or ~azure.mgmt.databoxedge.models.AddonType + """ + + __mapping__: dict[str, _Model] = {} + kind: str = rest_discriminator(name="kind", visibility=["read", "create"]) + """Addon type. Known values are: \"IotEdge\" and \"ArcForKubernetes\".""" + + @overload + def __init__( + self, + *, + kind: str = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Address(_Model): + """The shipping address of the customer. + + :ivar address_line1: The address line1. + :vartype address_line1: str + :ivar address_line2: The address line2. + :vartype address_line2: str + :ivar address_line3: The address line3. + :vartype address_line3: str + :ivar postal_code: The postal code. + :vartype postal_code: str + :ivar city: The city name. + :vartype city: str + :ivar state: The state name. + :vartype state: str + :ivar country: The country name. Required. + :vartype country: str + """ + + address_line1: Optional[str] = rest_field( + name="addressLine1", visibility=["read", "create", "update", "delete", "query"] + ) + """The address line1.""" + address_line2: Optional[str] = rest_field( + name="addressLine2", visibility=["read", "create", "update", "delete", "query"] + ) + """The address line2.""" + address_line3: Optional[str] = rest_field( + name="addressLine3", visibility=["read", "create", "update", "delete", "query"] + ) + """The address line3.""" + postal_code: Optional[str] = rest_field( + name="postalCode", visibility=["read", "create", "update", "delete", "query"] + ) + """The postal code.""" + city: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The city name.""" + state: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The state name.""" + country: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The country name. Required.""" + + @overload + def __init__( + self, + *, + country: str, + address_line1: Optional[str] = None, + address_line2: Optional[str] = None, + address_line3: Optional[str] = None, + postal_code: Optional[str] = None, + city: Optional[str] = None, + state: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Alert(ProxyResource): + """Alert on the data box edge/gateway device. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: Properties of alert. + :vartype properties: ~azure.mgmt.databoxedge.models.AlertProperties + """ + + properties: Optional["_models.AlertProperties"] = rest_field(visibility=["read"]) + """Properties of alert.""" + + __flattened_items = [ + "title", + "alert_type", + "appeared_at_date_time", + "recommendation", + "severity", + "error_details", + "detailed_information", + ] + + +class AlertErrorDetails(_Model): + """Error details for the alert. + + :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 + """ + + error_code: Optional[str] = rest_field(name="errorCode", visibility=["read"]) + """Error code.""" + error_message: Optional[str] = rest_field(name="errorMessage", visibility=["read"]) + """Error Message.""" + occurrences: Optional[int] = rest_field(visibility=["read"]) + """Number of occurrences.""" + + +class AlertProperties(_Model): + """Properties of alert. + + :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.datetime + :ivar recommendation: Alert recommendation. + :vartype recommendation: str + :ivar severity: Severity of the alert. Known values are: "Informational", "Warning", and + "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] + """ + + title: Optional[str] = rest_field(visibility=["read"]) + """Alert title.""" + alert_type: Optional[str] = rest_field(name="alertType", visibility=["read"]) + """Alert type.""" + appeared_at_date_time: Optional[datetime.datetime] = rest_field( + name="appearedAtDateTime", visibility=["read"], format="rfc3339" + ) + """UTC time when the alert appeared.""" + recommendation: Optional[str] = rest_field(visibility=["read"]) + """Alert recommendation.""" + severity: Optional[Union[str, "_models.AlertSeverity"]] = rest_field(visibility=["read"]) + """Severity of the alert. Known values are: \"Informational\", \"Warning\", and \"Critical\".""" + error_details: Optional["_models.AlertErrorDetails"] = rest_field(name="errorDetails", visibility=["read"]) + """Error details of the alert.""" + detailed_information: Optional[dict[str, str]] = rest_field(name="detailedInformation", visibility=["read"]) + """Alert details.""" + + +class ArcAddon(Addon, discriminator="ArcForKubernetes"): + """Arc Addon. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: Properties specific to Arc addon. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.ArcAddonProperties + :ivar kind: Addon type. Required. + :vartype kind: str or ~azure.mgmt.databoxedge.models.ARC_FOR_KUBERNETES + """ + + properties: "_models.ArcAddonProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Properties specific to Arc addon. Required.""" + kind: Literal[AddonType.ARC_FOR_KUBERNETES] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Addon type. Required.""" + + __flattened_items = [ + "subscription_id", + "resource_group_name", + "resource_name", + "resource_location", + "version", + "host_platform", + "host_platform_type", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + properties: "_models.ArcAddonProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ArcAddonProperties(_Model): + """Arc addon properties. + + :ivar subscription_id: Arc resource subscription Id. Required. + :vartype subscription_id: str + :ivar resource_group_name: Arc resource group name. Required. + :vartype resource_group_name: str + :ivar resource_name: Arc resource Name. Required. + :vartype resource_name: str + :ivar resource_location: Arc resource location. Required. + :vartype resource_location: str + :ivar version: Arc resource version. + :vartype version: str + :ivar host_platform: Host OS supported by the Arc addon. Known values are: "Windows" and + "Linux". + :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar host_platform_type: Platform where the runtime is hosted. Known values are: + "KubernetesCluster" and "LinuxVM". + :vartype host_platform_type: str or ~azure.mgmt.databoxedge.models.HostPlatformType + :ivar provisioning_state: Addon Provisioning State. Known values are: "Invalid", "Creating", + "Created", "Updating", "Reconfiguring", "Failed", and "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.databoxedge.models.AddonState + """ + + subscription_id: str = rest_field(name="subscriptionId", visibility=["read", "create", "update", "delete", "query"]) + """Arc resource subscription Id. Required.""" + resource_group_name: str = rest_field( + name="resourceGroupName", visibility=["read", "create", "update", "delete", "query"] + ) + """Arc resource group name. Required.""" + resource_name: str = rest_field(name="resourceName", visibility=["read", "create", "update", "delete", "query"]) + """Arc resource Name. Required.""" + resource_location: str = rest_field( + name="resourceLocation", visibility=["read", "create", "update", "delete", "query"] + ) + """Arc resource location. Required.""" + version: Optional[str] = rest_field(visibility=["read"]) + """Arc resource version.""" + host_platform: Optional[Union[str, "_models.PlatformType"]] = rest_field(name="hostPlatform", visibility=["read"]) + """Host OS supported by the Arc addon. Known values are: \"Windows\" and \"Linux\".""" + host_platform_type: Optional[Union[str, "_models.HostPlatformType"]] = rest_field( + name="hostPlatformType", visibility=["read"] + ) + """Platform where the runtime is hosted. Known values are: \"KubernetesCluster\" and \"LinuxVM\".""" + provisioning_state: Optional[Union[str, "_models.AddonState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Addon Provisioning State. Known values are: \"Invalid\", \"Creating\", \"Created\", + \"Updating\", \"Reconfiguring\", \"Failed\", and \"Deleting\".""" + + @overload + def __init__( + self, + *, + subscription_id: str, + resource_group_name: str, + resource_name: str, + resource_location: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ARMBaseModel(_Model): + """Represents the base class for all object models. + + :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 + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """The path ID that uniquely identifies the object.""" + name: Optional[str] = rest_field(visibility=["read"]) + """The object name.""" + type: Optional[str] = rest_field(visibility=["read"]) + """The hierarchical type of the object.""" + + +class AsymmetricEncryptedSecret(_Model): + """Represent the secrets intended for encryption with asymmetric key pair. + + :ivar value: The value of the secret. Required. + :vartype value: str + :ivar encryption_cert_thumbprint: Thumbprint certificate used to encrypt \\"Value\\". If the + value is unencrypted, it will be null. + :vartype encryption_cert_thumbprint: str + :ivar encryption_algorithm: The algorithm used to encrypt "Value". Required. Known values are: + "None", "AES256", and "RSAES_PKCS1_v_1_5". + :vartype encryption_algorithm: str or ~azure.mgmt.databoxedge.models.EncryptionAlgorithm + """ + + value: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The value of the secret. Required.""" + encryption_cert_thumbprint: Optional[str] = rest_field( + name="encryptionCertThumbprint", visibility=["read", "create", "update", "delete", "query"] + ) + """Thumbprint certificate used to encrypt \\"Value\\". If the value is unencrypted, it will be + null.""" + encryption_algorithm: Union[str, "_models.EncryptionAlgorithm"] = rest_field( + name="encryptionAlgorithm", visibility=["read", "create", "update", "delete", "query"] + ) + """The algorithm used to encrypt \"Value\". Required. Known values are: \"None\", \"AES256\", and + \"RSAES_PKCS1_v_1_5\".""" + + @overload + def __init__( + self, + *, + value: str, + encryption_algorithm: Union[str, "_models.EncryptionAlgorithm"], + encryption_cert_thumbprint: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Authentication(_Model): + """Authentication mechanism for IoT devices. + + :ivar symmetric_key: Symmetric key for authentication. + :vartype symmetric_key: ~azure.mgmt.databoxedge.models.SymmetricKey + """ + + symmetric_key: Optional["_models.SymmetricKey"] = rest_field( + name="symmetricKey", visibility=["read", "create", "update", "delete", "query"] + ) + """Symmetric key for authentication.""" + + @overload + def __init__( + self, + *, + symmetric_key: Optional["_models.SymmetricKey"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AzureContainerInfo(_Model): + """Azure container mapping of the endpoint. + + :ivar storage_account_credential_id: ID of the storage account credential used to access + storage. Required. + :vartype storage_account_credential_id: str + :ivar container_name: Container name (Based on the data format specified, this represents the + name of Azure Files/Page blob/Block blob). Required. + :vartype container_name: str + :ivar data_format: Storage format used for the file represented by the share. Required. Known + values are: "BlockBlob", "PageBlob", and "AzureFile". + :vartype data_format: str or ~azure.mgmt.databoxedge.models.AzureContainerDataFormat + """ + + storage_account_credential_id: str = rest_field( + name="storageAccountCredentialId", visibility=["read", "create", "update", "delete", "query"] + ) + """ID of the storage account credential used to access storage. Required.""" + container_name: str = rest_field(name="containerName", visibility=["read", "create", "update", "delete", "query"]) + """Container name (Based on the data format specified, this represents the name of Azure + Files/Page blob/Block blob). Required.""" + data_format: Union[str, "_models.AzureContainerDataFormat"] = rest_field( + name="dataFormat", visibility=["read", "create", "update", "delete", "query"] + ) + """Storage format used for the file represented by the share. Required. Known values are: + \"BlockBlob\", \"PageBlob\", and \"AzureFile\".""" + + @overload + def __init__( + self, + *, + storage_account_credential_id: str, + container_name: str, + data_format: Union[str, "_models.AzureContainerDataFormat"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BandwidthSchedule(ProxyResource): + """The bandwidth schedule details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: The properties of the bandwidth schedule. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.BandwidthScheduleProperties + """ + + properties: "_models.BandwidthScheduleProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the bandwidth schedule. Required.""" + + __flattened_items = ["start", "stop", "rate_in_mbps", "days"] + + @overload + def __init__( + self, + *, + properties: "_models.BandwidthScheduleProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class BandwidthScheduleProperties(_Model): + """The properties of the bandwidth schedule. + + :ivar start: The start time of the schedule in UTC. Required. + :vartype start: str + :ivar stop: The stop time of the schedule in UTC. Required. + :vartype stop: str + :ivar rate_in_mbps: The bandwidth rate in Mbps. Required. + :vartype rate_in_mbps: int + :ivar days: The days of the week when this schedule is applicable. Required. + :vartype days: list[str or ~azure.mgmt.databoxedge.models.DayOfWeek] + """ + + start: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The start time of the schedule in UTC. Required.""" + stop: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The stop time of the schedule in UTC. Required.""" + rate_in_mbps: int = rest_field(name="rateInMbps", visibility=["read", "create", "update", "delete", "query"]) + """The bandwidth rate in Mbps. Required.""" + days: list[Union[str, "_models.DayOfWeek"]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The days of the week when this schedule is applicable. Required.""" + + @overload + def __init__( + self, + *, + start: str, + stop: str, + rate_in_mbps: int, + days: list[Union[str, "_models.DayOfWeek"]], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ClientAccessRight(_Model): + """The mapping between a particular client IP and the type of access client has on the NFS share. + + :ivar client: IP of the client. Required. + :vartype client: str + :ivar access_permission: Type of access to be allowed for the client. Required. Known values + are: "NoAccess", "ReadOnly", and "ReadWrite". + :vartype access_permission: str or ~azure.mgmt.databoxedge.models.ClientPermissionType + """ + + client: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """IP of the client. Required.""" + access_permission: Union[str, "_models.ClientPermissionType"] = rest_field( + name="accessPermission", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of access to be allowed for the client. Required. Known values are: \"NoAccess\", + \"ReadOnly\", and \"ReadWrite\".""" + + @overload + def __init__( + self, + *, + client: str, + access_permission: Union[str, "_models.ClientPermissionType"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Role(ProxyResource): + """Compute role. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + CloudEdgeManagementRole, IoTRole, KubernetesRole, MECRole + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar kind: Role type. Known values are: "IOT", "ASA", "Functions", "Cognitive", "MEC", + "CloudEdgeManagement", and "Kubernetes". + :vartype kind: str or ~azure.mgmt.databoxedge.models.RoleTypes + """ + + __mapping__: dict[str, _Model] = {} + kind: str = rest_discriminator(name="kind", visibility=["read", "create"]) + """Role type. Known values are: \"IOT\", \"ASA\", \"Functions\", \"Cognitive\", \"MEC\", + \"CloudEdgeManagement\", and \"Kubernetes\".""" + + @overload + def __init__( + self, + *, + kind: str = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CloudEdgeManagementRole(Role, discriminator="CloudEdgeManagement"): + """The preview of Virtual Machine Cloud Management from the Azure supports deploying and managing + VMs on your Azure Stack Edge device from Azure Portal. + For more information, refer to: + `https://docs.microsoft.com/en-us/azure/databox-online/azure-stack-edge-gpu-virtual-machine-overview + `_ + By using this feature, you agree to the preview legal terms. See the + `https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/ + `_ for additional + details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: Properties specific to CloudEdgeManagementRole role. + :vartype properties: ~azure.mgmt.databoxedge.models.CloudEdgeManagementRoleProperties + :ivar kind: Role type. Required. + :vartype kind: str or ~azure.mgmt.databoxedge.models.CLOUD_EDGE_MANAGEMENT + """ + + properties: Optional["_models.CloudEdgeManagementRoleProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties specific to CloudEdgeManagementRole role.""" + kind: Literal[RoleTypes.CLOUD_EDGE_MANAGEMENT] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Role type. Required.""" + + __flattened_items = ["local_management_status", "edge_profile", "role_status"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.CloudEdgeManagementRoleProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class CloudEdgeManagementRoleProperties(_Model): + """CloudEdgeManagement Role properties. + + :ivar local_management_status: Local Edge Management Status. Known values are: "Enabled" and + "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 + :ivar role_status: Role status. Required. Known values are: "Enabled" and "Disabled". + :vartype role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + local_management_status: Optional[Union[str, "_models.RoleStatus"]] = rest_field( + name="localManagementStatus", visibility=["read"] + ) + """Local Edge Management Status. Known values are: \"Enabled\" and \"Disabled\".""" + edge_profile: Optional["_models.EdgeProfile"] = rest_field(name="edgeProfile", visibility=["read"]) + """Edge Profile of the resource.""" + role_status: Union[str, "_models.RoleStatus"] = rest_field( + name="roleStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Role status. Required. Known values are: \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + role_status: Union[str, "_models.RoleStatus"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CloudError(_Model): + """An error response from the service. + + :ivar error: The error details. + :vartype error: ~azure.mgmt.databoxedge.models.CloudErrorBody + """ + + error: Optional["_models.CloudErrorBody"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error details.""" + + @overload + def __init__( + self, + *, + error: Optional["_models.CloudErrorBody"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CloudErrorBody(_Model): + """An error response from the service. + + :ivar code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :vartype code: str + :ivar message: A message describing the error, intended to be suitable for display in a user + interface. + :vartype message: str + :ivar details: A list of additional details about the error. + :vartype details: list[~azure.mgmt.databoxedge.models.CloudErrorBody] + """ + + code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """An identifier for the error. Codes are invariant and are intended to be consumed + programmatically.""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """A message describing the error, intended to be suitable for display in a user interface.""" + details: Optional[list["_models.CloudErrorBody"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """A list of additional details about the error.""" + + @overload + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + details: Optional[list["_models.CloudErrorBody"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ClusterCapacityViewData(_Model): + """Cluster Compute Data. + + :ivar fqdn: The FQDN of the cluster. + :vartype fqdn: str + :ivar gpu_capacity: The cluster's GPU capacity. + :vartype gpu_capacity: ~azure.mgmt.databoxedge.models.ClusterGpuCapacity + :ivar memory_capacity: The cluster's memory capacity. + :vartype memory_capacity: ~azure.mgmt.databoxedge.models.ClusterMemoryCapacity + :ivar last_refreshed_time: The last time at which the ClusterCapacityViewData was set. + :vartype last_refreshed_time: ~datetime.datetime + :ivar total_provisioned_non_hpn_cores: The total # of vCPUs provisioned by non-HPN VM per + appliance. + :vartype total_provisioned_non_hpn_cores: int + """ + + fqdn: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The FQDN of the cluster.""" + gpu_capacity: Optional["_models.ClusterGpuCapacity"] = rest_field( + name="gpuCapacity", visibility=["read", "create", "update", "delete", "query"] + ) + """The cluster's GPU capacity.""" + memory_capacity: Optional["_models.ClusterMemoryCapacity"] = rest_field( + name="memoryCapacity", visibility=["read", "create", "update", "delete", "query"] + ) + """The cluster's memory capacity.""" + last_refreshed_time: Optional[datetime.datetime] = rest_field( + name="lastRefreshedTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The last time at which the ClusterCapacityViewData was set.""" + total_provisioned_non_hpn_cores: Optional[int] = rest_field( + name="totalProvisionedNonHpnCores", visibility=["read", "create", "update", "delete", "query"] + ) + """The total # of vCPUs provisioned by non-HPN VM per appliance.""" + + @overload + def __init__( + self, + *, + fqdn: Optional[str] = None, + gpu_capacity: Optional["_models.ClusterGpuCapacity"] = None, + memory_capacity: Optional["_models.ClusterMemoryCapacity"] = None, + last_refreshed_time: Optional[datetime.datetime] = None, + total_provisioned_non_hpn_cores: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ClusterGpuCapacity(_Model): + """Cluster GPU Data. + + :ivar gpu_type: The cluster GPU Type. + :vartype gpu_type: str + :ivar gpu_used_units_count: The used GPU units count in the cluster. + :vartype gpu_used_units_count: int + :ivar gpu_free_units_count: The free GPU units count in the cluster. + :vartype gpu_free_units_count: int + :ivar gpu_reserved_for_failover_units_count: The GPU units count reserved for failover in the + cluster. + :vartype gpu_reserved_for_failover_units_count: int + :ivar gpu_total_units_count: The total GPU units count in the cluster. + :vartype gpu_total_units_count: int + """ + + gpu_type: Optional[str] = rest_field(name="gpuType", visibility=["read", "create", "update", "delete", "query"]) + """The cluster GPU Type.""" + gpu_used_units_count: Optional[int] = rest_field( + name="gpuUsedUnitsCount", visibility=["read", "create", "update", "delete", "query"] + ) + """The used GPU units count in the cluster.""" + gpu_free_units_count: Optional[int] = rest_field( + name="gpuFreeUnitsCount", visibility=["read", "create", "update", "delete", "query"] + ) + """The free GPU units count in the cluster.""" + gpu_reserved_for_failover_units_count: Optional[int] = rest_field( + name="gpuReservedForFailoverUnitsCount", visibility=["read", "create", "update", "delete", "query"] + ) + """The GPU units count reserved for failover in the cluster.""" + gpu_total_units_count: Optional[int] = rest_field( + name="gpuTotalUnitsCount", visibility=["read", "create", "update", "delete", "query"] + ) + """The total GPU units count in the cluster.""" + + @overload + def __init__( + self, + *, + gpu_type: Optional[str] = None, + gpu_used_units_count: Optional[int] = None, + gpu_free_units_count: Optional[int] = None, + gpu_reserved_for_failover_units_count: Optional[int] = None, + gpu_total_units_count: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ClusterMemoryCapacity(_Model): + """NodeCapacityInfo defines the required information to determine the placement of a VM. + + :ivar cluster_free_memory_mb: The free memory in the cluster in MB. + :vartype cluster_free_memory_mb: float + :ivar cluster_used_memory_mb: The used memory in the cluster in MB. + :vartype cluster_used_memory_mb: float + :ivar cluster_failover_memory_mb: The failover memory in the cluster in MB. + :vartype cluster_failover_memory_mb: float + :ivar cluster_fragmentation_memory_mb: The fragmentation memory in the cluster in MB. + :vartype cluster_fragmentation_memory_mb: float + :ivar cluster_hyperv_reserve_memory_mb: The memory reserved for Hyper-V in the cluster in MB. + :vartype cluster_hyperv_reserve_memory_mb: float + :ivar cluster_infra_vm_memory_mb: The memory of the Infra VM in the cluster in MB. + :vartype cluster_infra_vm_memory_mb: float + :ivar cluster_total_memory_mb: The total memory in the cluster in MB. + :vartype cluster_total_memory_mb: float + :ivar cluster_non_failover_vm_mb: The non-failover memory in the cluster in MB. + :vartype cluster_non_failover_vm_mb: float + :ivar cluster_memory_used_by_vms_mb: The memory used by VMs in the cluster in MB. + :vartype cluster_memory_used_by_vms_mb: float + """ + + cluster_free_memory_mb: Optional[float] = rest_field( + name="clusterFreeMemoryMb", visibility=["read", "create", "update", "delete", "query"] + ) + """The free memory in the cluster in MB.""" + cluster_used_memory_mb: Optional[float] = rest_field( + name="clusterUsedMemoryMb", visibility=["read", "create", "update", "delete", "query"] + ) + """The used memory in the cluster in MB.""" + cluster_failover_memory_mb: Optional[float] = rest_field( + name="clusterFailoverMemoryMb", visibility=["read", "create", "update", "delete", "query"] + ) + """The failover memory in the cluster in MB.""" + cluster_fragmentation_memory_mb: Optional[float] = rest_field( + name="clusterFragmentationMemoryMb", visibility=["read", "create", "update", "delete", "query"] + ) + """The fragmentation memory in the cluster in MB.""" + cluster_hyperv_reserve_memory_mb: Optional[float] = rest_field( + name="clusterHypervReserveMemoryMb", visibility=["read", "create", "update", "delete", "query"] + ) + """The memory reserved for Hyper-V in the cluster in MB.""" + cluster_infra_vm_memory_mb: Optional[float] = rest_field( + name="clusterInfraVmMemoryMb", visibility=["read", "create", "update", "delete", "query"] + ) + """The memory of the Infra VM in the cluster in MB.""" + cluster_total_memory_mb: Optional[float] = rest_field( + name="clusterTotalMemoryMb", visibility=["read", "create", "update", "delete", "query"] + ) + """The total memory in the cluster in MB.""" + cluster_non_failover_vm_mb: Optional[float] = rest_field( + name="clusterNonFailoverVmMb", visibility=["read", "create", "update", "delete", "query"] + ) + """The non-failover memory in the cluster in MB.""" + cluster_memory_used_by_vms_mb: Optional[float] = rest_field( + name="clusterMemoryUsedByVmsMb", visibility=["read", "create", "update", "delete", "query"] + ) + """The memory used by VMs in the cluster in MB.""" + + @overload + def __init__( + self, + *, + cluster_free_memory_mb: Optional[float] = None, + cluster_used_memory_mb: Optional[float] = None, + cluster_failover_memory_mb: Optional[float] = None, + cluster_fragmentation_memory_mb: Optional[float] = None, + cluster_hyperv_reserve_memory_mb: Optional[float] = None, + cluster_infra_vm_memory_mb: Optional[float] = None, + cluster_total_memory_mb: Optional[float] = None, + cluster_non_failover_vm_mb: Optional[float] = None, + cluster_memory_used_by_vms_mb: Optional[float] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ClusterStorageViewData(_Model): + """Cluster Storage Data. + + :ivar cluster_total_storage_mb: Total storage on the cluster in MB. + :vartype cluster_total_storage_mb: float + :ivar cluster_free_storage_mb: The available or free storage on the cluster in MB. + :vartype cluster_free_storage_mb: float + """ + + cluster_total_storage_mb: Optional[float] = rest_field( + name="clusterTotalStorageMb", visibility=["read", "create", "update", "delete", "query"] + ) + """Total storage on the cluster in MB.""" + cluster_free_storage_mb: Optional[float] = rest_field( + name="clusterFreeStorageMb", visibility=["read", "create", "update", "delete", "query"] + ) + """The available or free storage on the cluster in MB.""" + + @overload + def __init__( + self, + *, + cluster_total_storage_mb: Optional[float] = None, + cluster_free_storage_mb: Optional[float] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CniConfig(_Model): + """Cni configuration. + + :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 + """ + + type: Optional[str] = rest_field(visibility=["read"]) + """Cni type.""" + version: Optional[str] = rest_field(visibility=["read"]) + """Cni version.""" + pod_subnet: Optional[str] = rest_field(name="podSubnet", visibility=["read"]) + """Pod Subnet.""" + service_subnet: Optional[str] = rest_field(name="serviceSubnet", visibility=["read"]) + """Service subnet.""" + + +class ComputeResource(_Model): + """Compute infrastructure Resource. + + :ivar processor_count: Processor count. Required. + :vartype processor_count: int + :ivar memory_in_gb: Memory in GB. Required. + :vartype memory_in_gb: int + """ + + processor_count: int = rest_field(name="processorCount", visibility=["read", "create", "update", "delete", "query"]) + """Processor count. Required.""" + memory_in_gb: int = rest_field(name="memoryInGB", visibility=["read", "create", "update", "delete", "query"]) + """Memory in GB. Required.""" + + @overload + def __init__( + self, + *, + processor_count: int, + memory_in_gb: int, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ContactDetails(_Model): + """Contains all the contact details of the customer. + + :ivar contact_person: The contact person name. Required. + :vartype contact_person: str + :ivar company_name: The name of the company. Required. + :vartype company_name: str + :ivar phone: The phone number. Required. + :vartype phone: str + :ivar email_list: The email list. Required. + :vartype email_list: list[str] + """ + + contact_person: str = rest_field(name="contactPerson", visibility=["read", "create", "update", "delete", "query"]) + """The contact person name. Required.""" + company_name: str = rest_field(name="companyName", visibility=["read", "create", "update", "delete", "query"]) + """The name of the company. Required.""" + phone: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The phone number. Required.""" + email_list: list[str] = rest_field(name="emailList", visibility=["read", "create", "update", "delete", "query"]) + """The email list. Required.""" + + @overload + def __init__( + self, + *, + contact_person: str, + company_name: str, + phone: str, + email_list: list[str], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Container(ProxyResource): + """Represents a container on the Data Box Edge/Gateway device. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: The container properties. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.ContainerProperties + """ + + properties: "_models.ContainerProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The container properties. Required.""" + + __flattened_items = ["container_status", "data_format", "refresh_details", "created_date_time"] + + @overload + def __init__( + self, + *, + properties: "_models.ContainerProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ContainerProperties(_Model): + """The container properties. + + :ivar container_status: Current status of the container. Known values are: "OK", "Offline", + "Unknown", "Updating", and "NeedsAttention". + :vartype container_status: str or ~azure.mgmt.databoxedge.models.ContainerStatus + :ivar data_format: DataFormat for Container. Required. Known values are: "BlockBlob", + "PageBlob", and "AzureFile". + :vartype 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.datetime + """ + + container_status: Optional[Union[str, "_models.ContainerStatus"]] = rest_field( + name="containerStatus", visibility=["read"] + ) + """Current status of the container. Known values are: \"OK\", \"Offline\", \"Unknown\", + \"Updating\", and \"NeedsAttention\".""" + data_format: Union[str, "_models.AzureContainerDataFormat"] = rest_field( + name="dataFormat", visibility=["read", "create", "update", "delete", "query"] + ) + """DataFormat for Container. Required. Known values are: \"BlockBlob\", \"PageBlob\", and + \"AzureFile\".""" + refresh_details: Optional["_models.RefreshDetails"] = rest_field(name="refreshDetails", visibility=["read"]) + """Details of the refresh job on this container.""" + created_date_time: Optional[datetime.datetime] = rest_field( + name="createdDateTime", visibility=["read"], format="rfc3339" + ) + """The UTC time when container got created.""" + + @overload + def __init__( + self, + *, + data_format: Union[str, "_models.AzureContainerDataFormat"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TrackedResource(Resource): + """Tracked Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + location: str = rest_field(visibility=["read", "create"]) + """The geo-location where the resource lives. Required.""" + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DataBoxEdgeDevice(TrackedResource): + """The Data Box Edge/Gateway device. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The properties of the Data Box Edge/Gateway device. + :vartype properties: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceProperties + :ivar sku: The SKU type. + :vartype sku: ~azure.mgmt.databoxedge.models.Sku + :ivar etag: The etag for the devices. + :vartype etag: str + :ivar identity: Msi identity of the resource. + :vartype identity: ~azure.mgmt.databoxedge.models.ResourceIdentity + :ivar kind: The kind of the device. Known values are: "AzureDataBoxGateway", "AzureStackEdge", + "AzureStackHub", and "AzureModularDataCentre". + :vartype kind: str or ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceKind + """ + + properties: Optional["_models.DataBoxEdgeDeviceProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the Data Box Edge/Gateway device.""" + sku: Optional["_models.Sku"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The SKU type.""" + etag: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The etag for the devices.""" + identity: Optional["_models.ResourceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Msi identity of the resource.""" + kind: Optional[Union[str, "_models.DataBoxEdgeDeviceKind"]] = rest_field(visibility=["read"]) + """The kind of the device. Known values are: \"AzureDataBoxGateway\", \"AzureStackEdge\", + \"AzureStackHub\", and \"AzureModularDataCentre\".""" + + __flattened_items = [ + "system_data", + "data_box_edge_device_status", + "serial_number", + "description", + "model_description", + "device_type", + "friendly_name", + "culture", + "device_model", + "device_software_version", + "device_local_capacity", + "time_zone", + "device_hcs_version", + "configured_role_types", + "node_count", + "resource_move_details", + "edge_profile", + "data_residency", + "kubernetes_workload_profile", + ] + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.DataBoxEdgeDeviceProperties"] = None, + sku: Optional["_models.Sku"] = None, + etag: Optional[str] = None, + identity: Optional["_models.ResourceIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DataBoxEdgeDeviceExtendedInfo(ARMBaseModel): + """The extended Info of the Data Box Edge/Gateway device. + + :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 properties: The extended info properties. + :vartype properties: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfoProperties + :ivar system_data: Metadata pertaining to creation and last modification of DataBoxEdgeDevice. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + """ + + properties: Optional["_models.DataBoxEdgeDeviceExtendedInfoProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The extended info properties.""" + system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"]) + """Metadata pertaining to creation and last modification of DataBoxEdgeDevice.""" + + __flattened_items = [ + "encryption_key_thumbprint", + "encryption_key", + "resource_key", + "client_secret_store_id", + "client_secret_store_url", + "channel_integrity_key_name", + "channel_integrity_key_version", + "key_vault_sync_status", + "device_secrets", + "cluster_witness_type", + "file_share_witness_location", + "file_share_witness_username", + "cloud_witness_storage_account_name", + "cloud_witness_container_name", + "cloud_witness_storage_endpoint", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.DataBoxEdgeDeviceExtendedInfoProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DataBoxEdgeDeviceExtendedInfoPatch(_Model): + """The Data Box Edge/Gateway device extended info patch. + + :ivar client_secret_store_id: The Key Vault ARM Id for client secrets. + :vartype client_secret_store_id: str + :ivar client_secret_store_url: The url to access the Client Key Vault. + :vartype client_secret_store_url: str + :ivar channel_integrity_key_name: The name for Channel Integrity Key stored in the Client Key + Vault. + :vartype channel_integrity_key_name: str + :ivar channel_integrity_key_version: The version of Channel Integrity Key stored in the Client + Key Vault. + :vartype channel_integrity_key_version: str + :ivar 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. Known values are: + "KeyVaultSynced", "KeyVaultSyncFailed", "KeyVaultNotConfigured", "KeyVaultSyncPending", + "KeyVaultSyncing", and "KeyVaultNotSynced". + :vartype sync_status: str or ~azure.mgmt.databoxedge.models.KeyVaultSyncStatus + """ + + client_secret_store_id: Optional[str] = rest_field( + name="clientSecretStoreId", visibility=["read", "create", "update", "delete", "query"] + ) + """The Key Vault ARM Id for client secrets.""" + client_secret_store_url: Optional[str] = rest_field( + name="clientSecretStoreUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """The url to access the Client Key Vault.""" + channel_integrity_key_name: Optional[str] = rest_field( + name="channelIntegrityKeyName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name for Channel Integrity Key stored in the Client Key Vault.""" + channel_integrity_key_version: Optional[str] = rest_field( + name="channelIntegrityKeyVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The version of Channel Integrity Key stored in the Client Key Vault.""" + sync_status: Optional[Union[str, "_models.KeyVaultSyncStatus"]] = rest_field( + name="syncStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """For changing or to initiate the resync to key-vault set the status to KeyVaultSyncPending, rest + of the status will not be applicable. Known values are: \"KeyVaultSynced\", + \"KeyVaultSyncFailed\", \"KeyVaultNotConfigured\", \"KeyVaultSyncPending\", + \"KeyVaultSyncing\", and \"KeyVaultNotSynced\".""" + + @overload + def __init__( + self, + *, + client_secret_store_id: Optional[str] = None, + client_secret_store_url: Optional[str] = None, + channel_integrity_key_name: Optional[str] = None, + channel_integrity_key_version: Optional[str] = None, + sync_status: Optional[Union[str, "_models.KeyVaultSyncStatus"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DataBoxEdgeDeviceExtendedInfoProperties(_Model): + """The properties of the Data Box Edge/Gateway device extended info. + + :ivar encryption_key_thumbprint: The digital signature of encrypted certificate. + :vartype encryption_key_thumbprint: str + :ivar encryption_key: The public part of the encryption certificate. Client uses this to + encrypt any secret. + :vartype encryption_key: str + :ivar resource_key: The Resource ID of the Resource. + :vartype resource_key: str + :ivar client_secret_store_id: The Key Vault ARM Id for client secrets. + :vartype client_secret_store_id: str + :ivar client_secret_store_url: The url to access the Client Key Vault. + :vartype client_secret_store_url: str + :ivar channel_integrity_key_name: The name of Channel Integrity Key stored in the Client Key + Vault. + :vartype channel_integrity_key_name: str + :ivar channel_integrity_key_version: The version of Channel Integrity Key stored in the Client + Key Vault. + :vartype channel_integrity_key_version: str + :ivar key_vault_sync_status: Key vault sync status. Known values are: "KeyVaultSynced", + "KeyVaultSyncFailed", "KeyVaultNotConfigured", "KeyVaultSyncPending", "KeyVaultSyncing", and + "KeyVaultNotSynced". + :vartype 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] + :ivar cluster_witness_type: Cluster Witness Type. Known values are: "None", "Cloud", and + "FileShare". + :vartype cluster_witness_type: str or ~azure.mgmt.databoxedge.models.ClusterWitnessType + :ivar file_share_witness_location: The witness location of file share. + :vartype file_share_witness_location: str + :ivar file_share_witness_username: The username of file share. + :vartype file_share_witness_username: str + :ivar cloud_witness_storage_account_name: The Cloud Witness Storage account name. + :vartype cloud_witness_storage_account_name: str + :ivar cloud_witness_container_name: The Container for cloud witness in the storage account. + :vartype cloud_witness_container_name: str + :ivar cloud_witness_storage_endpoint: The Azure service endpoint of the cloud witness storage + account. + :vartype cloud_witness_storage_endpoint: str + """ + + encryption_key_thumbprint: Optional[str] = rest_field( + name="encryptionKeyThumbprint", visibility=["read", "create", "update", "delete", "query"] + ) + """The digital signature of encrypted certificate.""" + encryption_key: Optional[str] = rest_field( + name="encryptionKey", visibility=["read", "create", "update", "delete", "query"] + ) + """The public part of the encryption certificate. Client uses this to encrypt any secret.""" + resource_key: Optional[str] = rest_field(name="resourceKey", visibility=["read"]) + """The Resource ID of the Resource.""" + client_secret_store_id: Optional[str] = rest_field( + name="clientSecretStoreId", visibility=["read", "create", "update", "delete", "query"] + ) + """The Key Vault ARM Id for client secrets.""" + client_secret_store_url: Optional[str] = rest_field( + name="clientSecretStoreUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """The url to access the Client Key Vault.""" + channel_integrity_key_name: Optional[str] = rest_field( + name="channelIntegrityKeyName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of Channel Integrity Key stored in the Client Key Vault.""" + channel_integrity_key_version: Optional[str] = rest_field( + name="channelIntegrityKeyVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The version of Channel Integrity Key stored in the Client Key Vault.""" + key_vault_sync_status: Optional[Union[str, "_models.KeyVaultSyncStatus"]] = rest_field( + name="keyVaultSyncStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Key vault sync status. Known values are: \"KeyVaultSynced\", \"KeyVaultSyncFailed\", + \"KeyVaultNotConfigured\", \"KeyVaultSyncPending\", \"KeyVaultSyncing\", and + \"KeyVaultNotSynced\".""" + device_secrets: Optional[dict[str, "_models.Secret"]] = rest_field(name="deviceSecrets", visibility=["read"]) + """Device secrets, will be returned only with ODataFilter $expand=deviceSecrets.""" + cluster_witness_type: Optional[Union[str, "_models.ClusterWitnessType"]] = rest_field( + name="clusterWitnessType", visibility=["read"] + ) + """Cluster Witness Type. Known values are: \"None\", \"Cloud\", and \"FileShare\".""" + file_share_witness_location: Optional[str] = rest_field(name="fileShareWitnessLocation", visibility=["read"]) + """The witness location of file share.""" + file_share_witness_username: Optional[str] = rest_field(name="fileShareWitnessUsername", visibility=["read"]) + """The username of file share.""" + cloud_witness_storage_account_name: Optional[str] = rest_field( + name="cloudWitnessStorageAccountName", visibility=["read"] + ) + """The Cloud Witness Storage account name.""" + cloud_witness_container_name: Optional[str] = rest_field(name="cloudWitnessContainerName", visibility=["read"]) + """The Container for cloud witness in the storage account.""" + cloud_witness_storage_endpoint: Optional[str] = rest_field(name="cloudWitnessStorageEndpoint", visibility=["read"]) + """The Azure service endpoint of the cloud witness storage account.""" + + @overload + def __init__( + self, + *, + encryption_key_thumbprint: Optional[str] = None, + encryption_key: Optional[str] = None, + client_secret_store_id: Optional[str] = None, + client_secret_store_url: Optional[str] = None, + channel_integrity_key_name: Optional[str] = None, + channel_integrity_key_version: Optional[str] = None, + key_vault_sync_status: Optional[Union[str, "_models.KeyVaultSyncStatus"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DataBoxEdgeDevicePatch(_Model): + """The Data Box Edge/Gateway device patch. + + :ivar tags: The tags attached to the Data Box Edge/Gateway resource. + :vartype tags: dict[str, str] + :ivar identity: Msi identity of the resource. + :vartype identity: ~azure.mgmt.databoxedge.models.ResourceIdentity + :ivar properties: The properties associated with the Data Box Edge/Gateway resource. + :vartype properties: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePropertiesPatch + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The tags attached to the Data Box Edge/Gateway resource.""" + identity: Optional["_models.ResourceIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Msi identity of the resource.""" + properties: Optional["_models.DataBoxEdgeDevicePropertiesPatch"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties associated with the Data Box Edge/Gateway resource.""" + + __flattened_items = ["edge_profile"] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + identity: Optional["_models.ResourceIdentity"] = None, + properties: Optional["_models.DataBoxEdgeDevicePropertiesPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DataBoxEdgeDeviceProperties(_Model): + """The properties of the Data Box Edge/Gateway device. + + :ivar system_data: DataBoxEdge Device Properties. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar data_box_edge_device_status: The status of the Data Box Edge/Gateway device. Known values + are: "ReadyToSetup", "Online", "Offline", "NeedsAttention", "Disconnected", + "PartiallyDisconnected", and "Maintenance". + :vartype 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. "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: int + :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 + :ivar data_residency: The details of data-residency related properties for this resource. + :vartype data_residency: ~azure.mgmt.databoxedge.models.DataResidency + :ivar kubernetes_workload_profile: Kubernetes Workload Profile. + :vartype kubernetes_workload_profile: str + """ + + system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"]) + """DataBoxEdge Device Properties.""" + data_box_edge_device_status: Optional[Union[str, "_models.DataBoxEdgeDeviceStatus"]] = rest_field( + name="dataBoxEdgeDeviceStatus", visibility=["read"] + ) + """The status of the Data Box Edge/Gateway device. Known values are: \"ReadyToSetup\", \"Online\", + \"Offline\", \"NeedsAttention\", \"Disconnected\", \"PartiallyDisconnected\", and + \"Maintenance\".""" + serial_number: Optional[str] = rest_field(name="serialNumber", visibility=["read"]) + """The Serial Number of Data Box Edge/Gateway device.""" + description: Optional[str] = rest_field(visibility=["read"]) + """The Description of the Data Box Edge/Gateway device.""" + model_description: Optional[str] = rest_field(name="modelDescription", visibility=["read"]) + """The description of the Data Box Edge/Gateway device model.""" + device_type: Optional[Union[str, "_models.DeviceType"]] = rest_field(name="deviceType", visibility=["read"]) + """The type of the Data Box Edge/Gateway device. \"DataBoxEdgeDevice\"""" + friendly_name: Optional[str] = rest_field(name="friendlyName", visibility=["read"]) + """The Data Box Edge/Gateway device name.""" + culture: Optional[str] = rest_field(visibility=["read"]) + """The Data Box Edge/Gateway device culture.""" + device_model: Optional[str] = rest_field(name="deviceModel", visibility=["read"]) + """The Data Box Edge/Gateway device model.""" + device_software_version: Optional[str] = rest_field(name="deviceSoftwareVersion", visibility=["read"]) + """The Data Box Edge/Gateway device software version.""" + device_local_capacity: Optional[int] = rest_field(name="deviceLocalCapacity", visibility=["read"]) + """The Data Box Edge/Gateway device local capacity in MB.""" + time_zone: Optional[str] = rest_field(name="timeZone", visibility=["read"]) + """The Data Box Edge/Gateway device timezone.""" + device_hcs_version: Optional[str] = rest_field(name="deviceHcsVersion", visibility=["read"]) + """The device software version number of the device (eg: 1.2.18105.6).""" + configured_role_types: Optional[list[Union[str, "_models.RoleTypes"]]] = rest_field( + name="configuredRoleTypes", visibility=["read"] + ) + """Type of compute roles configured.""" + node_count: Optional[int] = rest_field(name="nodeCount", visibility=["read"]) + """The number of nodes in the cluster.""" + resource_move_details: Optional["_models.ResourceMoveDetails"] = rest_field( + name="resourceMoveDetails", visibility=["read"] + ) + """The details of the move operation on this resource.""" + edge_profile: Optional["_models.EdgeProfile"] = rest_field(name="edgeProfile", visibility=["read"]) + """The details of Edge Profile for this resource.""" + data_residency: Optional["_models.DataResidency"] = rest_field( + name="dataResidency", visibility=["read", "create", "update", "delete", "query"] + ) + """The details of data-residency related properties for this resource.""" + kubernetes_workload_profile: Optional[str] = rest_field(name="kubernetesWorkloadProfile", visibility=["read"]) + """Kubernetes Workload Profile.""" + + @overload + def __init__( + self, + *, + data_residency: Optional["_models.DataResidency"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DataBoxEdgeDevicePropertiesPatch(_Model): + """The Data Box Edge/Gateway device properties patch. + + :ivar edge_profile: Edge Profile property of the Data Box Edge/Gateway device. + :vartype edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfilePatch + """ + + edge_profile: Optional["_models.EdgeProfilePatch"] = rest_field( + name="edgeProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Edge Profile property of the Data Box Edge/Gateway device.""" + + @overload + def __init__( + self, + *, + edge_profile: Optional["_models.EdgeProfilePatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DataBoxEdgeSku(_Model): + """The Sku information. + + :ivar resource_type: The type of the resource. + :vartype resource_type: str + :ivar name: The Sku name. Known values are: "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", "EP2_64_Mx1_W", "EP2_128_GPU1_Mx1_W", + "EP2_256_GPU2_Mx1", and "EdgeMR_TCP". + :vartype name: str or ~azure.mgmt.databoxedge.models.SkuName + :ivar kind: The Sku kind. + :vartype kind: str + :ivar tier: The Sku tier. "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. Known values are: "None" and + "Available". + :vartype signup_option: str or ~azure.mgmt.databoxedge.models.SkuSignupOption + :ivar version: Availability of the Sku as preview/stable. Known values are: "Stable" and + "Preview". + :vartype version: str or ~azure.mgmt.databoxedge.models.SkuVersion + :ivar availability: Links to the next set of results. Known values are: "Available" and + "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] + """ + + resource_type: Optional[str] = rest_field(name="resourceType", visibility=["read"]) + """The type of the resource.""" + name: Optional[Union[str, "_models.SkuName"]] = rest_field(visibility=["read"]) + """The Sku name. Known values are: \"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\", + \"EP2_64_Mx1_W\", \"EP2_128_GPU1_Mx1_W\", \"EP2_256_GPU2_Mx1\", and \"EdgeMR_TCP\".""" + kind: Optional[str] = rest_field(visibility=["read"]) + """The Sku kind.""" + tier: Optional[Union[str, "_models.SkuTier"]] = rest_field(visibility=["read"]) + """The Sku tier. \"Standard\"""" + size: Optional[str] = rest_field(visibility=["read"]) + """The Sku kind.""" + family: Optional[str] = rest_field(visibility=["read"]) + """The Sku family.""" + locations: Optional[list[str]] = rest_field(visibility=["read"]) + """Availability of the Sku for the region.""" + api_versions: Optional[list[str]] = rest_field(name="apiVersions", visibility=["read"]) + """The API versions in which Sku is available.""" + location_info: Optional[list["_models.SkuLocationInfo"]] = rest_field(name="locationInfo", visibility=["read"]) + """Availability of the Sku for the location/zone/site.""" + costs: Optional[list["_models.SkuCost"]] = rest_field(visibility=["read"]) + """The pricing info of the Sku.""" + signup_option: Optional[Union[str, "_models.SkuSignupOption"]] = rest_field( + name="signupOption", visibility=["read"] + ) + """Sku can be signed up by customer or not. Known values are: \"None\" and \"Available\".""" + version: Optional[Union[str, "_models.SkuVersion"]] = rest_field(visibility=["read"]) + """Availability of the Sku as preview/stable. Known values are: \"Stable\" and \"Preview\".""" + availability: Optional[Union[str, "_models.SkuAvailability"]] = rest_field(visibility=["read"]) + """Links to the next set of results. Known values are: \"Available\" and \"Unavailable\".""" + shipment_types: Optional[list[Union[str, "_models.ShipmentType"]]] = rest_field( + name="shipmentTypes", visibility=["read"] + ) + """List of Shipment Types supported by this SKU.""" + capabilities: Optional[list["_models.SkuCapability"]] = rest_field(visibility=["read"]) + """The capability info of the SKU.""" + + +class DataResidency(_Model): + """Wraps data-residency related information for edge-resource and this should be used with ARM + layer. + + :ivar type: DataResidencyType enum. Known values are: "GeoZoneReplication" and + "ZoneReplication". + :vartype type: str or ~azure.mgmt.databoxedge.models.DataResidencyType + """ + + type: Optional[Union[str, "_models.DataResidencyType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """DataResidencyType enum. Known values are: \"GeoZoneReplication\" and \"ZoneReplication\".""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.DataResidencyType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DCAccessCode(_Model): + """DC Access code in the case of Self Managed Shipping. + + :ivar properties: DCAccessCode properties. + :vartype properties: ~azure.mgmt.databoxedge.models.DCAccessCodeProperties + """ + + properties: Optional["_models.DCAccessCodeProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """DCAccessCode properties.""" + + __flattened_items = ["auth_code"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.DCAccessCodeProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DCAccessCodeProperties(_Model): + """DCAccessCode Properties. + + :ivar auth_code: DCAccess Code for the Self Managed shipment. + :vartype auth_code: str + """ + + auth_code: Optional[str] = rest_field(name="authCode", visibility=["read", "create", "update", "delete", "query"]) + """DCAccess Code for the Self Managed shipment.""" + + @overload + def __init__( + self, + *, + auth_code: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeviceCapacityInfo(ProxyResource): + """Object for Capturing DeviceCapacityInfo. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: The device capacity properties. + :vartype properties: ~azure.mgmt.databoxedge.models.DeviceCapacityInfoProperties + """ + + properties: Optional["_models.DeviceCapacityInfoProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The device capacity properties.""" + + __flattened_items = [ + "time_stamp", + "cluster_storage_capacity_info", + "cluster_compute_capacity_info", + "node_capacity_infos", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.DeviceCapacityInfoProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DeviceCapacityInfoProperties(_Model): + """The properties of Device Capacity Info. + + :ivar time_stamp: Timestamp of request in UTC. + :vartype time_stamp: ~datetime.datetime + :ivar cluster_storage_capacity_info: Cluster capacity data for storage resources (CSV). + :vartype cluster_storage_capacity_info: ~azure.mgmt.databoxedge.models.ClusterStorageViewData + :ivar cluster_compute_capacity_info: Cluster capacity data for compute resources (Memory and + GPU). + :vartype cluster_compute_capacity_info: ~azure.mgmt.databoxedge.models.ClusterCapacityViewData + :ivar node_capacity_infos: The dictionary of individual node names and node capacities in the + cluster. + :vartype node_capacity_infos: dict[str, ~azure.mgmt.databoxedge.models.HostCapacity] + """ + + time_stamp: Optional[datetime.datetime] = rest_field( + name="timeStamp", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Timestamp of request in UTC.""" + cluster_storage_capacity_info: Optional["_models.ClusterStorageViewData"] = rest_field( + name="clusterStorageCapacityInfo", visibility=["read", "create", "update", "delete", "query"] + ) + """Cluster capacity data for storage resources (CSV).""" + cluster_compute_capacity_info: Optional["_models.ClusterCapacityViewData"] = rest_field( + name="clusterComputeCapacityInfo", visibility=["read", "create", "update", "delete", "query"] + ) + """Cluster capacity data for compute resources (Memory and GPU).""" + node_capacity_infos: Optional[dict[str, "_models.HostCapacity"]] = rest_field( + name="nodeCapacityInfos", visibility=["read", "create", "update", "delete", "query"] + ) + """The dictionary of individual node names and node capacities in the cluster.""" + + @overload + def __init__( + self, + *, + time_stamp: Optional[datetime.datetime] = None, + cluster_storage_capacity_info: Optional["_models.ClusterStorageViewData"] = None, + cluster_compute_capacity_info: Optional["_models.ClusterCapacityViewData"] = None, + node_capacity_infos: Optional[dict[str, "_models.HostCapacity"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeviceCapacityRequestInfo(_Model): + """Object for Capturing DeviceCapacityRequestInfo. + + :ivar properties: The properties of the Device Capacity Request. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.DeviceCapacityRequestInfoProperties + """ + + properties: "_models.DeviceCapacityRequestInfoProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the Device Capacity Request. Required.""" + + __flattened_items = ["vm_placement_query", "vm_placement_results"] + + @overload + def __init__( + self, + *, + properties: "_models.DeviceCapacityRequestInfoProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DeviceCapacityRequestInfoProperties(_Model): + """Properties of Device Capacity Request Info containing VM's to be checked and their + corresponding results. + + :ivar vm_placement_query: Array containing the sizes of the VMs for checking if its feasible to + create them on the appliance. Required. + :vartype vm_placement_query: list[list[str]] + :ivar vm_placement_results: Array of the VMs of the sizes in VmSizes can be provisioned on the + appliance. + :vartype vm_placement_results: list[~azure.mgmt.databoxedge.models.VmPlacementRequestResult] + """ + + vm_placement_query: list[list[str]] = rest_field( + name="vmPlacementQuery", visibility=["read", "create", "update", "delete", "query"] + ) + """Array containing the sizes of the VMs for checking if its feasible to create them on the + appliance. Required.""" + vm_placement_results: Optional[list["_models.VmPlacementRequestResult"]] = rest_field( + name="vmPlacementResults", visibility=["read", "create", "update", "delete", "query"] + ) + """Array of the VMs of the sizes in VmSizes can be provisioned on the appliance.""" + + @overload + def __init__( + self, + *, + vm_placement_query: list[list[str]], + vm_placement_results: Optional[list["_models.VmPlacementRequestResult"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DiagnosticProactiveLogCollectionSettings(ProxyResource): + """The diagnostic proactive log collection settings of a device. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: Properties of the diagnostic proactive log collection settings. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.ProactiveLogCollectionSettingsProperties + """ + + properties: "_models.ProactiveLogCollectionSettingsProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the diagnostic proactive log collection settings. Required.""" + + __flattened_items = ["user_consent"] + + @overload + def __init__( + self, + *, + properties: "_models.ProactiveLogCollectionSettingsProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DiagnosticRemoteSupportSettings(ProxyResource): + """The remote support settings of a device. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: Properties of the remote support settings. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettingsProperties + """ + + properties: "_models.DiagnosticRemoteSupportSettingsProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the remote support settings. Required.""" + + __flattened_items = ["remote_support_settings_list"] + + @overload + def __init__( + self, + *, + properties: "_models.DiagnosticRemoteSupportSettingsProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DiagnosticRemoteSupportSettingsProperties(_Model): # pylint: disable=name-too-long + """The properties of remote support settings. + + :ivar remote_support_settings_list: Remote support settings list according to the + RemoteApplicationType. + :vartype remote_support_settings_list: + list[~azure.mgmt.databoxedge.models.RemoteSupportSettings] + """ + + remote_support_settings_list: Optional[list["_models.RemoteSupportSettings"]] = rest_field( + name="remoteSupportSettingsList", visibility=["read", "create", "update", "delete", "query"] + ) + """Remote support settings list according to the RemoteApplicationType.""" + + @overload + def __init__( + self, + *, + remote_support_settings_list: Optional[list["_models.RemoteSupportSettings"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EdgeProfile(_Model): + """Details about Edge Profile for the resource. + + :ivar subscription: Edge Profile Subscription. + :vartype subscription: ~azure.mgmt.databoxedge.models.EdgeProfileSubscription + """ + + subscription: Optional["_models.EdgeProfileSubscription"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Edge Profile Subscription.""" + + @overload + def __init__( + self, + *, + subscription: Optional["_models.EdgeProfileSubscription"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EdgeProfilePatch(_Model): + """The Data Box Edge/Gateway Edge Profile patch. + + :ivar subscription: The Data Box Edge/Gateway Edge Profile Subscription patch. + :vartype subscription: ~azure.mgmt.databoxedge.models.EdgeProfileSubscriptionPatch + """ + + subscription: Optional["_models.EdgeProfileSubscriptionPatch"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The Data Box Edge/Gateway Edge Profile Subscription patch.""" + + @overload + def __init__( + self, + *, + subscription: Optional["_models.EdgeProfileSubscriptionPatch"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EdgeProfileSubscription(_Model): + """Subscription details for the Edge Profile. + + :ivar registration_id: Edge Subscription Registration ID. + :vartype registration_id: str + :ivar id: ARM ID of the subscription. + :vartype id: str + :ivar state: Known values are: "Registered", "Warned", "Suspended", "Deleted", and + "Unregistered". + :vartype state: str or ~azure.mgmt.databoxedge.models.SubscriptionState + :ivar registration_date: + :vartype registration_date: str + :ivar subscription_id: + :vartype subscription_id: str + :ivar properties: + :vartype properties: ~azure.mgmt.databoxedge.models.SubscriptionProperties + """ + + registration_id: Optional[str] = rest_field( + name="registrationId", visibility=["read", "create", "update", "delete", "query"] + ) + """Edge Subscription Registration ID.""" + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """ARM ID of the subscription.""" + state: Optional[Union[str, "_models.SubscriptionState"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Known values are: \"Registered\", \"Warned\", \"Suspended\", \"Deleted\", and \"Unregistered\".""" + registration_date: Optional[str] = rest_field( + name="registrationDate", visibility=["read", "create", "update", "delete", "query"] + ) + subscription_id: Optional[str] = rest_field( + name="subscriptionId", visibility=["read", "create", "update", "delete", "query"] + ) + properties: Optional["_models.SubscriptionProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + __flattened_items = ["tenant_id", "location_placement_id", "quota_id", "serialized_details", "registered_features"] + + @overload + def __init__( + self, + *, + registration_id: Optional[str] = None, + id: Optional[str] = None, # pylint: disable=redefined-builtin + state: Optional[Union[str, "_models.SubscriptionState"]] = None, + registration_date: Optional[str] = None, + subscription_id: Optional[str] = None, + properties: Optional["_models.SubscriptionProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class EdgeProfileSubscriptionPatch(_Model): + """The Data Box Edge/Gateway Edge Profile Subscription patch. + + :ivar id: The path ID that uniquely identifies the subscription of the edge profile. + :vartype id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The path ID that uniquely identifies the subscription of the edge profile.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EtcdInfo(_Model): + """Etcd configuration. + + :ivar type: Etcd type. + :vartype type: str + :ivar version: Etcd version. + :vartype version: str + """ + + type: Optional[str] = rest_field(visibility=["read"]) + """Etcd type.""" + version: Optional[str] = rest_field(visibility=["read"]) + """Etcd version.""" + + +class Trigger(ProxyResource): + """Trigger details. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + FileEventTrigger, PeriodicTimerEventTrigger + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar kind: Trigger Kind. Known values are: "FileEvent" and "PeriodicTimerEvent". + :vartype kind: str or ~azure.mgmt.databoxedge.models.TriggerEventType + """ + + __mapping__: dict[str, _Model] = {} + kind: str = rest_discriminator(name="kind", visibility=["read", "create"]) + """Trigger Kind. Known values are: \"FileEvent\" and \"PeriodicTimerEvent\".""" + + @overload + def __init__( + self, + *, + kind: str = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FileEventTrigger(Trigger, discriminator="FileEvent"): + """Trigger details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: File trigger properties. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.FileTriggerProperties + :ivar kind: Trigger Kind. Required. + :vartype kind: str or ~azure.mgmt.databoxedge.models.FILE_EVENT + """ + + properties: "_models.FileTriggerProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """File trigger properties. Required.""" + kind: Literal[TriggerEventType.FILE_EVENT] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Trigger Kind. Required.""" + + __flattened_items = ["source_info", "sink_info", "custom_context_tag"] + + @overload + def __init__( + self, + *, + properties: "_models.FileTriggerProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class FileSourceInfo(_Model): + """File source details. + + :ivar share_id: File share ID. Required. + :vartype share_id: str + """ + + share_id: str = rest_field(name="shareId", visibility=["read", "create", "update", "delete", "query"]) + """File share ID. Required.""" + + @overload + def __init__( + self, + *, + share_id: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FileTriggerProperties(_Model): + """File trigger properties. + + :ivar source_info: File event source details. Required. + :vartype source_info: ~azure.mgmt.databoxedge.models.FileSourceInfo + :ivar sink_info: Role sink info. Required. + :vartype sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo + :ivar 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. + :vartype custom_context_tag: str + """ + + source_info: "_models.FileSourceInfo" = rest_field( + name="sourceInfo", visibility=["read", "create", "update", "delete", "query"] + ) + """File event source details. Required.""" + sink_info: "_models.RoleSinkInfo" = rest_field( + name="sinkInfo", visibility=["read", "create", "update", "delete", "query"] + ) + """Role sink info. Required.""" + custom_context_tag: Optional[str] = rest_field( + name="customContextTag", visibility=["read", "create", "update", "delete", "query"] + ) + """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.""" + + @overload + def __init__( + self, + *, + source_info: "_models.FileSourceInfo", + sink_info: "_models.RoleSinkInfo", + custom_context_tag: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GenerateCertResponse(_Model): + """Used in activation key generation flow. + + :ivar public_key: Gets or sets base64 encoded certificate raw data, + this is the public part needed to be uploaded to cert vault. + :vartype public_key: str + :ivar private_key: Gets or sets base64 encoded private part of the certificate, + needed to form the activation key. + :vartype private_key: str + :ivar expiry_time_in_utc: Gets or sets expiry time in UTC. + :vartype expiry_time_in_utc: str + """ + + public_key: Optional[str] = rest_field(name="publicKey", visibility=["read", "create", "update", "delete", "query"]) + """Gets or sets base64 encoded certificate raw data, + this is the public part needed to be uploaded to cert vault.""" + private_key: Optional[str] = rest_field( + name="privateKey", visibility=["read", "create", "update", "delete", "query"] + ) + """Gets or sets base64 encoded private part of the certificate, + needed to form the activation key.""" + expiry_time_in_utc: Optional[str] = rest_field( + name="expiryTimeInUTC", visibility=["read", "create", "update", "delete", "query"] + ) + """Gets or sets expiry time in UTC.""" + + @overload + def __init__( + self, + *, + public_key: Optional[str] = None, + private_key: Optional[str] = None, + expiry_time_in_utc: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class HostCapacity(_Model): + """Host Capacity Data. + + :ivar host_name: The name of the host. + :vartype host_name: str + :ivar effective_available_memory_mb_on_host: The available memory on the host accounting for VM + placement size and any host VM reservations. + :vartype effective_available_memory_mb_on_host: int + :ivar available_gpu_count: The available amount of GPUs on the host to use after accounting for + GPUS used by reservations on the host. + :vartype available_gpu_count: int + :ivar vm_used_memory: The VM used memory per VmId. + :vartype vm_used_memory: dict[str, ~azure.mgmt.databoxedge.models.VmMemory] + :ivar gpu_type: The GPU type of the VM. + :vartype gpu_type: str + :ivar numa_nodes_data: The numa nodes information for Hpn VMs. + :vartype numa_nodes_data: list[~azure.mgmt.databoxedge.models.NumaNodeData] + """ + + host_name: Optional[str] = rest_field(name="hostName", visibility=["read", "create", "update", "delete", "query"]) + """The name of the host.""" + effective_available_memory_mb_on_host: Optional[int] = rest_field( + name="effectiveAvailableMemoryMbOnHost", visibility=["read", "create", "update", "delete", "query"] + ) + """The available memory on the host accounting for VM placement size and any host VM reservations.""" + available_gpu_count: Optional[int] = rest_field( + name="availableGpuCount", visibility=["read", "create", "update", "delete", "query"] + ) + """The available amount of GPUs on the host to use after accounting for GPUS used by reservations + on the host.""" + vm_used_memory: Optional[dict[str, "_models.VmMemory"]] = rest_field( + name="vmUsedMemory", visibility=["read", "create", "update", "delete", "query"] + ) + """The VM used memory per VmId.""" + gpu_type: Optional[str] = rest_field(name="gpuType", visibility=["read", "create", "update", "delete", "query"]) + """The GPU type of the VM.""" + numa_nodes_data: Optional[list["_models.NumaNodeData"]] = rest_field( + name="numaNodesData", visibility=["read", "create", "update", "delete", "query"] + ) + """The numa nodes information for Hpn VMs.""" + + @overload + def __init__( + self, + *, + host_name: Optional[str] = None, + effective_available_memory_mb_on_host: Optional[int] = None, + available_gpu_count: Optional[int] = None, + vm_used_memory: Optional[dict[str, "_models.VmMemory"]] = None, + gpu_type: Optional[str] = None, + numa_nodes_data: Optional[list["_models.NumaNodeData"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ImageRepositoryCredential(_Model): + """Image repository credential. + + :ivar image_repository_url: Image repository url (e.g.: mcr.microsoft.com). Required. + :vartype image_repository_url: str + :ivar user_name: Repository user name. Required. + :vartype user_name: str + :ivar password: Repository user password. + :vartype password: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + image_repository_url: str = rest_field( + name="imageRepositoryUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """Image repository url (e.g.: mcr.microsoft.com). Required.""" + user_name: str = rest_field(name="userName", visibility=["read", "create", "update", "delete", "query"]) + """Repository user name. Required.""" + password: Optional["_models.AsymmetricEncryptedSecret"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Repository user password.""" + + @overload + def __init__( + self, + *, + image_repository_url: str, + user_name: str, + password: Optional["_models.AsymmetricEncryptedSecret"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IoTAddon(Addon, discriminator="IotEdge"): + """IoT Addon. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: Properties specific to IOT addon. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.IoTAddonProperties + :ivar kind: Addon type. Required. + :vartype kind: str or ~azure.mgmt.databoxedge.models.IOT_EDGE + """ + + properties: "_models.IoTAddonProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Properties specific to IOT addon. Required.""" + kind: Literal[AddonType.IOT_EDGE] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Addon type. Required.""" + + __flattened_items = [ + "io_t_device_details", + "io_t_edge_device_details", + "version", + "host_platform", + "host_platform_type", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + properties: "_models.IoTAddonProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class IoTAddonProperties(_Model): + """IoT addon properties. + + :ivar io_t_device_details: IoT device metadata to which appliance needs to be connected. + Required. + :vartype io_t_device_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :ivar io_t_edge_device_details: IoT edge device to which the IoT Addon needs to be configured. + Required. + :vartype io_t_edge_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. Known values are: "Windows" and + "Linux". + :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar host_platform_type: Platform where the runtime is hosted. Known values are: + "KubernetesCluster" and "LinuxVM". + :vartype host_platform_type: str or ~azure.mgmt.databoxedge.models.HostPlatformType + :ivar provisioning_state: Addon Provisioning State. Known values are: "Invalid", "Creating", + "Created", "Updating", "Reconfiguring", "Failed", and "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.databoxedge.models.AddonState + """ + + io_t_device_details: "_models.IoTDeviceInfo" = rest_field( + name="ioTDeviceDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """IoT device metadata to which appliance needs to be connected. Required.""" + io_t_edge_device_details: "_models.IoTDeviceInfo" = rest_field( + name="ioTEdgeDeviceDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """IoT edge device to which the IoT Addon needs to be configured. Required.""" + version: Optional[str] = rest_field(visibility=["read"]) + """Version of IoT running on the appliance.""" + host_platform: Optional[Union[str, "_models.PlatformType"]] = rest_field(name="hostPlatform", visibility=["read"]) + """Host OS supported by the IoT addon. Known values are: \"Windows\" and \"Linux\".""" + host_platform_type: Optional[Union[str, "_models.HostPlatformType"]] = rest_field( + name="hostPlatformType", visibility=["read"] + ) + """Platform where the runtime is hosted. Known values are: \"KubernetesCluster\" and \"LinuxVM\".""" + provisioning_state: Optional[Union[str, "_models.AddonState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """Addon Provisioning State. Known values are: \"Invalid\", \"Creating\", \"Created\", + \"Updating\", \"Reconfiguring\", \"Failed\", and \"Deleting\".""" + + @overload + def __init__( + self, + *, + io_t_device_details: "_models.IoTDeviceInfo", + io_t_edge_device_details: "_models.IoTDeviceInfo", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IoTDeviceInfo(_Model): + """Metadata of IoT device/IoT Edge device to be configured. + + :ivar device_id: ID of the IoT device/edge device. Required. + :vartype device_id: str + :ivar io_t_host_hub: Host name for the IoT hub associated to the device. Required. + :vartype io_t_host_hub: str + :ivar io_t_host_hub_id: Id for the IoT hub associated to the device. + :vartype io_t_host_hub_id: str + :ivar authentication: Encrypted IoT device/IoT edge device connection string. + :vartype authentication: ~azure.mgmt.databoxedge.models.Authentication + """ + + device_id: str = rest_field(name="deviceId", visibility=["read", "create", "update", "delete", "query"]) + """ID of the IoT device/edge device. Required.""" + io_t_host_hub: str = rest_field(name="ioTHostHub", visibility=["read", "create", "update", "delete", "query"]) + """Host name for the IoT hub associated to the device. Required.""" + io_t_host_hub_id: Optional[str] = rest_field( + name="ioTHostHubId", visibility=["read", "create", "update", "delete", "query"] + ) + """Id for the IoT hub associated to the device.""" + authentication: Optional["_models.Authentication"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Encrypted IoT device/IoT edge device connection string.""" + + @overload + def __init__( + self, + *, + device_id: str, + io_t_host_hub: str, + io_t_host_hub_id: Optional[str] = None, + authentication: Optional["_models.Authentication"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IoTEdgeAgentInfo(_Model): + """IoT edge agent details is optional, this will be used for download system Agent module while + bootstrapping IoT Role if specified. + + :ivar image_name: Name of the IoT edge agent image. Required. + :vartype image_name: str + :ivar tag: Image Tag. Required. + :vartype tag: str + :ivar image_repository: Image repository details. + :vartype image_repository: ~azure.mgmt.databoxedge.models.ImageRepositoryCredential + """ + + image_name: str = rest_field(name="imageName", visibility=["read", "create", "update", "delete", "query"]) + """Name of the IoT edge agent image. Required.""" + tag: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Image Tag. Required.""" + image_repository: Optional["_models.ImageRepositoryCredential"] = rest_field( + name="imageRepository", visibility=["read", "create", "update", "delete", "query"] + ) + """Image repository details.""" + + @overload + def __init__( + self, + *, + image_name: str, + tag: str, + image_repository: Optional["_models.ImageRepositoryCredential"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IoTRole(Role, discriminator="IOT"): + """Compute role. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: Properties specific to IoT role. + :vartype properties: ~azure.mgmt.databoxedge.models.IoTRoleProperties + :ivar kind: Role type. Required. + :vartype kind: str or ~azure.mgmt.databoxedge.models.IOT + """ + + properties: Optional["_models.IoTRoleProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties specific to IoT role.""" + kind: Literal[RoleTypes.IOT] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Role type. Required.""" + + __flattened_items = [ + "host_platform", + "io_t_device_details", + "io_t_edge_device_details", + "share_mappings", + "io_t_edge_agent_info", + "host_platform_type", + "compute_resource", + "role_status", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.IoTRoleProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class IoTRoleProperties(_Model): + """IoT role properties. + + :ivar host_platform: Host OS supported by the IoT role. Required. Known values are: "Windows" + and "Linux". + :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar io_t_device_details: IoT device metadata to which data box edge device needs to be + connected. Required. + :vartype io_t_device_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :ivar io_t_edge_device_details: IoT edge device to which the IoT role needs to be configured. + Required. + :vartype io_t_edge_device_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo + :ivar share_mappings: Mount points of shares in role(s). + :vartype share_mappings: list[~azure.mgmt.databoxedge.models.MountPointMap] + :ivar io_t_edge_agent_info: Iot edge agent details to download the agent and bootstrap iot + runtime. + :vartype io_t_edge_agent_info: ~azure.mgmt.databoxedge.models.IoTEdgeAgentInfo + :ivar host_platform_type: Platform where the Iot runtime is hosted. Known values are: + "KubernetesCluster" and "LinuxVM". + :vartype host_platform_type: str or ~azure.mgmt.databoxedge.models.HostPlatformType + :ivar compute_resource: Resource allocation. + :vartype compute_resource: ~azure.mgmt.databoxedge.models.ComputeResource + :ivar role_status: Role status. Required. Known values are: "Enabled" and "Disabled". + :vartype role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + host_platform: Union[str, "_models.PlatformType"] = rest_field( + name="hostPlatform", visibility=["read", "create", "update", "delete", "query"] + ) + """Host OS supported by the IoT role. Required. Known values are: \"Windows\" and \"Linux\".""" + io_t_device_details: "_models.IoTDeviceInfo" = rest_field( + name="ioTDeviceDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """IoT device metadata to which data box edge device needs to be connected. Required.""" + io_t_edge_device_details: "_models.IoTDeviceInfo" = rest_field( + name="ioTEdgeDeviceDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """IoT edge device to which the IoT role needs to be configured. Required.""" + share_mappings: Optional[list["_models.MountPointMap"]] = rest_field( + name="shareMappings", visibility=["read", "create", "update", "delete", "query"] + ) + """Mount points of shares in role(s).""" + io_t_edge_agent_info: Optional["_models.IoTEdgeAgentInfo"] = rest_field( + name="ioTEdgeAgentInfo", visibility=["read", "create", "update", "delete", "query"] + ) + """Iot edge agent details to download the agent and bootstrap iot runtime.""" + host_platform_type: Optional[Union[str, "_models.HostPlatformType"]] = rest_field( + name="hostPlatformType", visibility=["read"] + ) + """Platform where the Iot runtime is hosted. Known values are: \"KubernetesCluster\" and + \"LinuxVM\".""" + compute_resource: Optional["_models.ComputeResource"] = rest_field( + name="computeResource", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource allocation.""" + role_status: Union[str, "_models.RoleStatus"] = rest_field( + name="roleStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Role status. Required. Known values are: \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + host_platform: Union[str, "_models.PlatformType"], + io_t_device_details: "_models.IoTDeviceInfo", + io_t_edge_device_details: "_models.IoTDeviceInfo", + role_status: Union[str, "_models.RoleStatus"], + share_mappings: Optional[list["_models.MountPointMap"]] = None, + io_t_edge_agent_info: Optional["_models.IoTEdgeAgentInfo"] = None, + compute_resource: Optional["_models.ComputeResource"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Ipv4Config(_Model): + """Details related to the IPv4 address configuration. + + :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 + """ + + ip_address: Optional[str] = rest_field(name="ipAddress", visibility=["read"]) + """The IPv4 address of the network adapter.""" + subnet: Optional[str] = rest_field(visibility=["read"]) + """The IPv4 subnet of the network adapter.""" + gateway: Optional[str] = rest_field(visibility=["read"]) + """The IPv4 gateway of the network adapter.""" + + +class Ipv6Config(_Model): + """Details related to the IPv6 address configuration. + + :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 + """ + + ip_address: Optional[str] = rest_field(name="ipAddress", visibility=["read"]) + """The IPv6 address of the network adapter.""" + prefix_length: Optional[int] = rest_field(name="prefixLength", visibility=["read"]) + """The IPv6 prefix of the network adapter.""" + gateway: Optional[str] = rest_field(visibility=["read"]) + """The IPv6 gateway of the network adapter.""" + + +class Job(ProxyResource): + """A device job. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: The properties of the job. + :vartype properties: ~azure.mgmt.databoxedge.models.JobProperties + :ivar status: The current status of the job. Known values are: "Invalid", "Running", + "Succeeded", "Failed", "Canceled", "Paused", and "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.datetime + :ivar end_time: The UTC date and time at which the job completed. + :vartype end_time: ~datetime.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 + """ + + properties: Optional["_models.JobProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the job.""" + status: Optional[Union[str, "_models.JobStatus"]] = rest_field(visibility=["read"]) + """The current status of the job. Known values are: \"Invalid\", \"Running\", \"Succeeded\", + \"Failed\", \"Canceled\", \"Paused\", and \"Scheduled\".""" + start_time: Optional[datetime.datetime] = rest_field(name="startTime", visibility=["read"], format="rfc3339") + """The UTC date and time at which the job started.""" + end_time: Optional[datetime.datetime] = rest_field(name="endTime", visibility=["read"], format="rfc3339") + """The UTC date and time at which the job completed.""" + percent_complete: Optional[int] = rest_field(name="percentComplete", visibility=["read"]) + """The percentage of the job that is complete.""" + error: Optional["_models.JobErrorDetails"] = rest_field(visibility=["read"]) + """The error details.""" + + __flattened_items = [ + "job_type", + "current_stage", + "download_progress", + "install_progress", + "total_refresh_errors", + "error_manifest_file", + "refreshed_entity_id", + "folder", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.JobProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class JobErrorDetails(_Model): + """The job error information containing the list of job errors. + + :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 + """ + + error_details: Optional[list["_models.JobErrorItem"]] = rest_field(name="errorDetails", visibility=["read"]) + """The error details.""" + code: Optional[str] = rest_field(visibility=["read"]) + """The code intended for programmatic access.""" + message: Optional[str] = rest_field(visibility=["read"]) + """The message that describes the error in detail.""" + + +class JobErrorItem(_Model): + """The job error items. + + :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 + """ + + recommendations: Optional[list[str]] = rest_field(visibility=["read"]) + """The recommended actions.""" + code: Optional[str] = rest_field(visibility=["read"]) + """The code intended for programmatic access.""" + message: Optional[str] = rest_field(visibility=["read"]) + """The message that describes the error in detail.""" + + +class JobProperties(_Model): + """The properties for the job. + + :ivar job_type: The type of the job. Known values are: "Invalid", "ScanForUpdates", + "DownloadUpdates", "InstallUpdates", "RefreshShare", "RefreshContainer", "Backup", "Restore", + and "TriggerSupportPackage". + :vartype job_type: str or ~azure.mgmt.databoxedge.models.JobType + :ivar current_stage: Current stage of the update operation. Known values are: "Unknown", + "Initial", "ScanStarted", "ScanComplete", "ScanFailed", "DownloadStarted", "DownloadComplete", + "DownloadFailed", "InstallStarted", "InstallComplete", "InstallFailed", "RebootInitiated", + "Success", "Failure", "RescanStarted", "RescanComplete", and "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 + :ivar 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.). + :vartype folder: str + """ + + job_type: Optional[Union[str, "_models.JobType"]] = rest_field(name="jobType", visibility=["read"]) + """The type of the job. Known values are: \"Invalid\", \"ScanForUpdates\", \"DownloadUpdates\", + \"InstallUpdates\", \"RefreshShare\", \"RefreshContainer\", \"Backup\", \"Restore\", and + \"TriggerSupportPackage\".""" + current_stage: Optional[Union[str, "_models.UpdateOperationStage"]] = rest_field( + name="currentStage", visibility=["read"] + ) + """Current stage of the update operation. Known values are: \"Unknown\", \"Initial\", + \"ScanStarted\", \"ScanComplete\", \"ScanFailed\", \"DownloadStarted\", \"DownloadComplete\", + \"DownloadFailed\", \"InstallStarted\", \"InstallComplete\", \"InstallFailed\", + \"RebootInitiated\", \"Success\", \"Failure\", \"RescanStarted\", \"RescanComplete\", and + \"RescanFailed\".""" + download_progress: Optional["_models.UpdateDownloadProgress"] = rest_field( + name="downloadProgress", visibility=["read"] + ) + """The download progress.""" + install_progress: Optional["_models.UpdateInstallProgress"] = rest_field( + name="installProgress", visibility=["read"] + ) + """The install progress.""" + total_refresh_errors: Optional[int] = rest_field(name="totalRefreshErrors", visibility=["read"]) + """Total number of errors encountered during the refresh process.""" + error_manifest_file: Optional[str] = rest_field(name="errorManifestFile", visibility=["read"]) + """Local share/remote container relative path to the error manifest file of the refresh.""" + refreshed_entity_id: Optional[str] = rest_field(name="refreshedEntityId", visibility=["read"]) + """ARM ID of the entity that was refreshed.""" + folder: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """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.).""" + + @overload + def __init__( + self, + *, + folder: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KubernetesClusterInfo(_Model): + """Kubernetes cluster configuration. + + :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] + :ivar version: Kubernetes cluster version. Required. + :vartype version: str + """ + + etcd_info: Optional["_models.EtcdInfo"] = rest_field(name="etcdInfo", visibility=["read"]) + """Etcd configuration.""" + nodes: Optional[list["_models.NodeInfo"]] = rest_field(visibility=["read"]) + """Kubernetes cluster nodes.""" + version: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Kubernetes cluster version. Required.""" + + @overload + def __init__( + self, + *, + version: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KubernetesIPConfiguration(_Model): + """Kubernetes node IP configuration. + + :ivar port: Port of the Kubernetes node. + :vartype port: str + :ivar ip_address: IP address of the Kubernetes node. + :vartype ip_address: str + """ + + port: Optional[str] = rest_field(visibility=["read"]) + """Port of the Kubernetes node.""" + ip_address: Optional[str] = rest_field(name="ipAddress", visibility=["read", "create", "update", "delete", "query"]) + """IP address of the Kubernetes node.""" + + @overload + def __init__( + self, + *, + ip_address: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KubernetesRole(Role, discriminator="Kubernetes"): + """The limited preview of Kubernetes Cluster Management from the Azure supports: + 1. Using a simple turn-key option in Azure Portal, deploy a Kubernetes cluster on your Azure + Stack Edge device. + 2. Configure Kubernetes cluster running on your device with Arc enabled Kubernetes with a click + of a button in the Azure Portal. + Azure Arc enables organizations to view, manage, and govern their on-premises Kubernetes + clusters using the Azure Portal, command line tools, and APIs. + 3. Easily configure Persistent Volumes using SMB and NFS shares for storing container data. + For more information, refer to the document here: + https://databoxupdatepackages.blob.core.windows.net/documentation/Microsoft-Azure-Stack-Edge-K8-Cloud-Management-20210323.pdf + Or Demo: + https://databoxupdatepackages.blob.core.windows.net/documentation/Microsoft-Azure-Stack-Edge-K8S-Cloud-Management-20210323.mp4 + By using this feature, you agree to the preview legal terms. See the + https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: Properties specific to Kubernetes role. + :vartype properties: ~azure.mgmt.databoxedge.models.KubernetesRoleProperties + :ivar kind: Role type. Required. + :vartype kind: str or ~azure.mgmt.databoxedge.models.KUBERNETES + """ + + properties: Optional["_models.KubernetesRoleProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties specific to Kubernetes role.""" + kind: Literal[RoleTypes.KUBERNETES] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Role type. Required.""" + + __flattened_items = [ + "host_platform", + "provisioning_state", + "host_platform_type", + "kubernetes_cluster_info", + "kubernetes_role_resources", + "role_status", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.KubernetesRoleProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class KubernetesRoleCompute(_Model): + """Kubernetes role compute resource. + + :ivar vm_profile: VM profile. Required. + :vartype vm_profile: str + :ivar memory_in_bytes: Memory in bytes. + :vartype memory_in_bytes: int + :ivar processor_count: Processor count. + :vartype processor_count: int + """ + + vm_profile: str = rest_field(name="vmProfile", visibility=["read", "create", "update", "delete", "query"]) + """VM profile. Required.""" + memory_in_bytes: Optional[int] = rest_field(name="memoryInBytes", visibility=["read"]) + """Memory in bytes.""" + processor_count: Optional[int] = rest_field(name="processorCount", visibility=["read"]) + """Processor count.""" + + @overload + def __init__( + self, + *, + vm_profile: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KubernetesRoleNetwork(_Model): + """Kubernetes role network resource. + + :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 + """ + + cni_config: Optional["_models.CniConfig"] = rest_field(name="cniConfig", visibility=["read"]) + """Cni configuration.""" + load_balancer_config: Optional["_models.LoadBalancerConfig"] = rest_field( + name="loadBalancerConfig", visibility=["read"] + ) + """Load balancer configuration.""" + + +class KubernetesRoleProperties(_Model): + """Kubernetes role properties. + + :ivar host_platform: Host OS supported by the Kubernetes role. Required. Known values are: + "Windows" and "Linux". + :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType + :ivar provisioning_state: State of Kubernetes deployment. Known values are: "Invalid", + "Creating", "Created", "Updating", "Reconfiguring", "Failed", and "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.databoxedge.models.KubernetesState + :ivar host_platform_type: Platform where the runtime is hosted. Known values are: + "KubernetesCluster" and "LinuxVM". + :vartype host_platform_type: str or ~azure.mgmt.databoxedge.models.HostPlatformType + :ivar kubernetes_cluster_info: Kubernetes cluster configuration. Required. + :vartype kubernetes_cluster_info: ~azure.mgmt.databoxedge.models.KubernetesClusterInfo + :ivar kubernetes_role_resources: Kubernetes role resources. Required. + :vartype kubernetes_role_resources: ~azure.mgmt.databoxedge.models.KubernetesRoleResources + :ivar role_status: Role status. Required. Known values are: "Enabled" and "Disabled". + :vartype role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + host_platform: Union[str, "_models.PlatformType"] = rest_field( + name="hostPlatform", visibility=["read", "create", "update", "delete", "query"] + ) + """Host OS supported by the Kubernetes role. Required. Known values are: \"Windows\" and + \"Linux\".""" + provisioning_state: Optional[Union[str, "_models.KubernetesState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """State of Kubernetes deployment. Known values are: \"Invalid\", \"Creating\", \"Created\", + \"Updating\", \"Reconfiguring\", \"Failed\", and \"Deleting\".""" + host_platform_type: Optional[Union[str, "_models.HostPlatformType"]] = rest_field( + name="hostPlatformType", visibility=["read"] + ) + """Platform where the runtime is hosted. Known values are: \"KubernetesCluster\" and \"LinuxVM\".""" + kubernetes_cluster_info: "_models.KubernetesClusterInfo" = rest_field( + name="kubernetesClusterInfo", visibility=["read", "create", "update", "delete", "query"] + ) + """Kubernetes cluster configuration. Required.""" + kubernetes_role_resources: "_models.KubernetesRoleResources" = rest_field( + name="kubernetesRoleResources", visibility=["read", "create", "update", "delete", "query"] + ) + """Kubernetes role resources. Required.""" + role_status: Union[str, "_models.RoleStatus"] = rest_field( + name="roleStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Role status. Required. Known values are: \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + host_platform: Union[str, "_models.PlatformType"], + kubernetes_cluster_info: "_models.KubernetesClusterInfo", + kubernetes_role_resources: "_models.KubernetesRoleResources", + role_status: Union[str, "_models.RoleStatus"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KubernetesRoleResources(_Model): + """Kubernetes role resources. + + :ivar storage: Kubernetes role storage resource. + :vartype storage: ~azure.mgmt.databoxedge.models.KubernetesRoleStorage + :ivar compute: Kubernetes role compute resource. Required. + :vartype compute: ~azure.mgmt.databoxedge.models.KubernetesRoleCompute + :ivar network: Kubernetes role network resource. + :vartype network: ~azure.mgmt.databoxedge.models.KubernetesRoleNetwork + """ + + storage: Optional["_models.KubernetesRoleStorage"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Kubernetes role storage resource.""" + compute: "_models.KubernetesRoleCompute" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Kubernetes role compute resource. Required.""" + network: Optional["_models.KubernetesRoleNetwork"] = rest_field(visibility=["read"]) + """Kubernetes role network resource.""" + + @overload + def __init__( + self, + *, + compute: "_models.KubernetesRoleCompute", + storage: Optional["_models.KubernetesRoleStorage"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KubernetesRoleStorage(_Model): + """Kubernetes role storage resource. + + :ivar storage_classes: Kubernetes storage class info. + :vartype storage_classes: list[~azure.mgmt.databoxedge.models.KubernetesRoleStorageClassInfo] + :ivar endpoints: Mount points of shares in role(s). + :vartype endpoints: list[~azure.mgmt.databoxedge.models.MountPointMap] + """ + + storage_classes: Optional[list["_models.KubernetesRoleStorageClassInfo"]] = rest_field( + name="storageClasses", visibility=["read"] + ) + """Kubernetes storage class info.""" + endpoints: Optional[list["_models.MountPointMap"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Mount points of shares in role(s).""" + + @overload + def __init__( + self, + *, + endpoints: Optional[list["_models.MountPointMap"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KubernetesRoleStorageClassInfo(_Model): + """Kubernetes storage class info. + + :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. Known values are: "Invalid", + "Enabled", and "Disabled". + :vartype posix_compliant: str or ~azure.mgmt.databoxedge.models.PosixComplianceStatus + """ + + name: Optional[str] = rest_field(visibility=["read"]) + """Storage class name.""" + type: Optional[str] = rest_field(visibility=["read"]) + """Storage class type.""" + posix_compliant: Optional[Union[str, "_models.PosixComplianceStatus"]] = rest_field( + name="posixCompliant", visibility=["read"] + ) + """If provisioned storage is posix compliant. Known values are: \"Invalid\", \"Enabled\", and + \"Disabled\".""" + + +class LoadBalancerConfig(_Model): + """Load balancer configuration. + + :ivar type: Load balancer type. + :vartype type: str + :ivar version: Load balancer version. + :vartype version: str + :ivar ip_range: Load balancer ipconfig. + :vartype ip_range: list[str] + """ + + type: Optional[str] = rest_field(visibility=["read"]) + """Load balancer type.""" + version: Optional[str] = rest_field(visibility=["read"]) + """Load balancer version.""" + ip_range: Optional[list[str]] = rest_field( + name="ipRange", visibility=["read", "create", "update", "delete", "query"] + ) + """Load balancer ipconfig.""" + + @overload + def __init__( + self, + *, + ip_range: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MECRole(Role, discriminator="MEC"): + """MEC role. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: Properties specific to MEC role. + :vartype properties: ~azure.mgmt.databoxedge.models.MECRoleProperties + :ivar kind: Role type. Required. + :vartype kind: str or ~azure.mgmt.databoxedge.models.MEC + """ + + properties: Optional["_models.MECRoleProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties specific to MEC role.""" + kind: Literal[RoleTypes.MEC] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Role type. Required.""" + + __flattened_items = ["connection_string", "controller_endpoint", "resource_unique_id", "role_status"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.MECRoleProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class MECRoleProperties(_Model): + """MEC role properties. + + :ivar connection_string: Activation key of the MEC. + :vartype connection_string: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :ivar controller_endpoint: Controller Endpoint. + :vartype controller_endpoint: str + :ivar resource_unique_id: Unique Id of the Resource. + :vartype resource_unique_id: str + :ivar role_status: Role status. Required. Known values are: "Enabled" and "Disabled". + :vartype role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus + """ + + connection_string: Optional["_models.AsymmetricEncryptedSecret"] = rest_field( + name="connectionString", visibility=["read", "create", "update", "delete", "query"] + ) + """Activation key of the MEC.""" + controller_endpoint: Optional[str] = rest_field( + name="controllerEndpoint", visibility=["read", "create", "update", "delete", "query"] + ) + """Controller Endpoint.""" + resource_unique_id: Optional[str] = rest_field( + name="resourceUniqueId", visibility=["read", "create", "update", "delete", "query"] + ) + """Unique Id of the Resource.""" + role_status: Union[str, "_models.RoleStatus"] = rest_field( + name="roleStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Role status. Required. Known values are: \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + role_status: Union[str, "_models.RoleStatus"], + connection_string: Optional["_models.AsymmetricEncryptedSecret"] = None, + controller_endpoint: Optional[str] = None, + resource_unique_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MetricConfiguration(_Model): + """Metric configuration. + + :ivar resource_id: The Resource ID on which the metrics should be pushed. Required. + :vartype resource_id: str + :ivar mdm_account: The MDM account to which the counters should be pushed. + :vartype mdm_account: str + :ivar metric_name_space: The MDM namespace to which the counters should be pushed. This is + required if MDMAccount is specified. + :vartype metric_name_space: str + :ivar counter_sets: Host name for the IoT hub associated to the device. Required. + :vartype counter_sets: list[~azure.mgmt.databoxedge.models.MetricCounterSet] + """ + + resource_id: str = rest_field(name="resourceId", visibility=["read", "create", "update", "delete", "query"]) + """The Resource ID on which the metrics should be pushed. Required.""" + mdm_account: Optional[str] = rest_field( + name="mdmAccount", visibility=["read", "create", "update", "delete", "query"] + ) + """The MDM account to which the counters should be pushed.""" + metric_name_space: Optional[str] = rest_field( + name="metricNameSpace", visibility=["read", "create", "update", "delete", "query"] + ) + """The MDM namespace to which the counters should be pushed. This is required if MDMAccount is + specified.""" + counter_sets: list["_models.MetricCounterSet"] = rest_field( + name="counterSets", visibility=["read", "create", "update", "delete", "query"] + ) + """Host name for the IoT hub associated to the device. Required.""" + + @overload + def __init__( + self, + *, + resource_id: str, + counter_sets: list["_models.MetricCounterSet"], + mdm_account: Optional[str] = None, + metric_name_space: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MetricCounter(_Model): + """The metric counter. + + :ivar name: The counter name. Required. + :vartype name: str + :ivar instance: The instance from which counter should be collected. + :vartype instance: str + :ivar dimension_filter: The dimension filter. + :vartype dimension_filter: list[~azure.mgmt.databoxedge.models.MetricDimension] + :ivar additional_dimensions: The additional dimensions to be added to metric. + :vartype additional_dimensions: list[~azure.mgmt.databoxedge.models.MetricDimension] + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The counter name. Required.""" + instance: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The instance from which counter should be collected.""" + dimension_filter: Optional[list["_models.MetricDimension"]] = rest_field( + name="dimensionFilter", visibility=["read", "create", "update", "delete", "query"] + ) + """The dimension filter.""" + additional_dimensions: Optional[list["_models.MetricDimension"]] = rest_field( + name="additionalDimensions", visibility=["read", "create", "update", "delete", "query"] + ) + """The additional dimensions to be added to metric.""" + + @overload + def __init__( + self, + *, + name: str, + instance: Optional[str] = None, + dimension_filter: Optional[list["_models.MetricDimension"]] = None, + additional_dimensions: Optional[list["_models.MetricDimension"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MetricCounterSet(_Model): + """The metric counter set. + + :ivar counters: The counters that should be collected in this set. Required. + :vartype counters: list[~azure.mgmt.databoxedge.models.MetricCounter] + """ + + counters: list["_models.MetricCounter"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The counters that should be collected in this set. Required.""" + + @overload + def __init__( + self, + *, + counters: list["_models.MetricCounter"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MetricDimension(_Model): + """The metric dimension. + + :ivar source_type: The dimension type. Required. + :vartype source_type: str + :ivar source_name: The dimension value. Required. + :vartype source_name: str + """ + + source_type: str = rest_field(name="sourceType", visibility=["read", "create", "update", "delete", "query"]) + """The dimension type. Required.""" + source_name: str = rest_field(name="sourceName", visibility=["read", "create", "update", "delete", "query"]) + """The dimension value. Required.""" + + @overload + def __init__( + self, + *, + source_type: str, + source_name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MetricDimension_V1(_Model): + """Metric Dimension v1. + + :ivar name: Name of the metrics dimension. + :vartype name: str + :ivar display_name: Display name of the metrics dimension. + :vartype display_name: str + :ivar to_be_exported_for_shoebox: To be exported to shoe box. + :vartype to_be_exported_for_shoebox: bool + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the metrics dimension.""" + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """Display name of the metrics dimension.""" + to_be_exported_for_shoebox: Optional[bool] = rest_field( + name="toBeExportedForShoebox", visibility=["read", "create", "update", "delete", "query"] + ) + """To be exported to shoe box.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + to_be_exported_for_shoebox: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MetricSpecification_V1(_Model): + """Metric specification version 1. + + :ivar name: Name of the metric. + :vartype name: str + :ivar display_name: Display name of the metric. + :vartype display_name: str + :ivar display_description: Description of the metric to be displayed. + :vartype display_description: str + :ivar unit: Metric units. Known values are: "NotSpecified", "Percent", "Count", "Seconds", + "Milliseconds", "Bytes", "BytesPerSecond", and "CountPerSecond". + :vartype unit: str or ~azure.mgmt.databoxedge.models.MetricUnit + :ivar aggregation_type: Metric aggregation type. Known values are: "NotSpecified", "None", + "Average", "Minimum", "Maximum", "Total", and "Count". + :vartype aggregation_type: str or ~azure.mgmt.databoxedge.models.MetricAggregationType + :ivar dimensions: Metric dimensions, other than default dimension which is resource. + :vartype dimensions: list[~azure.mgmt.databoxedge.models.MetricDimension_V1] + :ivar fill_gap_with_zero: Set true to fill the gaps with zero. + :vartype fill_gap_with_zero: bool + :ivar category: Metric category. Known values are: "Capacity" and "Transaction". + :vartype category: str or ~azure.mgmt.databoxedge.models.MetricCategory + :ivar resource_id_dimension_name_override: Resource name override. + :vartype resource_id_dimension_name_override: str + :ivar supported_time_grain_types: Support granularity of metrics. + :vartype supported_time_grain_types: list[str or ~azure.mgmt.databoxedge.models.TimeGrain] + :ivar supported_aggregation_types: + :vartype supported_aggregation_types: list[str or + ~azure.mgmt.databoxedge.models.MetricAggregationType] + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the metric.""" + display_name: Optional[str] = rest_field( + name="displayName", visibility=["read", "create", "update", "delete", "query"] + ) + """Display name of the metric.""" + display_description: Optional[str] = rest_field( + name="displayDescription", visibility=["read", "create", "update", "delete", "query"] + ) + """Description of the metric to be displayed.""" + unit: Optional[Union[str, "_models.MetricUnit"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Metric units. Known values are: \"NotSpecified\", \"Percent\", \"Count\", \"Seconds\", + \"Milliseconds\", \"Bytes\", \"BytesPerSecond\", and \"CountPerSecond\".""" + aggregation_type: Optional[Union[str, "_models.MetricAggregationType"]] = rest_field( + name="aggregationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Metric aggregation type. Known values are: \"NotSpecified\", \"None\", \"Average\", + \"Minimum\", \"Maximum\", \"Total\", and \"Count\".""" + dimensions: Optional[list["_models.MetricDimension_V1"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Metric dimensions, other than default dimension which is resource.""" + fill_gap_with_zero: Optional[bool] = rest_field( + name="fillGapWithZero", visibility=["read", "create", "update", "delete", "query"] + ) + """Set true to fill the gaps with zero.""" + category: Optional[Union[str, "_models.MetricCategory"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Metric category. Known values are: \"Capacity\" and \"Transaction\".""" + resource_id_dimension_name_override: Optional[str] = rest_field( + name="resourceIdDimensionNameOverride", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource name override.""" + supported_time_grain_types: Optional[list[Union[str, "_models.TimeGrain"]]] = rest_field( + name="supportedTimeGrainTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """Support granularity of metrics.""" + supported_aggregation_types: Optional[list[Union[str, "_models.MetricAggregationType"]]] = rest_field( + name="supportedAggregationTypes", visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + display_description: Optional[str] = None, + unit: Optional[Union[str, "_models.MetricUnit"]] = None, + aggregation_type: Optional[Union[str, "_models.MetricAggregationType"]] = None, + dimensions: Optional[list["_models.MetricDimension_V1"]] = None, + fill_gap_with_zero: Optional[bool] = None, + category: Optional[Union[str, "_models.MetricCategory"]] = None, + resource_id_dimension_name_override: Optional[str] = None, + supported_time_grain_types: Optional[list[Union[str, "_models.TimeGrain"]]] = None, + supported_aggregation_types: Optional[list[Union[str, "_models.MetricAggregationType"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MonitoringMetricConfiguration(ProxyResource): + """The metric setting details for the role. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: The metric setting properties. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.MonitoringMetricConfigurationProperties + """ + + properties: "_models.MonitoringMetricConfigurationProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The metric setting properties. Required.""" + + __flattened_items = ["metric_configurations"] + + @overload + def __init__( + self, + *, + properties: "_models.MonitoringMetricConfigurationProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class MonitoringMetricConfigurationProperties(_Model): + """Metrics properties. + + :ivar metric_configurations: The metrics configuration details. Required. + :vartype metric_configurations: list[~azure.mgmt.databoxedge.models.MetricConfiguration] + """ + + metric_configurations: list["_models.MetricConfiguration"] = rest_field( + name="metricConfigurations", visibility=["read", "create", "update", "delete", "query"] + ) + """The metrics configuration details. Required.""" + + @overload + def __init__( + self, + *, + metric_configurations: list["_models.MetricConfiguration"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MountPointMap(_Model): + """The share mount point. + + :ivar share_id: ID of the share mounted to the role VM. Required. + :vartype 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. Known values are: "Volume" and "HostPath". + :vartype mount_type: str or ~azure.mgmt.databoxedge.models.MountType + :ivar role_type: Role type. Known values are: "IOT", "ASA", "Functions", "Cognitive", "MEC", + "CloudEdgeManagement", and "Kubernetes". + :vartype role_type: str or ~azure.mgmt.databoxedge.models.RoleTypes + """ + + share_id: str = rest_field(name="shareId", visibility=["read", "create", "update", "delete", "query"]) + """ID of the share mounted to the role VM. Required.""" + role_id: Optional[str] = rest_field(name="roleId", visibility=["read"]) + """ID of the role to which share is mounted.""" + mount_point: Optional[str] = rest_field(name="mountPoint", visibility=["read"]) + """Mount point for the share.""" + mount_type: Optional[Union[str, "_models.MountType"]] = rest_field(name="mountType", visibility=["read"]) + """Mounting type. Known values are: \"Volume\" and \"HostPath\".""" + role_type: Optional[Union[str, "_models.RoleTypes"]] = rest_field(name="roleType", visibility=["read"]) + """Role type. Known values are: \"IOT\", \"ASA\", \"Functions\", \"Cognitive\", \"MEC\", + \"CloudEdgeManagement\", and \"Kubernetes\".""" + + @overload + def __init__( + self, + *, + share_id: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkAdapter(_Model): + """Represents the networkAdapter on a device. + + :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: int + :ivar status: Value indicating whether this adapter is valid. Known values are: "Inactive" and + "Active". + :vartype status: str or ~azure.mgmt.databoxedge.models.NetworkAdapterStatus + :ivar rdma_status: Value indicating whether this adapter is RDMA capable. Known values are: + "Incapable" and "Capable". + :vartype rdma_status: str or ~azure.mgmt.databoxedge.models.NetworkAdapterRDMAStatus + :ivar dhcp_status: Value indicating whether this adapter has DHCP enabled. Known values are: + "Disabled" and "Enabled". + :vartype 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] + """ + + adapter_id: Optional[str] = rest_field(name="adapterId", visibility=["read"]) + """Instance ID of network adapter.""" + adapter_position: Optional["_models.NetworkAdapterPosition"] = rest_field( + name="adapterPosition", visibility=["read"] + ) + """Hardware position of network adapter.""" + index: Optional[int] = rest_field(visibility=["read"]) + """Logical index of the adapter.""" + node_id: Optional[str] = rest_field(name="nodeId", visibility=["read"]) + """Node ID of the network adapter.""" + network_adapter_name: Optional[str] = rest_field(name="networkAdapterName", visibility=["read"]) + """Network adapter name.""" + label: Optional[str] = rest_field(visibility=["read"]) + """Hardware label for the adapter.""" + mac_address: Optional[str] = rest_field(name="macAddress", visibility=["read"]) + """MAC address.""" + link_speed: Optional[int] = rest_field(name="linkSpeed", visibility=["read"]) + """Link speed.""" + status: Optional[Union[str, "_models.NetworkAdapterStatus"]] = rest_field(visibility=["read"]) + """Value indicating whether this adapter is valid. Known values are: \"Inactive\" and \"Active\".""" + rdma_status: Optional[Union[str, "_models.NetworkAdapterRDMAStatus"]] = rest_field( + name="rdmaStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Value indicating whether this adapter is RDMA capable. Known values are: \"Incapable\" and + \"Capable\".""" + dhcp_status: Optional[Union[str, "_models.NetworkAdapterDHCPStatus"]] = rest_field( + name="dhcpStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Value indicating whether this adapter has DHCP enabled. Known values are: \"Disabled\" and + \"Enabled\".""" + ipv4_configuration: Optional["_models.Ipv4Config"] = rest_field(name="ipv4Configuration", visibility=["read"]) + """The IPv4 configuration of the network adapter.""" + ipv6_configuration: Optional["_models.Ipv6Config"] = rest_field(name="ipv6Configuration", visibility=["read"]) + """The IPv6 configuration of the network adapter.""" + ipv6_link_local_address: Optional[str] = rest_field(name="ipv6LinkLocalAddress", visibility=["read"]) + """The IPv6 local address.""" + dns_servers: Optional[list[str]] = rest_field(name="dnsServers", visibility=["read"]) + """The list of DNS Servers of the device.""" + + @overload + def __init__( + self, + *, + rdma_status: Optional[Union[str, "_models.NetworkAdapterRDMAStatus"]] = None, + dhcp_status: Optional[Union[str, "_models.NetworkAdapterDHCPStatus"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkAdapterPosition(_Model): + """The network adapter position. + + :ivar network_group: The network group. Known values are: "None", "NonRDMA", and "RDMA". + :vartype network_group: str or ~azure.mgmt.databoxedge.models.NetworkGroup + :ivar port: The port. + :vartype port: int + """ + + network_group: Optional[Union[str, "_models.NetworkGroup"]] = rest_field(name="networkGroup", visibility=["read"]) + """The network group. Known values are: \"None\", \"NonRDMA\", and \"RDMA\".""" + port: Optional[int] = rest_field(visibility=["read"]) + """The port.""" + + +class NetworkSettings(ProxyResource): + """The network settings of a device. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: The properties of network settings of a device. + :vartype properties: ~azure.mgmt.databoxedge.models.NetworkSettingsProperties + """ + + properties: Optional["_models.NetworkSettingsProperties"] = rest_field(visibility=["read"]) + """The properties of network settings of a device.""" + + __flattened_items = ["network_adapters"] + + +class NetworkSettingsProperties(_Model): + """The properties of network settings. + + :ivar network_adapters: The network adapter list on the device. + :vartype network_adapters: list[~azure.mgmt.databoxedge.models.NetworkAdapter] + """ + + network_adapters: Optional[list["_models.NetworkAdapter"]] = rest_field(name="networkAdapters", visibility=["read"]) + """The network adapter list on the device.""" + + +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. + + :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 properties: The properties of the node. + :vartype properties: ~azure.mgmt.databoxedge.models.NodeProperties + """ + + properties: Optional["_models.NodeProperties"] = rest_field(visibility=["read"]) + """The properties of the node.""" + + __flattened_items = [ + "node_status", + "node_chassis_serial_number", + "node_serial_number", + "node_display_name", + "node_friendly_software_version", + "node_hcs_version", + "node_instance_id", + ] + + +class NodeInfo(_Model): + """Kubernetes node info. + + :ivar name: Node name. + :vartype name: str + :ivar type: Node type - Master/Worker. Known values are: "Invalid", "Master", and "Worker". + :vartype type: str or ~azure.mgmt.databoxedge.models.KubernetesNodeType + :ivar ip_configuration: IP Configuration of the Kubernetes node. + :vartype ip_configuration: list[~azure.mgmt.databoxedge.models.KubernetesIPConfiguration] + """ + + name: Optional[str] = rest_field(visibility=["read"]) + """Node name.""" + type: Optional[Union[str, "_models.KubernetesNodeType"]] = rest_field(visibility=["read"]) + """Node type - Master/Worker. Known values are: \"Invalid\", \"Master\", and \"Worker\".""" + ip_configuration: Optional[list["_models.KubernetesIPConfiguration"]] = rest_field( + name="ipConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """IP Configuration of the Kubernetes node.""" + + @overload + def __init__( + self, + *, + ip_configuration: Optional[list["_models.KubernetesIPConfiguration"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NodeProperties(_Model): + """This class represents the nodes in a highly available cluster. + + :ivar node_status: The current status of the individual node. Known values are: "Unknown", + "Up", "Down", "Rebooting", and "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 + """ + + node_status: Optional[Union[str, "_models.NodeStatus"]] = rest_field(name="nodeStatus", visibility=["read"]) + """The current status of the individual node. Known values are: \"Unknown\", \"Up\", \"Down\", + \"Rebooting\", and \"ShuttingDown\".""" + node_chassis_serial_number: Optional[str] = rest_field(name="nodeChassisSerialNumber", visibility=["read"]) + """Serial number of the Chassis.""" + node_serial_number: Optional[str] = rest_field(name="nodeSerialNumber", visibility=["read"]) + """Serial number of the individual node.""" + node_display_name: Optional[str] = rest_field(name="nodeDisplayName", visibility=["read"]) + """Display Name of the individual node.""" + node_friendly_software_version: Optional[str] = rest_field(name="nodeFriendlySoftwareVersion", visibility=["read"]) + """Friendly software version name that is currently installed on the node.""" + node_hcs_version: Optional[str] = rest_field(name="nodeHcsVersion", visibility=["read"]) + """HCS version that is currently installed on the node.""" + node_instance_id: Optional[str] = rest_field(name="nodeInstanceId", visibility=["read"]) + """Guid instance id of the node.""" + + +class NumaNodeData(_Model): + """NUMA node data. + + :ivar numa_node_index: The NUMA node index. + :vartype numa_node_index: int + :ivar total_memory_in_mb: The total memory on the NUMA node. + :vartype total_memory_in_mb: int + :ivar logical_core_count_per_core: The logical cores per core count. + :vartype logical_core_count_per_core: int + :ivar effective_available_memory_in_mb: The effective available memory on the NUMA node in MB. + :vartype effective_available_memory_in_mb: int + :ivar free_v_cpu_indexes_for_hpn: The free VCPU indices for the Hpn VMs. + :vartype free_v_cpu_indexes_for_hpn: list[int] + :ivar v_cpu_indexes_for_hpn: The VCPU indices for Hpn VMs. + :vartype v_cpu_indexes_for_hpn: list[int] + :ivar v_cpu_indexes_for_root: The VCPU indices for the root. + :vartype v_cpu_indexes_for_root: list[int] + """ + + numa_node_index: Optional[int] = rest_field( + name="numaNodeIndex", visibility=["read", "create", "update", "delete", "query"] + ) + """The NUMA node index.""" + total_memory_in_mb: Optional[int] = rest_field( + name="totalMemoryInMb", visibility=["read", "create", "update", "delete", "query"] + ) + """The total memory on the NUMA node.""" + logical_core_count_per_core: Optional[int] = rest_field( + name="logicalCoreCountPerCore", visibility=["read", "create", "update", "delete", "query"] + ) + """The logical cores per core count.""" + effective_available_memory_in_mb: Optional[int] = rest_field( + name="effectiveAvailableMemoryInMb", visibility=["read", "create", "update", "delete", "query"] + ) + """The effective available memory on the NUMA node in MB.""" + free_v_cpu_indexes_for_hpn: Optional[list[int]] = rest_field( + name="freeVCpuIndexesForHpn", visibility=["read", "create", "update", "delete", "query"] + ) + """The free VCPU indices for the Hpn VMs.""" + v_cpu_indexes_for_hpn: Optional[list[int]] = rest_field( + name="vCpuIndexesForHpn", visibility=["read", "create", "update", "delete", "query"] + ) + """The VCPU indices for Hpn VMs.""" + v_cpu_indexes_for_root: Optional[list[int]] = rest_field( + name="vCpuIndexesForRoot", visibility=["read", "create", "update", "delete", "query"] + ) + """The VCPU indices for the root.""" + + @overload + def __init__( + self, + *, + numa_node_index: Optional[int] = None, + total_memory_in_mb: Optional[int] = None, + logical_core_count_per_core: Optional[int] = None, + effective_available_memory_in_mb: Optional[int] = None, + free_v_cpu_indexes_for_hpn: Optional[list[int]] = None, + v_cpu_indexes_for_hpn: Optional[list[int]] = None, + v_cpu_indexes_for_root: Optional[list[int]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Operation(_Model): + """Operations. + + :ivar name: Name of the operation. + :vartype name: str + :ivar is_data_action: Is data action. + :vartype is_data_action: bool + :ivar display: Properties displayed for the operation. + :vartype display: ~azure.mgmt.databoxedge.models.OperationDisplay + :ivar origin: Origin of the operation. + :vartype origin: str + :ivar properties: Operation properties. + :vartype properties: ~azure.mgmt.databoxedge.models.OperationProperties + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the operation.""" + is_data_action: Optional[bool] = rest_field( + name="isDataAction", visibility=["read", "create", "update", "delete", "query"] + ) + """Is data action.""" + display: Optional["_models.OperationDisplay"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties displayed for the operation.""" + origin: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Origin of the operation.""" + properties: Optional["_models.OperationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Operation properties.""" + + __flattened_items = ["service_specification"] + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + is_data_action: Optional[bool] = None, + display: Optional["_models.OperationDisplay"] = None, + origin: Optional[str] = None, + properties: Optional["_models.OperationProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class OperationDisplay(_Model): + """Operation display properties. + + :ivar provider: Provider name. + :vartype provider: str + :ivar resource: The type of resource in which the operation is performed. + :vartype resource: str + :ivar operation: Operation to be performed on the resource. + :vartype operation: str + :ivar description: Description of the operation to be performed. + :vartype description: str + """ + + provider: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Provider name.""" + resource: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of resource in which the operation is performed.""" + operation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation to be performed on the resource.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description of the operation to be performed.""" + + @overload + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationProperties(_Model): + """Operation properties. + + :ivar service_specification: Service specification. + :vartype service_specification: ~azure.mgmt.databoxedge.models.ServiceSpecification + """ + + service_specification: Optional["_models.ServiceSpecification"] = rest_field( + name="serviceSpecification", visibility=["read", "create", "update", "delete", "query"] + ) + """Service specification.""" + + @overload + def __init__( + self, + *, + service_specification: Optional["_models.ServiceSpecification"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Order(ProxyResource): + """The order details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: The order properties. + :vartype properties: ~azure.mgmt.databoxedge.models.OrderProperties + :ivar kind: It specify the order api version. + :vartype kind: str + """ + + properties: Optional["_models.OrderProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The order properties.""" + kind: Optional[str] = rest_field(visibility=["read"]) + """It specify the order api version.""" + + __flattened_items = [ + "order_id", + "contact_information", + "shipping_address", + "current_status", + "order_history", + "serial_number", + "delivery_tracking_info", + "return_tracking_info", + "shipment_type", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.OrderProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class OrderProperties(_Model): + """Order properties. + + :ivar order_id: It specify the order resource id. + :vartype order_id: str + :ivar contact_information: The contact details. Required. + :vartype contact_information: ~azure.mgmt.databoxedge.models.ContactDetails + :ivar shipping_address: The shipping address. + :vartype 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] + :ivar shipment_type: ShipmentType of the order. Known values are: "NotApplicable", + "ShippedToCustomer", and "SelfPickup". + :vartype shipment_type: str or ~azure.mgmt.databoxedge.models.ShipmentType + """ + + order_id: Optional[str] = rest_field(name="orderId", visibility=["read"]) + """It specify the order resource id.""" + contact_information: "_models.ContactDetails" = rest_field( + name="contactInformation", visibility=["read", "create", "update", "delete", "query"] + ) + """The contact details. Required.""" + shipping_address: Optional["_models.Address"] = rest_field( + name="shippingAddress", visibility=["read", "create", "update", "delete", "query"] + ) + """The shipping address.""" + current_status: Optional["_models.OrderStatus"] = rest_field(name="currentStatus", visibility=["read"]) + """Current status of the order.""" + order_history: Optional[list["_models.OrderStatus"]] = rest_field(name="orderHistory", visibility=["read"]) + """List of status changes in the order.""" + serial_number: Optional[str] = rest_field(name="serialNumber", visibility=["read"]) + """Serial number of the device.""" + delivery_tracking_info: Optional[list["_models.TrackingInfo"]] = rest_field( + name="deliveryTrackingInfo", visibility=["read"] + ) + """Tracking information for the package delivered to the customer whether it has an original or a + replacement device.""" + return_tracking_info: Optional[list["_models.TrackingInfo"]] = rest_field( + name="returnTrackingInfo", visibility=["read"] + ) + """Tracking information for the package returned from the customer whether it has an original or a + replacement device.""" + shipment_type: Optional[Union[str, "_models.ShipmentType"]] = rest_field( + name="shipmentType", visibility=["read", "create", "update", "delete", "query"] + ) + """ShipmentType of the order. Known values are: \"NotApplicable\", \"ShippedToCustomer\", and + \"SelfPickup\".""" + + @overload + def __init__( + self, + *, + contact_information: "_models.ContactDetails", + shipping_address: Optional["_models.Address"] = None, + shipment_type: Optional[Union[str, "_models.ShipmentType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OrderStatus(_Model): + """Represents a single status change. + + :ivar status: Status of the order as per the allowed status types. Required. Known values are: + "Untracked", "AwaitingFulfillment", "AwaitingPreparation", "AwaitingShipment", "Shipped", + "Arriving", "Delivered", "ReplacementRequested", "LostDevice", "Declined", "ReturnInitiated", + "AwaitingReturnShipment", "ShippedBack", "CollectedAtMicrosoft", "AwaitingPickup", + "PickupCompleted", and "AwaitingDrop". + :vartype status: str or ~azure.mgmt.databoxedge.models.OrderState + :ivar update_date_time: Time of status update. + :vartype update_date_time: ~datetime.datetime + :ivar comments: Comments related to this status change. + :vartype 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] + """ + + status: Union[str, "_models.OrderState"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Status of the order as per the allowed status types. Required. Known values are: \"Untracked\", + \"AwaitingFulfillment\", \"AwaitingPreparation\", \"AwaitingShipment\", \"Shipped\", + \"Arriving\", \"Delivered\", \"ReplacementRequested\", \"LostDevice\", \"Declined\", + \"ReturnInitiated\", \"AwaitingReturnShipment\", \"ShippedBack\", \"CollectedAtMicrosoft\", + \"AwaitingPickup\", \"PickupCompleted\", and \"AwaitingDrop\".""" + update_date_time: Optional[datetime.datetime] = rest_field( + name="updateDateTime", visibility=["read"], format="rfc3339" + ) + """Time of status update.""" + comments: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Comments related to this status change.""" + tracking_information: Optional["_models.TrackingInfo"] = rest_field(name="trackingInformation", visibility=["read"]) + """Tracking information related to the state in the ordering flow.""" + additional_order_details: Optional[dict[str, str]] = rest_field(name="additionalOrderDetails", visibility=["read"]) + """Dictionary to hold generic information which is not stored + by the already existing properties.""" + + @overload + def __init__( + self, + *, + status: Union[str, "_models.OrderState"], + comments: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PeriodicTimerEventTrigger(Trigger, discriminator="PeriodicTimerEvent"): + """Trigger details. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: Periodic timer trigger properties. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.PeriodicTimerProperties + :ivar kind: Trigger Kind. Required. + :vartype kind: str or ~azure.mgmt.databoxedge.models.PERIODIC_TIMER_EVENT + """ + + properties: "_models.PeriodicTimerProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Periodic timer trigger properties. Required.""" + kind: Literal[TriggerEventType.PERIODIC_TIMER_EVENT] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Trigger Kind. Required.""" + + __flattened_items = ["source_info", "sink_info", "custom_context_tag"] + + @overload + def __init__( + self, + *, + properties: "_models.PeriodicTimerProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PeriodicTimerProperties(_Model): + """Periodic timer trigger properties. + + :ivar source_info: Periodic timer details. Required. + :vartype source_info: ~azure.mgmt.databoxedge.models.PeriodicTimerSourceInfo + :ivar sink_info: Role Sink information. Required. + :vartype sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo + :ivar 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. + :vartype custom_context_tag: str + """ + + source_info: "_models.PeriodicTimerSourceInfo" = rest_field( + name="sourceInfo", visibility=["read", "create", "update", "delete", "query"] + ) + """Periodic timer details. Required.""" + sink_info: "_models.RoleSinkInfo" = rest_field( + name="sinkInfo", visibility=["read", "create", "update", "delete", "query"] + ) + """Role Sink information. Required.""" + custom_context_tag: Optional[str] = rest_field( + name="customContextTag", visibility=["read", "create", "update", "delete", "query"] + ) + """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.""" + + @overload + def __init__( + self, + *, + source_info: "_models.PeriodicTimerSourceInfo", + sink_info: "_models.RoleSinkInfo", + custom_context_tag: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PeriodicTimerSourceInfo(_Model): + """Periodic timer event source. + + :ivar start_time: 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. Required. + :vartype start_time: ~datetime.datetime + :ivar schedule: Periodic frequency at which timer event needs to be raised. Supports daily, + hourly, minutes, and seconds. Required. + :vartype schedule: str + :ivar topic: Topic where periodic events are published to IoT device. + :vartype topic: str + """ + + start_time: datetime.datetime = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """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. Required.""" + schedule: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Periodic frequency at which timer event needs to be raised. Supports daily, hourly, minutes, + and seconds. Required.""" + topic: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Topic where periodic events are published to IoT device.""" + + @overload + def __init__( + self, + *, + start_time: datetime.datetime, + schedule: str, + topic: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProactiveLogCollectionSettingsProperties(_Model): + """The properties of proactive log collection settings. + + :ivar user_consent: Proactive diagnostic collection consent flag. Required. Known values are: + "Enabled" and "Disabled". + :vartype user_consent: str or ~azure.mgmt.databoxedge.models.ProactiveDiagnosticsConsent + """ + + user_consent: Union[str, "_models.ProactiveDiagnosticsConsent"] = rest_field( + name="userConsent", visibility=["read", "create", "update", "delete", "query"] + ) + """Proactive diagnostic collection consent flag. Required. Known values are: \"Enabled\" and + \"Disabled\".""" + + @overload + def __init__( + self, + *, + user_consent: Union[str, "_models.ProactiveDiagnosticsConsent"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RawCertificateData(_Model): + """Raw Certificate Data. + + :ivar authentication_type: The authentication type. Known values are: "Invalid" and + "AzureActiveDirectory". + :vartype authentication_type: str or ~azure.mgmt.databoxedge.models.AuthenticationType + :ivar certificate: The base64 encoded certificate raw data. Required. + :vartype certificate: str + """ + + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = rest_field( + name="authenticationType", visibility=["read", "create", "update", "delete", "query"] + ) + """The authentication type. Known values are: \"Invalid\" and \"AzureActiveDirectory\".""" + certificate: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The base64 encoded certificate raw data. Required.""" + + @overload + def __init__( + self, + *, + certificate: str, + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RefreshDetails(_Model): + """Fields for tracking refresh job on the share or container. + + :ivar 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. + :vartype in_progress_refresh_job_id: str + :ivar 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. + :vartype last_completed_refresh_job_time_in_utc: ~datetime.datetime + :ivar 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. + :vartype error_manifest_file: str + :ivar 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. + :vartype last_job: str + """ + + in_progress_refresh_job_id: Optional[str] = rest_field( + name="inProgressRefreshJobId", visibility=["read", "create", "update", "delete", "query"] + ) + """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.""" + last_completed_refresh_job_time_in_utc: Optional[datetime.datetime] = rest_field( + name="lastCompletedRefreshJobTimeInUTC", + visibility=["read", "create", "update", "delete", "query"], + format="rfc3339", + ) + """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.""" + error_manifest_file: Optional[str] = rest_field( + name="errorManifestFile", visibility=["read", "create", "update", "delete", "query"] + ) + """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.""" + last_job: Optional[str] = rest_field(name="lastJob", visibility=["read", "create", "update", "delete", "query"]) + """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.""" + + @overload + def __init__( + self, + *, + in_progress_refresh_job_id: Optional[str] = None, + last_completed_refresh_job_time_in_utc: Optional[datetime.datetime] = None, + error_manifest_file: Optional[str] = None, + last_job: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RemoteSupportSettings(_Model): + """RemoteApplicationType for which remote support settings is being modified. + + :ivar remote_application_type: Remote application type. Known values are: "Powershell", "WAC", + "LocalUI", and "AllApplications". + :vartype remote_application_type: str or ~azure.mgmt.databoxedge.models.RemoteApplicationType + :ivar access_level: Access level allowed for this remote application type. Known values are: + "None", "ReadOnly", "ReadWrite", and "FullAccess". + :vartype access_level: str or ~azure.mgmt.databoxedge.models.AccessLevel + :ivar expiration_time_stamp_in_utc: Expiration time stamp. + :vartype expiration_time_stamp_in_utc: ~datetime.datetime + """ + + remote_application_type: Optional[Union[str, "_models.RemoteApplicationType"]] = rest_field( + name="remoteApplicationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Remote application type. Known values are: \"Powershell\", \"WAC\", \"LocalUI\", and + \"AllApplications\".""" + access_level: Optional[Union[str, "_models.AccessLevel"]] = rest_field( + name="accessLevel", visibility=["read", "create", "update", "delete", "query"] + ) + """Access level allowed for this remote application type. Known values are: \"None\", + \"ReadOnly\", \"ReadWrite\", and \"FullAccess\".""" + expiration_time_stamp_in_utc: Optional[datetime.datetime] = rest_field( + name="expirationTimeStampInUTC", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Expiration time stamp.""" + + @overload + def __init__( + self, + *, + remote_application_type: Optional[Union[str, "_models.RemoteApplicationType"]] = None, + access_level: Optional[Union[str, "_models.AccessLevel"]] = None, + expiration_time_stamp_in_utc: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceIdentity(_Model): + """Msi identity details of the resource. + + :ivar type: Identity type. Known values are: "None", "SystemAssigned", and "UserAssigned". + :vartype 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 + """ + + type: Optional[Union[str, "_models.MsiIdentityType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Identity type. Known values are: \"None\", \"SystemAssigned\", and \"UserAssigned\".""" + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """Service Principal Id backing the Msi.""" + tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"]) + """Home Tenant Id.""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.MsiIdentityType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceMoveDetails(_Model): + """Fields for tracking resource move. + + :ivar operation_in_progress: Denotes whether move operation is in progress. Known values are: + "None", "ResourceMoveInProgress", and "ResourceMoveFailed". + :vartype operation_in_progress: str or ~azure.mgmt.databoxedge.models.ResourceMoveStatus + :ivar operation_in_progress_lock_timeout_in_utc: Denotes the timeout of the operation to + finish. + :vartype operation_in_progress_lock_timeout_in_utc: ~datetime.datetime + """ + + operation_in_progress: Optional[Union[str, "_models.ResourceMoveStatus"]] = rest_field( + name="operationInProgress", visibility=["read", "create", "update", "delete", "query"] + ) + """Denotes whether move operation is in progress. Known values are: \"None\", + \"ResourceMoveInProgress\", and \"ResourceMoveFailed\".""" + operation_in_progress_lock_timeout_in_utc: Optional[datetime.datetime] = rest_field( + name="operationInProgressLockTimeoutInUTC", + visibility=["read", "create", "update", "delete", "query"], + format="rfc3339", + ) + """Denotes the timeout of the operation to finish.""" + + @overload + def __init__( + self, + *, + operation_in_progress: Optional[Union[str, "_models.ResourceMoveStatus"]] = None, + operation_in_progress_lock_timeout_in_utc: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoleSinkInfo(_Model): + """Compute role against which events will be raised. + + :ivar role_id: Compute role ID. Required. + :vartype role_id: str + """ + + role_id: str = rest_field(name="roleId", visibility=["read", "create", "update", "delete", "query"]) + """Compute role ID. Required.""" + + @overload + def __init__( + self, + *, + role_id: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Secret(_Model): + """Holds device secret either as a KeyVault reference or as an encrypted value. + + :ivar encrypted_secret: Encrypted (using device public key) secret value. + :vartype encrypted_secret: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :ivar key_vault_id: Id of the Key-Vault where secret is stored (ex: + secrets/AuthClientSecret/82ef4346187a4033a10d629cde07d740). + :vartype key_vault_id: str + """ + + encrypted_secret: Optional["_models.AsymmetricEncryptedSecret"] = rest_field( + name="encryptedSecret", visibility=["read", "create", "update", "delete", "query"] + ) + """Encrypted (using device public key) secret value.""" + key_vault_id: Optional[str] = rest_field( + name="keyVaultId", visibility=["read", "create", "update", "delete", "query"] + ) + """Id of the Key-Vault where secret is stored (ex: + secrets/AuthClientSecret/82ef4346187a4033a10d629cde07d740).""" + + @overload + def __init__( + self, + *, + encrypted_secret: Optional["_models.AsymmetricEncryptedSecret"] = None, + key_vault_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SecuritySettings(ARMBaseModel): + """The security settings of a device. + + :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 properties: Properties of the security settings. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.SecuritySettingsProperties + """ + + properties: "_models.SecuritySettingsProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the security settings. Required.""" + + __flattened_items = ["device_admin_password"] + + @overload + def __init__( + self, + *, + properties: "_models.SecuritySettingsProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class SecuritySettingsProperties(_Model): + """The properties of security settings. + + :ivar device_admin_password: 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. Required. + :vartype device_admin_password: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + device_admin_password: "_models.AsymmetricEncryptedSecret" = rest_field( + name="deviceAdminPassword", visibility=["read", "create", "update", "delete", "query"] + ) + """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. + Required.""" + + @overload + def __init__( + self, + *, + device_admin_password: "_models.AsymmetricEncryptedSecret", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ServiceSpecification(_Model): + """Service specification. + + :ivar metric_specifications: Metric specification as defined by shoebox. + :vartype metric_specifications: list[~azure.mgmt.databoxedge.models.MetricSpecification_V1] + """ + + metric_specifications: Optional[list["_models.MetricSpecification_V1"]] = rest_field( + name="metricSpecifications", visibility=["read", "create", "update", "delete", "query"] + ) + """Metric specification as defined by shoebox.""" + + @overload + def __init__( + self, + *, + metric_specifications: Optional[list["_models.MetricSpecification_V1"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Share(ProxyResource): + """Represents a share on the Data Box Edge/Gateway device. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: The share properties. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.ShareProperties + """ + + properties: "_models.ShareProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The share properties. Required.""" + + __flattened_items = [ + "description", + "share_status", + "monitoring_status", + "azure_container_info", + "access_protocol", + "user_access_rights", + "client_access_rights", + "refresh_details", + "share_mappings", + "data_policy", + ] + + @overload + def __init__( + self, + *, + properties: "_models.ShareProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ShareAccessRight(_Model): + """Specifies the mapping between this particular user and the type of access he has on shares on + this device. + + :ivar share_id: The share ID. Required. + :vartype share_id: str + :ivar access_type: Type of access to be allowed on the share for this user. Required. Known + values are: "Change", "Read", and "Custom". + :vartype access_type: str or ~azure.mgmt.databoxedge.models.ShareAccessType + """ + + share_id: str = rest_field(name="shareId", visibility=["read", "create", "update", "delete", "query"]) + """The share ID. Required.""" + access_type: Union[str, "_models.ShareAccessType"] = rest_field( + name="accessType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of access to be allowed on the share for this user. Required. Known values are: + \"Change\", \"Read\", and \"Custom\".""" + + @overload + def __init__( + self, + *, + share_id: str, + access_type: Union[str, "_models.ShareAccessType"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ShareProperties(_Model): + """The share properties. + + :ivar description: Description for the share. + :vartype description: str + :ivar share_status: Current status of the share. Required. Known values are: "Offline", + "Unknown", "OK", "Updating", and "NeedsAttention". + :vartype share_status: str or ~azure.mgmt.databoxedge.models.ShareStatus + :ivar monitoring_status: Current monitoring status of the share. Required. Known values are: + "Enabled" and "Disabled". + :vartype monitoring_status: str or ~azure.mgmt.databoxedge.models.MonitoringStatus + :ivar azure_container_info: Azure container mapping for the share. + :vartype azure_container_info: ~azure.mgmt.databoxedge.models.AzureContainerInfo + :ivar access_protocol: Access protocol to be used by the share. Required. Known values are: + "SMB" and "NFS". + :vartype access_protocol: str or ~azure.mgmt.databoxedge.models.ShareAccessProtocol + :ivar user_access_rights: Mapping of users and corresponding access rights on the share + (required for SMB protocol). + :vartype user_access_rights: list[~azure.mgmt.databoxedge.models.UserAccessRight] + :ivar client_access_rights: List of IP addresses and corresponding access rights on the + share(required for NFS protocol). + :vartype client_access_rights: list[~azure.mgmt.databoxedge.models.ClientAccessRight] + :ivar refresh_details: Details of the refresh job on this share. + :vartype 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] + :ivar data_policy: Data policy of the share. Known values are: "Cloud" and "Local". + :vartype data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy + """ + + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description for the share.""" + share_status: Union[str, "_models.ShareStatus"] = rest_field( + name="shareStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Current status of the share. Required. Known values are: \"Offline\", \"Unknown\", \"OK\", + \"Updating\", and \"NeedsAttention\".""" + monitoring_status: Union[str, "_models.MonitoringStatus"] = rest_field( + name="monitoringStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Current monitoring status of the share. Required. Known values are: \"Enabled\" and + \"Disabled\".""" + azure_container_info: Optional["_models.AzureContainerInfo"] = rest_field( + name="azureContainerInfo", visibility=["read", "create", "update", "delete", "query"] + ) + """Azure container mapping for the share.""" + access_protocol: Union[str, "_models.ShareAccessProtocol"] = rest_field( + name="accessProtocol", visibility=["read", "create", "update", "delete", "query"] + ) + """Access protocol to be used by the share. Required. Known values are: \"SMB\" and \"NFS\".""" + user_access_rights: Optional[list["_models.UserAccessRight"]] = rest_field( + name="userAccessRights", visibility=["read", "create", "update", "delete", "query"] + ) + """Mapping of users and corresponding access rights on the share (required for SMB protocol).""" + client_access_rights: Optional[list["_models.ClientAccessRight"]] = rest_field( + name="clientAccessRights", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP addresses and corresponding access rights on the share(required for NFS protocol).""" + refresh_details: Optional["_models.RefreshDetails"] = rest_field( + name="refreshDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """Details of the refresh job on this share.""" + share_mappings: Optional[list["_models.MountPointMap"]] = rest_field(name="shareMappings", visibility=["read"]) + """Share mount point to the role.""" + data_policy: Optional[Union[str, "_models.DataPolicy"]] = rest_field( + name="dataPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Data policy of the share. Known values are: \"Cloud\" and \"Local\".""" + + @overload + def __init__( + self, + *, + share_status: Union[str, "_models.ShareStatus"], + monitoring_status: Union[str, "_models.MonitoringStatus"], + access_protocol: Union[str, "_models.ShareAccessProtocol"], + description: Optional[str] = None, + azure_container_info: Optional["_models.AzureContainerInfo"] = None, + user_access_rights: Optional[list["_models.UserAccessRight"]] = None, + client_access_rights: Optional[list["_models.ClientAccessRight"]] = None, + refresh_details: Optional["_models.RefreshDetails"] = None, + data_policy: Optional[Union[str, "_models.DataPolicy"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Sku(_Model): + """The SKU type. + + :ivar name: SKU name. Known values are: "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", "EP2_64_Mx1_W", "EP2_128_GPU1_Mx1_W", + "EP2_256_GPU2_Mx1", and "EdgeMR_TCP". + :vartype name: str or ~azure.mgmt.databoxedge.models.SkuName + :ivar tier: The SKU tier. This is based on the SKU name. "Standard" + :vartype tier: str or ~azure.mgmt.databoxedge.models.SkuTier + """ + + name: Optional[Union[str, "_models.SkuName"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """SKU name. Known values are: \"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\", + \"EP2_64_Mx1_W\", \"EP2_128_GPU1_Mx1_W\", \"EP2_256_GPU2_Mx1\", and \"EdgeMR_TCP\".""" + tier: Optional[Union[str, "_models.SkuTier"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The SKU tier. This is based on the SKU name. \"Standard\"""" + + @overload + def __init__( + self, + *, + name: Optional[Union[str, "_models.SkuName"]] = None, + tier: Optional[Union[str, "_models.SkuTier"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SkuCapability(_Model): + """The metadata to describe the capability. + + :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 + """ + + name: Optional[str] = rest_field(visibility=["read"]) + """An invariant to describe the feature.""" + value: Optional[str] = rest_field(visibility=["read"]) + """An invariant if the feature is measured by quantity.""" + + +class SkuCost(_Model): + """The metadata for retrieving price info. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The cost quantity. + :vartype quantity: int + :ivar extended_unit: The extended unit. + :vartype extended_unit: str + """ + + meter_id: Optional[str] = rest_field(name="meterId", visibility=["read"]) + """Used for querying price from commerce.""" + quantity: Optional[int] = rest_field(visibility=["read"]) + """The cost quantity.""" + extended_unit: Optional[str] = rest_field(name="extendedUnit", visibility=["read"]) + """The extended unit.""" + + +class SkuLocationInfo(_Model): + """The location info. + + :ivar location: The location. + :vartype location: str + :ivar zones: The zones. + :vartype zones: list[str] + :ivar sites: The sites. + :vartype sites: list[str] + """ + + location: Optional[str] = rest_field(visibility=["read"]) + """The location.""" + zones: Optional[list[str]] = rest_field(visibility=["read"]) + """The zones.""" + sites: Optional[list[str]] = rest_field(visibility=["read"]) + """The sites.""" + + +class StorageAccount(ProxyResource): + """Represents a Storage Account on the Data Box Edge/Gateway device. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: The Storage Account properties. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.StorageAccountProperties + """ + + properties: "_models.StorageAccountProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The Storage Account properties. Required.""" + + __flattened_items = [ + "description", + "storage_account_status", + "data_policy", + "storage_account_credential_id", + "blob_endpoint", + "container_count", + ] + + @overload + def __init__( + self, + *, + properties: "_models.StorageAccountProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class StorageAccountCredential(ProxyResource): + """The storage account credential. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: The storage account credential properties. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.StorageAccountCredentialProperties + """ + + properties: "_models.StorageAccountCredentialProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The storage account credential properties. Required.""" + + __flattened_items = [ + "alias", + "user_name", + "account_key", + "connection_string", + "ssl_status", + "blob_domain_name", + "account_type", + "storage_account_id", + ] + + @overload + def __init__( + self, + *, + properties: "_models.StorageAccountCredentialProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class StorageAccountCredentialProperties(_Model): + """The storage account credential properties. + + :ivar alias: Alias for the storage account. Required. + :vartype alias: str + :ivar user_name: Username for the storage account. + :vartype user_name: str + :ivar account_key: Encrypted storage key. + :vartype account_key: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + :ivar connection_string: Connection string for the storage account. Use this string if username + and account key are not specified. + :vartype connection_string: str + :ivar ssl_status: Signifies whether SSL needs to be enabled or not. Required. Known values are: + "Enabled" and "Disabled". + :vartype ssl_status: str or ~azure.mgmt.databoxedge.models.SSLStatus + :ivar blob_domain_name: Blob end point for private clouds. + :vartype blob_domain_name: str + :ivar account_type: Type of storage accessed on the storage account. Required. Known values + are: "GeneralPurposeStorage" and "BlobStorage". + :vartype account_type: str or ~azure.mgmt.databoxedge.models.AccountType + :ivar storage_account_id: Id of the storage account. + :vartype storage_account_id: str + """ + + alias: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Alias for the storage account. Required.""" + user_name: Optional[str] = rest_field(name="userName", visibility=["read", "create", "update", "delete", "query"]) + """Username for the storage account.""" + account_key: Optional["_models.AsymmetricEncryptedSecret"] = rest_field( + name="accountKey", visibility=["read", "create", "update", "delete", "query"] + ) + """Encrypted storage key.""" + connection_string: Optional[str] = rest_field( + name="connectionString", visibility=["read", "create", "update", "delete", "query"] + ) + """Connection string for the storage account. Use this string if username and account key are not + specified.""" + ssl_status: Union[str, "_models.SSLStatus"] = rest_field( + name="sslStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Signifies whether SSL needs to be enabled or not. Required. Known values are: \"Enabled\" and + \"Disabled\".""" + blob_domain_name: Optional[str] = rest_field( + name="blobDomainName", visibility=["read", "create", "update", "delete", "query"] + ) + """Blob end point for private clouds.""" + account_type: Union[str, "_models.AccountType"] = rest_field( + name="accountType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of storage accessed on the storage account. Required. Known values are: + \"GeneralPurposeStorage\" and \"BlobStorage\".""" + storage_account_id: Optional[str] = rest_field( + name="storageAccountId", visibility=["read", "create", "update", "delete", "query"] + ) + """Id of the storage account.""" + + @overload + def __init__( + self, + *, + alias: str, + ssl_status: Union[str, "_models.SSLStatus"], + account_type: Union[str, "_models.AccountType"], + user_name: Optional[str] = None, + account_key: Optional["_models.AsymmetricEncryptedSecret"] = None, + connection_string: Optional[str] = None, + blob_domain_name: Optional[str] = None, + storage_account_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StorageAccountProperties(_Model): + """The storage account properties. + + :ivar description: Description for the storage Account. + :vartype description: str + :ivar storage_account_status: Current status of the storage account. Known values are: "OK", + "Offline", "Unknown", "Updating", and "NeedsAttention". + :vartype storage_account_status: str or ~azure.mgmt.databoxedge.models.StorageAccountStatus + :ivar data_policy: Data policy of the storage Account. Required. Known values are: "Cloud" and + "Local". + :vartype data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy + :ivar storage_account_credential_id: Storage Account Credential Id. + :vartype 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 + """ + + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Description for the storage Account.""" + storage_account_status: Optional[Union[str, "_models.StorageAccountStatus"]] = rest_field( + name="storageAccountStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Current status of the storage account. Known values are: \"OK\", \"Offline\", \"Unknown\", + \"Updating\", and \"NeedsAttention\".""" + data_policy: Union[str, "_models.DataPolicy"] = rest_field( + name="dataPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Data policy of the storage Account. Required. Known values are: \"Cloud\" and \"Local\".""" + storage_account_credential_id: Optional[str] = rest_field( + name="storageAccountCredentialId", visibility=["read", "create", "update", "delete", "query"] + ) + """Storage Account Credential Id.""" + blob_endpoint: Optional[str] = rest_field(name="blobEndpoint", visibility=["read"]) + """BlobEndpoint of Storage Account.""" + container_count: Optional[int] = rest_field(name="containerCount", visibility=["read"]) + """The Container Count. Present only for Storage Accounts with DataPolicy set to Cloud.""" + + @overload + def __init__( + self, + *, + data_policy: Union[str, "_models.DataPolicy"], + description: Optional[str] = None, + storage_account_status: Optional[Union[str, "_models.StorageAccountStatus"]] = None, + storage_account_credential_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SubscriptionProperties(_Model): + """SubscriptionProperties. + + :ivar tenant_id: + :vartype tenant_id: str + :ivar location_placement_id: + :vartype location_placement_id: str + :ivar quota_id: + :vartype quota_id: str + :ivar serialized_details: + :vartype serialized_details: str + :ivar registered_features: + :vartype registered_features: + list[~azure.mgmt.databoxedge.models.SubscriptionRegisteredFeatures] + """ + + tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read", "create", "update", "delete", "query"]) + location_placement_id: Optional[str] = rest_field( + name="locationPlacementId", visibility=["read", "create", "update", "delete", "query"] + ) + quota_id: Optional[str] = rest_field(name="quotaId", visibility=["read", "create", "update", "delete", "query"]) + serialized_details: Optional[str] = rest_field( + name="serializedDetails", visibility=["read", "create", "update", "delete", "query"] + ) + registered_features: Optional[list["_models.SubscriptionRegisteredFeatures"]] = rest_field( + name="registeredFeatures", visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + tenant_id: Optional[str] = None, + location_placement_id: Optional[str] = None, + quota_id: Optional[str] = None, + serialized_details: Optional[str] = None, + registered_features: Optional[list["_models.SubscriptionRegisteredFeatures"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SubscriptionRegisteredFeatures(_Model): + """SubscriptionRegisteredFeatures. + + :ivar name: + :vartype name: str + :ivar state: + :vartype state: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + state: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + state: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SupportPackageRequestProperties(_Model): + """The share properties. + + :ivar minimum_time_stamp: MinimumTimeStamp from where logs need to be collected. + :vartype minimum_time_stamp: ~datetime.datetime + :ivar maximum_time_stamp: Start of the timespan of the log collection. + :vartype maximum_time_stamp: ~datetime.datetime + :ivar include: Type of files, which need to be included in the logs + This will contain the type of logs (Default/DefaultWithDumps/None/All/DefaultWithArchived) + or a comma separated list of log types that are required. + :vartype include: str + """ + + minimum_time_stamp: Optional[datetime.datetime] = rest_field( + name="minimumTimeStamp", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """MinimumTimeStamp from where logs need to be collected.""" + maximum_time_stamp: Optional[datetime.datetime] = rest_field( + name="maximumTimeStamp", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Start of the timespan of the log collection.""" + include: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Type of files, which need to be included in the logs + This will contain the type of logs (Default/DefaultWithDumps/None/All/DefaultWithArchived) + or a comma separated list of log types that are required.""" + + @overload + def __init__( + self, + *, + minimum_time_stamp: Optional[datetime.datetime] = None, + maximum_time_stamp: Optional[datetime.datetime] = None, + include: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SymmetricKey(_Model): + """Symmetric key for authentication. + + :ivar connection_string: Connection string based on the symmetric key. + :vartype connection_string: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret + """ + + connection_string: Optional["_models.AsymmetricEncryptedSecret"] = rest_field( + name="connectionString", visibility=["read", "create", "update", "delete", "query"] + ) + """Connection string based on the symmetric key.""" + + @overload + def __init__( + self, + *, + connection_string: Optional["_models.AsymmetricEncryptedSecret"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SystemData(_Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :vartype created_by_type: str or ~azure.mgmt.databoxedge.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", and "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.databoxedge.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) + """The identity that created the resource.""" + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="createdByType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity that created the resource. Known values are: \"User\", \"Application\", + \"ManagedIdentity\", and \"Key\".""" + created_at: Optional[datetime.datetime] = rest_field( + name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of resource creation (UTC).""" + last_modified_by: Optional[str] = rest_field( + name="lastModifiedBy", visibility=["read", "create", "update", "delete", "query"] + ) + """The identity that last modified the resource.""" + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="lastModifiedByType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity that last modified the resource. Known values are: \"User\", + \"Application\", \"ManagedIdentity\", and \"Key\".""" + last_modified_at: Optional[datetime.datetime] = rest_field( + name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of resource last modification (UTC).""" + + @overload + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TrackingInfo(_Model): + """Tracking courier information. + + :ivar serial_number: Serial number of the device being tracked. + :vartype serial_number: str + :ivar carrier_name: Name of the carrier used in the delivery. + :vartype carrier_name: str + :ivar tracking_id: Tracking ID of the shipment. + :vartype tracking_id: str + :ivar tracking_url: Tracking URL of the shipment. + :vartype tracking_url: str + """ + + serial_number: Optional[str] = rest_field( + name="serialNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """Serial number of the device being tracked.""" + carrier_name: Optional[str] = rest_field( + name="carrierName", visibility=["read", "create", "update", "delete", "query"] + ) + """Name of the carrier used in the delivery.""" + tracking_id: Optional[str] = rest_field( + name="trackingId", visibility=["read", "create", "update", "delete", "query"] + ) + """Tracking ID of the shipment.""" + tracking_url: Optional[str] = rest_field( + name="trackingUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """Tracking URL of the shipment.""" + + @overload + def __init__( + self, + *, + serial_number: Optional[str] = None, + carrier_name: Optional[str] = None, + tracking_id: Optional[str] = None, + tracking_url: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TriggerSupportPackageRequest(ARMBaseModel): + """The request object for trigger support package. + + :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 properties: The TriggerSupportPackageRequest properties. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.SupportPackageRequestProperties + """ + + properties: "_models.SupportPackageRequestProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The TriggerSupportPackageRequest properties. Required.""" + + __flattened_items = ["minimum_time_stamp", "maximum_time_stamp", "include"] + + @overload + def __init__( + self, + *, + properties: "_models.SupportPackageRequestProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class UpdateDetails(_Model): + """Update Specific attributes. + + :ivar update_title: Title of the Update. + :vartype update_title: str + :ivar update_size: Size of the update(In Bytes). + :vartype update_size: float + :ivar update_type: Type of the Update. Known values are: "Software", "Kubernetes", and + "Firmware". + :vartype update_type: str or ~azure.mgmt.databoxedge.models.UpdateType + :ivar target_version: Target Version number. + :vartype target_version: str + :ivar friendly_version_number: Friendly Version Number. + :vartype friendly_version_number: str + :ivar estimated_install_time_in_mins: Estimated Install Time for the update. + :vartype estimated_install_time_in_mins: int + :ivar reboot_behavior: Indicates if updates are available and at least one of the updates needs + a reboot. Known values are: "NeverReboots", "RequiresReboot", and "RequestReboot". + :vartype reboot_behavior: str or ~azure.mgmt.databoxedge.models.InstallRebootBehavior + :ivar installation_impact: Impact of Installing an updateType. Known values are: "None", + "DeviceRebooted", and "KubernetesWorkloadsDown". + :vartype installation_impact: str or ~azure.mgmt.databoxedge.models.InstallationImpact + :ivar status: Status of the update. Known values are: "DownloadPending", "DownloadStarted", + "DownloadCompleted", "InstallStarted", and "InstallCompleted". + :vartype status: str or ~azure.mgmt.databoxedge.models.UpdateStatus + """ + + update_title: Optional[str] = rest_field( + name="updateTitle", visibility=["read", "create", "update", "delete", "query"] + ) + """Title of the Update.""" + update_size: Optional[float] = rest_field( + name="updateSize", visibility=["read", "create", "update", "delete", "query"] + ) + """Size of the update(In Bytes).""" + update_type: Optional[Union[str, "_models.UpdateType"]] = rest_field( + name="updateType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of the Update. Known values are: \"Software\", \"Kubernetes\", and \"Firmware\".""" + target_version: Optional[str] = rest_field( + name="targetVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Target Version number.""" + friendly_version_number: Optional[str] = rest_field( + name="friendlyVersionNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """Friendly Version Number.""" + estimated_install_time_in_mins: Optional[int] = rest_field( + name="estimatedInstallTimeInMins", visibility=["read", "create", "update", "delete", "query"] + ) + """Estimated Install Time for the update.""" + reboot_behavior: Optional[Union[str, "_models.InstallRebootBehavior"]] = rest_field( + name="rebootBehavior", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates if updates are available and at least one of the updates needs a reboot. Known values + are: \"NeverReboots\", \"RequiresReboot\", and \"RequestReboot\".""" + installation_impact: Optional[Union[str, "_models.InstallationImpact"]] = rest_field( + name="installationImpact", visibility=["read", "create", "update", "delete", "query"] + ) + """Impact of Installing an updateType. Known values are: \"None\", \"DeviceRebooted\", and + \"KubernetesWorkloadsDown\".""" + status: Optional[Union[str, "_models.UpdateStatus"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Status of the update. Known values are: \"DownloadPending\", \"DownloadStarted\", + \"DownloadCompleted\", \"InstallStarted\", and \"InstallCompleted\".""" + + @overload + def __init__( + self, + *, + update_title: Optional[str] = None, + update_size: Optional[float] = None, + update_type: Optional[Union[str, "_models.UpdateType"]] = None, + target_version: Optional[str] = None, + friendly_version_number: Optional[str] = None, + estimated_install_time_in_mins: Optional[int] = None, + reboot_behavior: Optional[Union[str, "_models.InstallRebootBehavior"]] = None, + installation_impact: Optional[Union[str, "_models.InstallationImpact"]] = None, + status: Optional[Union[str, "_models.UpdateStatus"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UpdateDownloadProgress(_Model): + """Details about the download progress of update. + + :ivar download_phase: The download phase. Known values are: "Unknown", "Initializing", + "Downloading", and "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 + """ + + download_phase: Optional[Union[str, "_models.DownloadPhase"]] = rest_field( + name="downloadPhase", visibility=["read"] + ) + """The download phase. Known values are: \"Unknown\", \"Initializing\", \"Downloading\", and + \"Verifying\".""" + percent_complete: Optional[int] = rest_field(name="percentComplete", visibility=["read"]) + """Percentage of completion.""" + total_bytes_to_download: Optional[float] = rest_field(name="totalBytesToDownload", visibility=["read"]) + """Total bytes to download.""" + total_bytes_downloaded: Optional[float] = rest_field(name="totalBytesDownloaded", visibility=["read"]) + """Total bytes downloaded.""" + number_of_updates_to_download: Optional[int] = rest_field(name="numberOfUpdatesToDownload", visibility=["read"]) + """Number of updates to download.""" + number_of_updates_downloaded: Optional[int] = rest_field(name="numberOfUpdatesDownloaded", visibility=["read"]) + """Number of updates downloaded.""" + + +class UpdateInstallProgress(_Model): + """Progress details during installation of updates. + + :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 + """ + + percent_complete: Optional[int] = rest_field(name="percentComplete", visibility=["read"]) + """Percentage completed.""" + number_of_updates_to_install: Optional[int] = rest_field(name="numberOfUpdatesToInstall", visibility=["read"]) + """Number of updates to install.""" + number_of_updates_installed: Optional[int] = rest_field(name="numberOfUpdatesInstalled", visibility=["read"]) + """Number of updates installed.""" + + +class UpdateSummary(ProxyResource): + """Details about ongoing updates and availability of updates on the device. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: The device update information summary. + :vartype properties: ~azure.mgmt.databoxedge.models.UpdateSummaryProperties + """ + + properties: Optional["_models.UpdateSummaryProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The device update information summary.""" + + __flattened_items = [ + "device_version_number", + "friendly_device_version_name", + "device_last_scanned_date_time", + "last_completed_scan_job_date_time", + "last_successful_scan_job_time", + "last_completed_download_job_date_time", + "last_completed_download_job_id", + "last_download_job_status", + "last_successful_install_job_date_time", + "last_completed_install_job_date_time", + "last_completed_install_job_id", + "last_install_job_status", + "total_number_of_updates_available", + "total_number_of_updates_pending_download", + "total_number_of_updates_pending_install", + "reboot_behavior", + "ongoing_update_operation", + "in_progress_download_job_id", + "in_progress_install_job_id", + "in_progress_download_job_started_date_time", + "in_progress_install_job_started_date_time", + "update_titles", + "updates", + "total_update_size_in_bytes", + "total_time_in_minutes", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.UpdateSummaryProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class UpdateSummaryProperties(_Model): + """The device update information summary. + + :ivar device_version_number: The current version of the device in format: 1.2.17312.13.",. + :vartype device_version_number: str + :ivar friendly_device_version_name: The current version of the device in text format. + :vartype friendly_device_version_name: str + :ivar device_last_scanned_date_time: The last time when a scan was done on the device. + :vartype device_last_scanned_date_time: ~datetime.datetime + :ivar last_completed_scan_job_date_time: The time when the last scan job was completed + (success/cancelled/failed) on the appliance. + :vartype last_completed_scan_job_date_time: ~datetime.datetime + :ivar last_successful_scan_job_time: Time when the last scan job is successfully completed. + :vartype last_successful_scan_job_time: ~datetime.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.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. Known values are: + "Invalid", "Running", "Succeeded", "Failed", "Canceled", "Paused", and "Scheduled". + :vartype last_download_job_status: str or ~azure.mgmt.databoxedge.models.JobStatus + :ivar last_successful_install_job_date_time: The time when the Last Install job was completed + successfully on the appliance. + :vartype last_successful_install_job_date_time: ~datetime.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.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. Known values are: + "Invalid", "Running", "Succeeded", "Failed", "Canceled", "Paused", and "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. Known values are: "NeverReboots", "RequiresReboot", and "RequestReboot". + :vartype reboot_behavior: str or ~azure.mgmt.databoxedge.models.InstallRebootBehavior + :ivar ongoing_update_operation: The current update operation. Known values are: "None", "Scan", + "Download", and "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.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.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 + """ + + device_version_number: Optional[str] = rest_field( + name="deviceVersionNumber", visibility=["read", "create", "update", "delete", "query"] + ) + """The current version of the device in format: 1.2.17312.13.\",.""" + friendly_device_version_name: Optional[str] = rest_field( + name="friendlyDeviceVersionName", visibility=["read", "create", "update", "delete", "query"] + ) + """The current version of the device in text format.""" + device_last_scanned_date_time: Optional[datetime.datetime] = rest_field( + name="deviceLastScannedDateTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The last time when a scan was done on the device.""" + last_completed_scan_job_date_time: Optional[datetime.datetime] = rest_field( + name="lastCompletedScanJobDateTime", + visibility=["read", "create", "update", "delete", "query"], + format="rfc3339", + ) + """The time when the last scan job was completed (success/cancelled/failed) on the appliance.""" + last_successful_scan_job_time: Optional[datetime.datetime] = rest_field( + name="lastSuccessfulScanJobTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Time when the last scan job is successfully completed.""" + last_completed_download_job_date_time: Optional[datetime.datetime] = rest_field( + name="lastCompletedDownloadJobDateTime", visibility=["read"], format="rfc3339" + ) + """The time when the last Download job was completed (success/cancelled/failed) on the appliance.""" + last_completed_download_job_id: Optional[str] = rest_field(name="lastCompletedDownloadJobId", visibility=["read"]) + """JobId of the last ran download job.(Can be success/cancelled/failed).""" + last_download_job_status: Optional[Union[str, "_models.JobStatus"]] = rest_field( + name="lastDownloadJobStatus", visibility=["read"] + ) + """JobStatus of the last ran download job. Known values are: \"Invalid\", \"Running\", + \"Succeeded\", \"Failed\", \"Canceled\", \"Paused\", and \"Scheduled\".""" + last_successful_install_job_date_time: Optional[datetime.datetime] = rest_field( + name="lastSuccessfulInstallJobDateTime", + visibility=["read", "create", "update", "delete", "query"], + format="rfc3339", + ) + """The time when the Last Install job was completed successfully on the appliance.""" + last_completed_install_job_date_time: Optional[datetime.datetime] = rest_field( + name="lastCompletedInstallJobDateTime", visibility=["read"], format="rfc3339" + ) + """The time when the last Install job was completed (success/cancelled/failed) on the appliance.""" + last_completed_install_job_id: Optional[str] = rest_field(name="lastCompletedInstallJobId", visibility=["read"]) + """JobId of the last ran install job.(Can be success/cancelled/failed).""" + last_install_job_status: Optional[Union[str, "_models.JobStatus"]] = rest_field( + name="lastInstallJobStatus", visibility=["read"] + ) + """JobStatus of the last ran install job. Known values are: \"Invalid\", \"Running\", + \"Succeeded\", \"Failed\", \"Canceled\", \"Paused\", and \"Scheduled\".""" + total_number_of_updates_available: Optional[int] = rest_field( + name="totalNumberOfUpdatesAvailable", visibility=["read"] + ) + """The number of updates available for the current device version as per the last device scan.""" + total_number_of_updates_pending_download: Optional[int] = rest_field( + name="totalNumberOfUpdatesPendingDownload", visibility=["read"] + ) + """The total number of items pending download.""" + total_number_of_updates_pending_install: Optional[int] = rest_field( + name="totalNumberOfUpdatesPendingInstall", visibility=["read"] + ) + """The total number of items pending install.""" + reboot_behavior: Optional[Union[str, "_models.InstallRebootBehavior"]] = rest_field( + name="rebootBehavior", visibility=["read"] + ) + """Indicates if updates are available and at least one of the updates needs a reboot. Known values + are: \"NeverReboots\", \"RequiresReboot\", and \"RequestReboot\".""" + ongoing_update_operation: Optional[Union[str, "_models.UpdateOperation"]] = rest_field( + name="ongoingUpdateOperation", visibility=["read"] + ) + """The current update operation. Known values are: \"None\", \"Scan\", \"Download\", and + \"Install\".""" + in_progress_download_job_id: Optional[str] = rest_field(name="inProgressDownloadJobId", visibility=["read"]) + """The job ID of the download job in progress.""" + in_progress_install_job_id: Optional[str] = rest_field(name="inProgressInstallJobId", visibility=["read"]) + """The job ID of the install job in progress.""" + in_progress_download_job_started_date_time: Optional[datetime.datetime] = rest_field( + name="inProgressDownloadJobStartedDateTime", visibility=["read"], format="rfc3339" + ) + """The time when the currently running download (if any) started.""" + in_progress_install_job_started_date_time: Optional[datetime.datetime] = rest_field( + name="inProgressInstallJobStartedDateTime", visibility=["read"], format="rfc3339" + ) + """The time when the currently running install (if any) started.""" + update_titles: Optional[list[str]] = rest_field(name="updateTitles", visibility=["read"]) + """The list of updates available for install.""" + updates: Optional[list["_models.UpdateDetails"]] = rest_field(visibility=["read"]) + """The list of updates available for install.""" + total_update_size_in_bytes: Optional[float] = rest_field(name="totalUpdateSizeInBytes", visibility=["read"]) + """The total size of updates available for download in bytes.""" + total_time_in_minutes: Optional[int] = rest_field(name="totalTimeInMinutes", visibility=["read"]) + """The total time in Minutes.""" + + @overload + def __init__( # pylint: disable=too-many-locals + self, + *, + device_version_number: Optional[str] = None, + friendly_device_version_name: Optional[str] = None, + device_last_scanned_date_time: Optional[datetime.datetime] = None, + last_completed_scan_job_date_time: Optional[datetime.datetime] = None, + last_successful_scan_job_time: Optional[datetime.datetime] = None, + last_successful_install_job_date_time: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UploadCertificateRequest(_Model): + """The upload certificate request. + + :ivar properties: The Base 64 encoded certificate raw data. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.RawCertificateData + """ + + properties: "_models.RawCertificateData" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The Base 64 encoded certificate raw data. Required.""" + + __flattened_items = ["authentication_type", "certificate"] + + @overload + def __init__( + self, + *, + properties: "_models.RawCertificateData", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class UploadCertificateResponse(_Model): + """The upload registration certificate response. + + :ivar auth_type: Specifies authentication type. Known values are: "Invalid" and + "AzureActiveDirectory". + :vartype 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 + """ + + auth_type: Optional[Union[str, "_models.AuthenticationType"]] = rest_field( + name="authType", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies authentication type. Known values are: \"Invalid\" and \"AzureActiveDirectory\".""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """The resource ID of the Data Box Edge/Gateway device.""" + aad_authority: Optional[str] = rest_field(name="aadAuthority", visibility=["read"]) + """Azure Active Directory tenant authority.""" + aad_tenant_id: Optional[str] = rest_field(name="aadTenantId", visibility=["read"]) + """Azure Active Directory tenant ID.""" + service_principal_client_id: Optional[str] = rest_field(name="servicePrincipalClientId", visibility=["read"]) + """Azure Active Directory service principal client ID.""" + service_principal_object_id: Optional[str] = rest_field(name="servicePrincipalObjectId", visibility=["read"]) + """Azure Active Directory service principal object ID.""" + azure_management_endpoint_audience: Optional[str] = rest_field( + name="azureManagementEndpointAudience", visibility=["read"] + ) + """The azure management endpoint audience.""" + aad_audience: Optional[str] = rest_field(name="aadAudience", visibility=["read"]) + """Identifier of the target resource that is the recipient of the requested token.""" + + @overload + def __init__( + self, + *, + auth_type: Optional[Union[str, "_models.AuthenticationType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class User(ProxyResource): + """Represents a user who has access to one or more shares on the Data Box Edge/Gateway device. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData + :ivar properties: The storage account credential properties. Required. + :vartype properties: ~azure.mgmt.databoxedge.models.UserProperties + """ + + properties: "_models.UserProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The storage account credential properties. Required.""" + + __flattened_items = ["encrypted_password", "share_access_rights", "user_type"] + + @overload + def __init__( + self, + *, + properties: "_models.UserProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class UserAccessRight(_Model): + """The mapping between a particular user and the access type on the SMB share. + + :ivar user_id: User ID (already existing in the device). Required. + :vartype user_id: str + :ivar access_type: Type of access to be allowed for the user. Required. Known values are: + "Change", "Read", and "Custom". + :vartype access_type: str or ~azure.mgmt.databoxedge.models.ShareAccessType + """ + + user_id: str = rest_field(name="userId", visibility=["read", "create", "update", "delete", "query"]) + """User ID (already existing in the device). Required.""" + access_type: Union[str, "_models.ShareAccessType"] = rest_field( + name="accessType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of access to be allowed for the user. Required. Known values are: \"Change\", \"Read\", + and \"Custom\".""" + + @overload + def __init__( + self, + *, + user_id: str, + access_type: Union[str, "_models.ShareAccessType"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UserProperties(_Model): + """The user properties. + + :ivar encrypted_password: The password details. + :vartype 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] + :ivar user_type: Type of the user. Required. Known values are: "Share", "LocalManagement", and + "ARM". + :vartype user_type: str or ~azure.mgmt.databoxedge.models.UserType + """ + + encrypted_password: Optional["_models.AsymmetricEncryptedSecret"] = rest_field( + name="encryptedPassword", visibility=["read", "create", "update", "delete", "query"] + ) + """The password details.""" + share_access_rights: Optional[list["_models.ShareAccessRight"]] = rest_field( + name="shareAccessRights", visibility=["read"] + ) + """List of shares that the user has rights on. This field should not be specified during user + creation.""" + user_type: Union[str, "_models.UserType"] = rest_field( + name="userType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of the user. Required. Known values are: \"Share\", \"LocalManagement\", and \"ARM\".""" + + @overload + def __init__( + self, + *, + user_type: Union[str, "_models.UserType"], + encrypted_password: Optional["_models.AsymmetricEncryptedSecret"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class VmMemory(_Model): + """VmMemory Data. + + :ivar startup_memory_mb: The total amount of RAM in the virtual machine, as seen by the guest + operating system. For a virtual machine with dynamic memory enabled, this represents the + initial memory available at startup. + :vartype startup_memory_mb: int + :ivar current_memory_usage_mb: The current memory used by the virtual machine. + :vartype current_memory_usage_mb: int + """ + + startup_memory_mb: Optional[int] = rest_field( + name="startupMemoryMB", visibility=["read", "create", "update", "delete", "query"] + ) + """The total amount of RAM in the virtual machine, as seen by the guest operating system. For a + virtual machine with dynamic memory enabled, this represents the initial memory available at + startup.""" + current_memory_usage_mb: Optional[int] = rest_field( + name="currentMemoryUsageMB", visibility=["read", "create", "update", "delete", "query"] + ) + """The current memory used by the virtual machine.""" + + @overload + def __init__( + self, + *, + startup_memory_mb: Optional[int] = None, + current_memory_usage_mb: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class VmPlacementRequestResult(_Model): + """List of VM sizes being checked for creation on appliance along with corresponding result. + + :ivar vm_size: List of VM sizes being checked. + :vartype vm_size: list[str] + :ivar is_feasible: Boolean value indicating if the VM(s) in VmSize can be created. + :vartype is_feasible: bool + :ivar message_code: MessageCode indicating reason for success or failure. + :vartype message_code: str + :ivar message: Localized message to be displayed to the user to explain the check result. + :vartype message: str + """ + + vm_size: Optional[list[str]] = rest_field(name="vmSize", visibility=["read", "create", "update", "delete", "query"]) + """List of VM sizes being checked.""" + is_feasible: Optional[bool] = rest_field( + name="isFeasible", visibility=["read", "create", "update", "delete", "query"] + ) + """Boolean value indicating if the VM(s) in VmSize can be created.""" + message_code: Optional[str] = rest_field( + name="messageCode", visibility=["read", "create", "update", "delete", "query"] + ) + """MessageCode indicating reason for success or failure.""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Localized message to be displayed to the user to explain the check result.""" + + @overload + def __init__( + self, + *, + vm_size: Optional[list[str]] = None, + is_feasible: Optional[bool] = None, + message_code: Optional[str] = None, + message: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_models_py3.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_models_py3.py deleted file mode 100644 index 062df69e0202..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_models_py3.py +++ /dev/null @@ -1,5948 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import datetime -from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union - -from .._utils import serialization as _serialization - -if TYPE_CHECKING: - from .. import models as _models - - -class ARMBaseModel(_serialization.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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.name: Optional[str] = None - self.type: Optional[str] = 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 server. - - :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 kind: Addon type. Required. Known values are: "IotEdge" and "ArcForKubernetes". - :vartype kind: str or ~azure.mgmt.databoxedge.models.AddonType - :ivar system_data: Addon type. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - } - - _subtype_map = {"kind": {"ArcForKubernetes": "ArcAddon", "IotEdge": "IoTAddon"}} - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.kind: Optional[str] = None - self.system_data: Optional["_models.SystemData"] = None - - -class AddonList(_serialization.Model): - """Collection of all the Role addon on the Azure Stack Edge device. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The Value. - :vartype value: list[~azure.mgmt.databoxedge.models.Addon] - :ivar next_link: Link to the next set of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Addon]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[List["_models.Addon"]] = None - self.next_link: Optional[str] = None - - -class Address(_serialization.Model): - """The shipping address of the customer. - - All required parameters must be populated in order to send to server. - - :ivar address_line1: The address line1. - :vartype address_line1: str - :ivar address_line2: The address line2. - :vartype address_line2: str - :ivar address_line3: The address line3. - :vartype address_line3: str - :ivar postal_code: The postal code. - :vartype postal_code: str - :ivar city: The city name. - :vartype city: str - :ivar state: The state name. - :vartype state: str - :ivar country: The country name. Required. - :vartype 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: Optional[str] = None, - address_line2: Optional[str] = None, - address_line3: Optional[str] = None, - postal_code: Optional[str] = None, - city: Optional[str] = None, - state: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword address_line1: The address line1. - :paramtype address_line1: str - :keyword address_line2: The address line2. - :paramtype address_line2: str - :keyword address_line3: The address line3. - :paramtype address_line3: str - :keyword postal_code: The postal code. - :paramtype postal_code: str - :keyword city: The city name. - :paramtype city: str - :keyword state: The state name. - :paramtype state: str - :keyword country: The country name. Required. - :paramtype country: str - """ - super().__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 - :ivar system_data: Alert generated in the resource. - :vartype 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.datetime - :ivar recommendation: Alert recommendation. - :vartype recommendation: str - :ivar severity: Severity of the alert. Known values are: "Informational", "Warning", and - "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}, - "system_data": {"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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.system_data: Optional["_models.SystemData"] = None - self.title: Optional[str] = None - self.alert_type: Optional[str] = None - self.appeared_at_date_time: Optional[datetime.datetime] = None - self.recommendation: Optional[str] = None - self.severity: Optional[Union[str, "_models.AlertSeverity"]] = None - self.error_details: Optional["_models.AlertErrorDetails"] = None - self.detailed_information: Optional[Dict[str, str]] = None - - -class AlertErrorDetails(_serialization.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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.error_code: Optional[str] = None - self.error_message: Optional[str] = None - self.occurrences: Optional[int] = None - - -class AlertList(_serialization.Model): - """Collection of alerts. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The value. - :vartype value: list[~azure.mgmt.databoxedge.models.Alert] - :ivar next_link: Link to the next set of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Alert]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[List["_models.Alert"]] = None - self.next_link: Optional[str] = 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 server. - - :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 kind: Addon type. Required. Known values are: "IotEdge" and "ArcForKubernetes". - :vartype kind: str or ~azure.mgmt.databoxedge.models.AddonType - :ivar system_data: Addon type. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar subscription_id: Arc resource subscription Id. Required. - :vartype subscription_id: str - :ivar resource_group_name: Arc resource group name. Required. - :vartype resource_group_name: str - :ivar resource_name: Arc resource Name. Required. - :vartype resource_name: str - :ivar resource_location: Arc resource location. Required. - :vartype resource_location: str - :ivar version: Arc resource version. - :vartype version: str - :ivar host_platform: Host OS supported by the Arc addon. Known values are: "Windows" and - "Linux". - :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType - :ivar host_platform_type: Platform where the runtime is hosted. Known values are: - "KubernetesCluster" and "LinuxVM". - :vartype host_platform_type: str or ~azure.mgmt.databoxedge.models.HostPlatformType - :ivar provisioning_state: Addon Provisioning State. Known values are: "Invalid", "Creating", - "Created", "Updating", "Reconfiguring", "Failed", and "Deleting". - :vartype provisioning_state: str or ~azure.mgmt.databoxedge.models.AddonState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - "system_data": {"readonly": 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"}, - "kind": {"key": "kind", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "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, - **kwargs: Any - ) -> None: - """ - :keyword subscription_id: Arc resource subscription Id. Required. - :paramtype subscription_id: str - :keyword resource_group_name: Arc resource group name. Required. - :paramtype resource_group_name: str - :keyword resource_name: Arc resource Name. Required. - :paramtype resource_name: str - :keyword resource_location: Arc resource location. Required. - :paramtype resource_location: str - """ - super().__init__(**kwargs) - self.kind: str = "ArcForKubernetes" - self.subscription_id = subscription_id - self.resource_group_name = resource_group_name - self.resource_name = resource_name - self.resource_location = resource_location - self.version: Optional[str] = None - self.host_platform: Optional[Union[str, "_models.PlatformType"]] = None - self.host_platform_type: Optional[Union[str, "_models.HostPlatformType"]] = None - self.provisioning_state: Optional[Union[str, "_models.AddonState"]] = None - - -class AsymmetricEncryptedSecret(_serialization.Model): - """Represent the secrets intended for encryption with asymmetric key pair. - - All required parameters must be populated in order to send to server. - - :ivar value: The value of the secret. Required. - :vartype value: str - :ivar encryption_cert_thumbprint: Thumbprint certificate used to encrypt \\"Value\\". If the - value is unencrypted, it will be null. - :vartype encryption_cert_thumbprint: str - :ivar encryption_algorithm: The algorithm used to encrypt "Value". Required. Known values are: - "None", "AES256", and "RSAES_PKCS1_v_1_5". - :vartype 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: Union[str, "_models.EncryptionAlgorithm"], - encryption_cert_thumbprint: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: The value of the secret. Required. - :paramtype value: str - :keyword encryption_cert_thumbprint: Thumbprint certificate used to encrypt \\"Value\\". If the - value is unencrypted, it will be null. - :paramtype encryption_cert_thumbprint: str - :keyword encryption_algorithm: The algorithm used to encrypt "Value". Required. Known values - are: "None", "AES256", and "RSAES_PKCS1_v_1_5". - :paramtype encryption_algorithm: str or ~azure.mgmt.databoxedge.models.EncryptionAlgorithm - """ - super().__init__(**kwargs) - self.value = value - self.encryption_cert_thumbprint = encryption_cert_thumbprint - self.encryption_algorithm = encryption_algorithm - - -class Authentication(_serialization.Model): - """Authentication mechanism for IoT devices. - - :ivar symmetric_key: Symmetric key for authentication. - :vartype symmetric_key: ~azure.mgmt.databoxedge.models.SymmetricKey - """ - - _attribute_map = { - "symmetric_key": {"key": "symmetricKey", "type": "SymmetricKey"}, - } - - def __init__(self, *, symmetric_key: Optional["_models.SymmetricKey"] = None, **kwargs: Any) -> None: - """ - :keyword symmetric_key: Symmetric key for authentication. - :paramtype symmetric_key: ~azure.mgmt.databoxedge.models.SymmetricKey - """ - super().__init__(**kwargs) - self.symmetric_key = symmetric_key - - -class AzureContainerInfo(_serialization.Model): - """Azure container mapping of the endpoint. - - All required parameters must be populated in order to send to server. - - :ivar storage_account_credential_id: ID of the storage account credential used to access - storage. Required. - :vartype storage_account_credential_id: str - :ivar container_name: Container name (Based on the data format specified, this represents the - name of Azure Files/Page blob/Block blob). Required. - :vartype container_name: str - :ivar data_format: Storage format used for the file represented by the share. Required. Known - values are: "BlockBlob", "PageBlob", and "AzureFile". - :vartype 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: Union[str, "_models.AzureContainerDataFormat"], - **kwargs: Any - ) -> None: - """ - :keyword storage_account_credential_id: ID of the storage account credential used to access - storage. Required. - :paramtype storage_account_credential_id: str - :keyword container_name: Container name (Based on the data format specified, this represents - the name of Azure Files/Page blob/Block blob). Required. - :paramtype container_name: str - :keyword data_format: Storage format used for the file represented by the share. Required. - Known values are: "BlockBlob", "PageBlob", and "AzureFile". - :paramtype data_format: str or ~azure.mgmt.databoxedge.models.AzureContainerDataFormat - """ - super().__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 server. - - :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 system_data: Bandwidth object related to ASE resource. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar start: The start time of the schedule in UTC. Required. - :vartype start: str - :ivar stop: The stop time of the schedule in UTC. Required. - :vartype stop: str - :ivar rate_in_mbps: The bandwidth rate in Mbps. Required. - :vartype rate_in_mbps: int - :ivar days: The days of the week when this schedule is applicable. Required. - :vartype days: list[str or ~azure.mgmt.databoxedge.models.DayOfWeek] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"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: List[Union[str, "_models.DayOfWeek"]], **kwargs: Any - ) -> None: - """ - :keyword start: The start time of the schedule in UTC. Required. - :paramtype start: str - :keyword stop: The stop time of the schedule in UTC. Required. - :paramtype stop: str - :keyword rate_in_mbps: The bandwidth rate in Mbps. Required. - :paramtype rate_in_mbps: int - :keyword days: The days of the week when this schedule is applicable. Required. - :paramtype days: list[str or ~azure.mgmt.databoxedge.models.DayOfWeek] - """ - super().__init__(**kwargs) - self.system_data: Optional["_models.SystemData"] = None - self.start = start - self.stop = stop - self.rate_in_mbps = rate_in_mbps - self.days = days - - -class BandwidthSchedulesList(_serialization.Model): - """The collection of bandwidth schedules. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of bandwidth schedules. - :vartype value: list[~azure.mgmt.databoxedge.models.BandwidthSchedule] - :ivar next_link: Link to the next set of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[BandwidthSchedule]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[List["_models.BandwidthSchedule"]] = None - self.next_link: Optional[str] = None - - -class ClientAccessRight(_serialization.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 server. - - :ivar client: IP of the client. Required. - :vartype client: str - :ivar access_permission: Type of access to be allowed for the client. Required. Known values - are: "NoAccess", "ReadOnly", and "ReadWrite". - :vartype 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: Union[str, "_models.ClientPermissionType"], **kwargs: Any - ) -> None: - """ - :keyword client: IP of the client. Required. - :paramtype client: str - :keyword access_permission: Type of access to be allowed for the client. Required. Known values - are: "NoAccess", "ReadOnly", and "ReadWrite". - :paramtype access_permission: str or ~azure.mgmt.databoxedge.models.ClientPermissionType - """ - super().__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 server. - - :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 kind: Role type. Required. Known values are: "IOT", "ASA", "Functions", "Cognitive", - "MEC", "CloudEdgeManagement", and "Kubernetes". - :vartype kind: str or ~azure.mgmt.databoxedge.models.RoleTypes - :ivar system_data: Role configured on ASE resource. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - } - - _subtype_map = { - "kind": { - "CloudEdgeManagement": "CloudEdgeManagementRole", - "IOT": "IoTRole", - "Kubernetes": "KubernetesRole", - "MEC": "MECRole", - } - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.kind: Optional[str] = None - self.system_data: Optional["_models.SystemData"] = None - - -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 server. - - :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 kind: Role type. Required. Known values are: "IOT", "ASA", "Functions", "Cognitive", - "MEC", "CloudEdgeManagement", and "Kubernetes". - :vartype kind: str or ~azure.mgmt.databoxedge.models.RoleTypes - :ivar system_data: Role configured on ASE resource. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar local_management_status: Local Edge Management Status. Known values are: "Enabled" and - "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 - :ivar role_status: Role status. Known values are: "Enabled" and "Disabled". - :vartype role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - "system_data": {"readonly": True}, - "local_management_status": {"readonly": True}, - "edge_profile": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "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: Optional[Union[str, "_models.RoleStatus"]] = None, **kwargs: Any) -> None: - """ - :keyword role_status: Role status. Known values are: "Enabled" and "Disabled". - :paramtype role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus - """ - super().__init__(**kwargs) - self.kind: str = "CloudEdgeManagement" - self.local_management_status: Optional[Union[str, "_models.RoleStatus"]] = None - self.edge_profile: Optional["_models.EdgeProfile"] = None - self.role_status = role_status - - -class CloudErrorBody(_serialization.Model): - """An error response from the service. - - :ivar code: An identifier for the error. Codes are invariant and are intended to be consumed - programmatically. - :vartype code: str - :ivar message: A message describing the error, intended to be suitable for display in a user - interface. - :vartype message: str - :ivar details: A list of additional details about the error. - :vartype 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: Optional[str] = None, - message: Optional[str] = None, - details: Optional[List["_models.CloudErrorBody"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed - programmatically. - :paramtype code: str - :keyword message: A message describing the error, intended to be suitable for display in a user - interface. - :paramtype message: str - :keyword details: A list of additional details about the error. - :paramtype details: list[~azure.mgmt.databoxedge.models.CloudErrorBody] - """ - super().__init__(**kwargs) - self.code = code - self.message = message - self.details = details - - -class CniConfig(_serialization.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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type: Optional[str] = None - self.version: Optional[str] = None - self.pod_subnet: Optional[str] = None - self.service_subnet: Optional[str] = None - - -class ComputeResource(_serialization.Model): - """Compute infrastructure Resource. - - All required parameters must be populated in order to send to server. - - :ivar processor_count: Processor count. Required. - :vartype processor_count: int - :ivar memory_in_gb: Memory in GB. Required. - :vartype memory_in_gb: int - """ - - _validation = { - "processor_count": {"required": True}, - "memory_in_gb": {"required": True}, - } - - _attribute_map = { - "processor_count": {"key": "processorCount", "type": "int"}, - "memory_in_gb": {"key": "memoryInGB", "type": "int"}, - } - - def __init__(self, *, processor_count: int, memory_in_gb: int, **kwargs: Any) -> None: - """ - :keyword processor_count: Processor count. Required. - :paramtype processor_count: int - :keyword memory_in_gb: Memory in GB. Required. - :paramtype memory_in_gb: int - """ - super().__init__(**kwargs) - self.processor_count = processor_count - self.memory_in_gb = memory_in_gb - - -class ContactDetails(_serialization.Model): - """Contains all the contact details of the customer. - - All required parameters must be populated in order to send to server. - - :ivar contact_person: The contact person name. Required. - :vartype contact_person: str - :ivar company_name: The name of the company. Required. - :vartype company_name: str - :ivar phone: The phone number. Required. - :vartype phone: str - :ivar email_list: The email list. Required. - :vartype 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: List[str], **kwargs: Any - ) -> None: - """ - :keyword contact_person: The contact person name. Required. - :paramtype contact_person: str - :keyword company_name: The name of the company. Required. - :paramtype company_name: str - :keyword phone: The phone number. Required. - :paramtype phone: str - :keyword email_list: The email list. Required. - :paramtype email_list: list[str] - """ - super().__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 server. - - :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 system_data: Container in DataBoxEdge Resource. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar container_status: Current status of the container. Known values are: "OK", "Offline", - "Unknown", "Updating", and "NeedsAttention". - :vartype container_status: str or ~azure.mgmt.databoxedge.models.ContainerStatus - :ivar data_format: DataFormat for Container. Required. Known values are: "BlockBlob", - "PageBlob", and "AzureFile". - :vartype 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.datetime - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"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: Union[str, "_models.AzureContainerDataFormat"], **kwargs: Any) -> None: - """ - :keyword data_format: DataFormat for Container. Required. Known values are: "BlockBlob", - "PageBlob", and "AzureFile". - :paramtype data_format: str or ~azure.mgmt.databoxedge.models.AzureContainerDataFormat - """ - super().__init__(**kwargs) - self.system_data: Optional["_models.SystemData"] = None - self.container_status: Optional[Union[str, "_models.ContainerStatus"]] = None - self.data_format = data_format - self.refresh_details: Optional["_models.RefreshDetails"] = None - self.created_date_time: Optional[datetime.datetime] = None - - -class ContainerList(_serialization.Model): - """Collection of all the containers on the Data Box Edge/Gateway device. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of containers. - :vartype value: list[~azure.mgmt.databoxedge.models.Container] - :ivar next_link: Link to the next set of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Container]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[List["_models.Container"]] = None - self.next_link: Optional[str] = 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 server. - - :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 location: 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. Required. - :vartype location: str - :ivar tags: The list of tags that describe the device. These tags can be used to view and group - this device (across resource groups). - :vartype tags: dict[str, str] - :ivar sku: The SKU type. - :vartype sku: ~azure.mgmt.databoxedge.models.Sku - :ivar etag: The etag for the devices. - :vartype etag: str - :ivar identity: Msi identity of the resource. - :vartype identity: ~azure.mgmt.databoxedge.models.ResourceIdentity - :ivar kind: The etag for the devices. Known values are: "AzureDataBoxGateway", - "AzureStackEdge", "AzureStackHub", and "AzureModularDataCentre". - :vartype kind: str or ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceKind - :ivar system_data: DataBoxEdge Resource. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar data_box_edge_device_status: The status of the Data Box Edge/Gateway device. Known values - are: "ReadyToSetup", "Online", "Offline", "NeedsAttention", "Disconnected", - "PartiallyDisconnected", and "Maintenance". - :vartype 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. "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: int - :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}, - "system_data": {"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": "int"}, - "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__( # pylint: disable=too-many-locals - self, - *, - location: str, - tags: Optional[Dict[str, str]] = None, - sku: Optional["_models.Sku"] = None, - etag: Optional[str] = None, - identity: Optional["_models.ResourceIdentity"] = None, - data_box_edge_device_status: Optional[Union[str, "_models.DataBoxEdgeDeviceStatus"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword location: 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. Required. - :paramtype location: str - :keyword tags: The list of tags that describe the device. These tags can be used to view and - group this device (across resource groups). - :paramtype tags: dict[str, str] - :keyword sku: The SKU type. - :paramtype sku: ~azure.mgmt.databoxedge.models.Sku - :keyword etag: The etag for the devices. - :paramtype etag: str - :keyword identity: Msi identity of the resource. - :paramtype identity: ~azure.mgmt.databoxedge.models.ResourceIdentity - :keyword data_box_edge_device_status: The status of the Data Box Edge/Gateway device. Known - values are: "ReadyToSetup", "Online", "Offline", "NeedsAttention", "Disconnected", - "PartiallyDisconnected", and "Maintenance". - :paramtype data_box_edge_device_status: str or - ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceStatus - """ - super().__init__(**kwargs) - self.location = location - self.tags = tags - self.sku = sku - self.etag = etag - self.identity = identity - self.kind: Optional[Union[str, "_models.DataBoxEdgeDeviceKind"]] = None - self.system_data: Optional["_models.SystemData"] = None - self.data_box_edge_device_status = data_box_edge_device_status - self.serial_number: Optional[str] = None - self.description: Optional[str] = None - self.model_description: Optional[str] = None - self.device_type: Optional[Union[str, "_models.DeviceType"]] = None - self.friendly_name: Optional[str] = None - self.culture: Optional[str] = None - self.device_model: Optional[str] = None - self.device_software_version: Optional[str] = None - self.device_local_capacity: Optional[int] = None - self.time_zone: Optional[str] = None - self.device_hcs_version: Optional[str] = None - self.configured_role_types: Optional[List[Union[str, "_models.RoleTypes"]]] = None - self.node_count: Optional[int] = None - self.resource_move_details: Optional["_models.ResourceMoveDetails"] = None - self.edge_profile: Optional["_models.EdgeProfile"] = 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 - :ivar encryption_key_thumbprint: The digital signature of encrypted certificate. - :vartype encryption_key_thumbprint: str - :ivar encryption_key: The public part of the encryption certificate. Client uses this to - encrypt any secret. - :vartype encryption_key: str - :ivar resource_key: The Resource ID of the Resource. - :vartype resource_key: str - :ivar client_secret_store_id: The Key Vault ARM Id for client secrets. - :vartype client_secret_store_id: str - :ivar client_secret_store_url: The url to access the Client Key Vault. - :vartype client_secret_store_url: str - :ivar channel_integrity_key_name: The name of Channel Integrity Key stored in the Client Key - Vault. - :vartype channel_integrity_key_name: str - :ivar channel_integrity_key_version: The version of Channel Integrity Key stored in the Client - Key Vault. - :vartype channel_integrity_key_version: str - :ivar key_vault_sync_status: Key vault sync status. Known values are: "KeyVaultSynced", - "KeyVaultSyncFailed", "KeyVaultNotConfigured", "KeyVaultSyncPending", "KeyVaultSyncing", and - "KeyVaultNotSynced". - :vartype 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: Optional[str] = None, - encryption_key: Optional[str] = None, - client_secret_store_id: Optional[str] = None, - client_secret_store_url: Optional[str] = None, - channel_integrity_key_name: Optional[str] = None, - channel_integrity_key_version: Optional[str] = None, - key_vault_sync_status: Optional[Union[str, "_models.KeyVaultSyncStatus"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword encryption_key_thumbprint: The digital signature of encrypted certificate. - :paramtype encryption_key_thumbprint: str - :keyword encryption_key: The public part of the encryption certificate. Client uses this to - encrypt any secret. - :paramtype encryption_key: str - :keyword client_secret_store_id: The Key Vault ARM Id for client secrets. - :paramtype client_secret_store_id: str - :keyword client_secret_store_url: The url to access the Client Key Vault. - :paramtype client_secret_store_url: str - :keyword channel_integrity_key_name: The name of Channel Integrity Key stored in the Client Key - Vault. - :paramtype channel_integrity_key_name: str - :keyword channel_integrity_key_version: The version of Channel Integrity Key stored in the - Client Key Vault. - :paramtype channel_integrity_key_version: str - :keyword key_vault_sync_status: Key vault sync status. Known values are: "KeyVaultSynced", - "KeyVaultSyncFailed", "KeyVaultNotConfigured", "KeyVaultSyncPending", "KeyVaultSyncing", and - "KeyVaultNotSynced". - :paramtype key_vault_sync_status: str or ~azure.mgmt.databoxedge.models.KeyVaultSyncStatus - """ - super().__init__(**kwargs) - self.encryption_key_thumbprint = encryption_key_thumbprint - self.encryption_key = encryption_key - self.resource_key: Optional[str] = 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: Optional[Dict[str, "_models.Secret"]] = None - - -class DataBoxEdgeDeviceExtendedInfoPatch(_serialization.Model): - """The Data Box Edge/Gateway device extended info patch. - - :ivar client_secret_store_id: The Key Vault ARM Id for client secrets. - :vartype client_secret_store_id: str - :ivar client_secret_store_url: The url to access the Client Key Vault. - :vartype client_secret_store_url: str - :ivar channel_integrity_key_name: The name for Channel Integrity Key stored in the Client Key - Vault. - :vartype channel_integrity_key_name: str - :ivar channel_integrity_key_version: The version of Channel Integrity Key stored in the Client - Key Vault. - :vartype channel_integrity_key_version: str - :ivar 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. Known values are: - "KeyVaultSynced", "KeyVaultSyncFailed", "KeyVaultNotConfigured", "KeyVaultSyncPending", - "KeyVaultSyncing", and "KeyVaultNotSynced". - :vartype 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: Optional[str] = None, - client_secret_store_url: Optional[str] = None, - channel_integrity_key_name: Optional[str] = None, - channel_integrity_key_version: Optional[str] = None, - sync_status: Optional[Union[str, "_models.KeyVaultSyncStatus"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword client_secret_store_id: The Key Vault ARM Id for client secrets. - :paramtype client_secret_store_id: str - :keyword client_secret_store_url: The url to access the Client Key Vault. - :paramtype client_secret_store_url: str - :keyword channel_integrity_key_name: The name for Channel Integrity Key stored in the Client - Key Vault. - :paramtype channel_integrity_key_name: str - :keyword channel_integrity_key_version: The version of Channel Integrity Key stored in the - Client Key Vault. - :paramtype channel_integrity_key_version: str - :keyword 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. Known values are: - "KeyVaultSynced", "KeyVaultSyncFailed", "KeyVaultNotConfigured", "KeyVaultSyncPending", - "KeyVaultSyncing", and "KeyVaultNotSynced". - :paramtype sync_status: str or ~azure.mgmt.databoxedge.models.KeyVaultSyncStatus - """ - super().__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 DataBoxEdgeDeviceList(_serialization.Model): - """The collection of Data Box Edge/Gateway devices. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of Data Box Edge/Gateway devices. - :vartype value: list[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] - :ivar next_link: Link to the next set of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[DataBoxEdgeDevice]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[List["_models.DataBoxEdgeDevice"]] = None - self.next_link: Optional[str] = None - - -class DataBoxEdgeDevicePatch(_serialization.Model): - """The Data Box Edge/Gateway device patch. - - :ivar tags: The tags attached to the Data Box Edge/Gateway resource. - :vartype tags: dict[str, str] - :ivar identity: Msi identity of the resource. - :vartype identity: ~azure.mgmt.databoxedge.models.ResourceIdentity - :ivar edge_profile: Edge Profile property of the Data Box Edge/Gateway device. - :vartype 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: Optional[Dict[str, str]] = None, - identity: Optional["_models.ResourceIdentity"] = None, - edge_profile: Optional["_models.EdgeProfilePatch"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: The tags attached to the Data Box Edge/Gateway resource. - :paramtype tags: dict[str, str] - :keyword identity: Msi identity of the resource. - :paramtype identity: ~azure.mgmt.databoxedge.models.ResourceIdentity - :keyword edge_profile: Edge Profile property of the Data Box Edge/Gateway device. - :paramtype edge_profile: ~azure.mgmt.databoxedge.models.EdgeProfilePatch - """ - super().__init__(**kwargs) - self.tags = tags - self.identity = identity - self.edge_profile = edge_profile - - -class DataBoxEdgeMoveRequest(_serialization.Model): - """Resource Move details. - - All required parameters must be populated in order to send to server. - - :ivar target_resource_group: Target resource group ARMId. Required. - :vartype target_resource_group: str - :ivar resources: List of resources to be moved. Required. - :vartype 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: List[str], **kwargs: Any) -> None: - """ - :keyword target_resource_group: Target resource group ARMId. Required. - :paramtype target_resource_group: str - :keyword resources: List of resources to be moved. Required. - :paramtype resources: list[str] - """ - super().__init__(**kwargs) - self.target_resource_group = target_resource_group - self.resources = resources - - -class DataBoxEdgeSku(_serialization.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. Known values are: "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", and "Management". - :vartype name: str or ~azure.mgmt.databoxedge.models.SkuName - :ivar kind: The Sku kind. - :vartype kind: str - :ivar tier: The Sku tier. "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. Known values are: "None" and - "Available". - :vartype signup_option: str or ~azure.mgmt.databoxedge.models.SkuSignupOption - :ivar version: Availability of the Sku as preview/stable. Known values are: "Stable" and - "Preview". - :vartype version: str or ~azure.mgmt.databoxedge.models.SkuVersion - :ivar availability: Links to the next set of results. Known values are: "Available" and - "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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.resource_type: Optional[str] = None - self.name: Optional[Union[str, "_models.SkuName"]] = None - self.kind: Optional[str] = None - self.tier: Optional[Union[str, "_models.SkuTier"]] = None - self.size: Optional[str] = None - self.family: Optional[str] = None - self.locations: Optional[List[str]] = None - self.api_versions: Optional[List[str]] = None - self.location_info: Optional[List["_models.SkuLocationInfo"]] = None - self.costs: Optional[List["_models.SkuCost"]] = None - self.signup_option: Optional[Union[str, "_models.SkuSignupOption"]] = None - self.version: Optional[Union[str, "_models.SkuVersion"]] = None - self.availability: Optional[Union[str, "_models.SkuAvailability"]] = None - self.shipment_types: Optional[List[Union[str, "_models.ShipmentType"]]] = None - self.capabilities: Optional[List["_models.SkuCapability"]] = None - - -class DataBoxEdgeSkuList(_serialization.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 ResourceType Sku. - :vartype value: list[~azure.mgmt.databoxedge.models.DataBoxEdgeSku] - :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": "[DataBoxEdgeSku]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[List["_models.DataBoxEdgeSku"]] = None - self.next_link: Optional[str] = None - - -class DCAccessCode(_serialization.Model): - """DC Access code in the case of Self Managed Shipping. - - :ivar auth_code: DCAccess Code for the Self Managed shipment. - :vartype auth_code: str - """ - - _attribute_map = { - "auth_code": {"key": "properties.authCode", "type": "str"}, - } - - def __init__(self, *, auth_code: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword auth_code: DCAccess Code for the Self Managed shipment. - :paramtype auth_code: str - """ - super().__init__(**kwargs) - self.auth_code = auth_code - - -class EdgeProfile(_serialization.Model): - """Details about Edge Profile for the resource. - - :ivar subscription: Edge Profile Subscription. - :vartype subscription: ~azure.mgmt.databoxedge.models.EdgeProfileSubscription - """ - - _attribute_map = { - "subscription": {"key": "subscription", "type": "EdgeProfileSubscription"}, - } - - def __init__(self, *, subscription: Optional["_models.EdgeProfileSubscription"] = None, **kwargs: Any) -> None: - """ - :keyword subscription: Edge Profile Subscription. - :paramtype subscription: ~azure.mgmt.databoxedge.models.EdgeProfileSubscription - """ - super().__init__(**kwargs) - self.subscription = subscription - - -class EdgeProfilePatch(_serialization.Model): - """The Data Box Edge/Gateway Edge Profile patch. - - :ivar subscription: The Data Box Edge/Gateway Edge Profile Subscription patch. - :vartype subscription: ~azure.mgmt.databoxedge.models.EdgeProfileSubscriptionPatch - """ - - _attribute_map = { - "subscription": {"key": "subscription", "type": "EdgeProfileSubscriptionPatch"}, - } - - def __init__(self, *, subscription: Optional["_models.EdgeProfileSubscriptionPatch"] = None, **kwargs: Any) -> None: - """ - :keyword subscription: The Data Box Edge/Gateway Edge Profile Subscription patch. - :paramtype subscription: ~azure.mgmt.databoxedge.models.EdgeProfileSubscriptionPatch - """ - super().__init__(**kwargs) - self.subscription = subscription - - -class EdgeProfileSubscription(_serialization.Model): - """Subscription details for the Edge Profile. - - :ivar registration_id: Edge Subscription Registration ID. - :vartype registration_id: str - :ivar id: ARM ID of the subscription. - :vartype id: str - :ivar state: Known values are: "Registered", "Warned", "Suspended", "Deleted", and - "Unregistered". - :vartype state: str or ~azure.mgmt.databoxedge.models.SubscriptionState - :ivar registration_date: - :vartype registration_date: str - :ivar subscription_id: - :vartype subscription_id: str - :ivar tenant_id: - :vartype tenant_id: str - :ivar location_placement_id: - :vartype location_placement_id: str - :ivar quota_id: - :vartype quota_id: str - :ivar serialized_details: - :vartype serialized_details: str - :ivar registered_features: - :vartype 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: Optional[str] = None, - id: Optional[str] = None, # pylint: disable=redefined-builtin - state: Optional[Union[str, "_models.SubscriptionState"]] = None, - registration_date: Optional[str] = None, - subscription_id: Optional[str] = None, - tenant_id: Optional[str] = None, - location_placement_id: Optional[str] = None, - quota_id: Optional[str] = None, - serialized_details: Optional[str] = None, - registered_features: Optional[List["_models.SubscriptionRegisteredFeatures"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword registration_id: Edge Subscription Registration ID. - :paramtype registration_id: str - :keyword id: ARM ID of the subscription. - :paramtype id: str - :keyword state: Known values are: "Registered", "Warned", "Suspended", "Deleted", and - "Unregistered". - :paramtype state: str or ~azure.mgmt.databoxedge.models.SubscriptionState - :keyword registration_date: - :paramtype registration_date: str - :keyword subscription_id: - :paramtype subscription_id: str - :keyword tenant_id: - :paramtype tenant_id: str - :keyword location_placement_id: - :paramtype location_placement_id: str - :keyword quota_id: - :paramtype quota_id: str - :keyword serialized_details: - :paramtype serialized_details: str - :keyword registered_features: - :paramtype registered_features: - list[~azure.mgmt.databoxedge.models.SubscriptionRegisteredFeatures] - """ - super().__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(_serialization.Model): - """The Data Box Edge/Gateway Edge Profile Subscription patch. - - :ivar id: The path ID that uniquely identifies the subscription of the edge profile. - :vartype id: str - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - } - - def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin - """ - :keyword id: The path ID that uniquely identifies the subscription of the edge profile. - :paramtype id: str - """ - super().__init__(**kwargs) - self.id = id - - -class EtcdInfo(_serialization.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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type: Optional[str] = None - self.version: Optional[str] = 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 server. - - :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 system_data: Trigger in DataBoxEdge Resource. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar kind: Trigger Kind. Required. Known values are: "FileEvent" and "PeriodicTimerEvent". - :vartype kind: str or ~azure.mgmt.databoxedge.models.TriggerEventType - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.system_data: Optional["_models.SystemData"] = None - self.kind: Optional[str] = None - - -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 server. - - :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 system_data: Trigger in DataBoxEdge Resource. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar kind: Trigger Kind. Required. Known values are: "FileEvent" and "PeriodicTimerEvent". - :vartype kind: str or ~azure.mgmt.databoxedge.models.TriggerEventType - :ivar source_info: File event source details. Required. - :vartype source_info: ~azure.mgmt.databoxedge.models.FileSourceInfo - :ivar sink_info: Role sink info. Required. - :vartype sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo - :ivar 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. - :vartype custom_context_tag: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"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: "_models.FileSourceInfo", - sink_info: "_models.RoleSinkInfo", - custom_context_tag: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword source_info: File event source details. Required. - :paramtype source_info: ~azure.mgmt.databoxedge.models.FileSourceInfo - :keyword sink_info: Role sink info. Required. - :paramtype sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo - :keyword 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. - :paramtype custom_context_tag: str - """ - super().__init__(**kwargs) - self.kind: str = "FileEvent" - self.source_info = source_info - self.sink_info = sink_info - self.custom_context_tag = custom_context_tag - - -class FileSourceInfo(_serialization.Model): - """File source details. - - All required parameters must be populated in order to send to server. - - :ivar share_id: File share ID. Required. - :vartype share_id: str - """ - - _validation = { - "share_id": {"required": True}, - } - - _attribute_map = { - "share_id": {"key": "shareId", "type": "str"}, - } - - def __init__(self, *, share_id: str, **kwargs: Any) -> None: - """ - :keyword share_id: File share ID. Required. - :paramtype share_id: str - """ - super().__init__(**kwargs) - self.share_id = share_id - - -class GenerateCertResponse(_serialization.Model): - """Used in activation key generation flow. - - :ivar public_key: Gets or sets base64 encoded certificate raw data, - this is the public part needed to be uploaded to cert vault. - :vartype public_key: str - :ivar private_key: Gets or sets base64 encoded private part of the certificate, - needed to form the activation key. - :vartype private_key: str - :ivar expiry_time_in_utc: Gets or sets expiry time in UTC. - :vartype 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: Optional[str] = None, - private_key: Optional[str] = None, - expiry_time_in_utc: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword public_key: Gets or sets base64 encoded certificate raw data, - this is the public part needed to be uploaded to cert vault. - :paramtype public_key: str - :keyword private_key: Gets or sets base64 encoded private part of the certificate, - needed to form the activation key. - :paramtype private_key: str - :keyword expiry_time_in_utc: Gets or sets expiry time in UTC. - :paramtype expiry_time_in_utc: str - """ - super().__init__(**kwargs) - self.public_key = public_key - self.private_key = private_key - self.expiry_time_in_utc = expiry_time_in_utc - - -class ImageRepositoryCredential(_serialization.Model): - """Image repository credential. - - All required parameters must be populated in order to send to server. - - :ivar image_repository_url: Image repository url (e.g.: mcr.microsoft.com). Required. - :vartype image_repository_url: str - :ivar user_name: Repository user name. Required. - :vartype user_name: str - :ivar password: Repository user password. - :vartype 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: Optional["_models.AsymmetricEncryptedSecret"] = None, - **kwargs: Any - ) -> None: - """ - :keyword image_repository_url: Image repository url (e.g.: mcr.microsoft.com). Required. - :paramtype image_repository_url: str - :keyword user_name: Repository user name. Required. - :paramtype user_name: str - :keyword password: Repository user password. - :paramtype password: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret - """ - super().__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 server. - - :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 kind: Addon type. Required. Known values are: "IotEdge" and "ArcForKubernetes". - :vartype kind: str or ~azure.mgmt.databoxedge.models.AddonType - :ivar system_data: Addon type. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar io_t_device_details: IoT device metadata to which appliance needs to be connected. - Required. - :vartype io_t_device_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo - :ivar io_t_edge_device_details: IoT edge device to which the IoT Addon needs to be configured. - Required. - :vartype io_t_edge_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. Known values are: "Windows" and - "Linux". - :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType - :ivar host_platform_type: Platform where the runtime is hosted. Known values are: - "KubernetesCluster" and "LinuxVM". - :vartype host_platform_type: str or ~azure.mgmt.databoxedge.models.HostPlatformType - :ivar provisioning_state: Addon Provisioning State. Known values are: "Invalid", "Creating", - "Created", "Updating", "Reconfiguring", "Failed", and "Deleting". - :vartype provisioning_state: str or ~azure.mgmt.databoxedge.models.AddonState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - "system_data": {"readonly": True}, - "io_t_device_details": {"required": True}, - "io_t_edge_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"}, - "kind": {"key": "kind", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "io_t_device_details": {"key": "properties.ioTDeviceDetails", "type": "IoTDeviceInfo"}, - "io_t_edge_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_t_device_details: "_models.IoTDeviceInfo", - io_t_edge_device_details: "_models.IoTDeviceInfo", - **kwargs: Any - ) -> None: - """ - :keyword io_t_device_details: IoT device metadata to which appliance needs to be connected. - Required. - :paramtype io_t_device_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo - :keyword io_t_edge_device_details: IoT edge device to which the IoT Addon needs to be - configured. Required. - :paramtype io_t_edge_device_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo - """ - super().__init__(**kwargs) - self.kind: str = "IotEdge" - self.io_t_device_details = io_t_device_details - self.io_t_edge_device_details = io_t_edge_device_details - self.version: Optional[str] = None - self.host_platform: Optional[Union[str, "_models.PlatformType"]] = None - self.host_platform_type: Optional[Union[str, "_models.HostPlatformType"]] = None - self.provisioning_state: Optional[Union[str, "_models.AddonState"]] = None - - -class IoTDeviceInfo(_serialization.Model): - """Metadata of IoT device/IoT Edge device to be configured. - - All required parameters must be populated in order to send to server. - - :ivar device_id: ID of the IoT device/edge device. Required. - :vartype device_id: str - :ivar io_t_host_hub: Host name for the IoT hub associated to the device. Required. - :vartype io_t_host_hub: str - :ivar io_t_host_hub_id: Id for the IoT hub associated to the device. - :vartype io_t_host_hub_id: str - :ivar authentication: Encrypted IoT device/IoT edge device connection string. - :vartype authentication: ~azure.mgmt.databoxedge.models.Authentication - """ - - _validation = { - "device_id": {"required": True}, - "io_t_host_hub": {"required": True}, - } - - _attribute_map = { - "device_id": {"key": "deviceId", "type": "str"}, - "io_t_host_hub": {"key": "ioTHostHub", "type": "str"}, - "io_t_host_hub_id": {"key": "ioTHostHubId", "type": "str"}, - "authentication": {"key": "authentication", "type": "Authentication"}, - } - - def __init__( - self, - *, - device_id: str, - io_t_host_hub: str, - io_t_host_hub_id: Optional[str] = None, - authentication: Optional["_models.Authentication"] = None, - **kwargs: Any - ) -> None: - """ - :keyword device_id: ID of the IoT device/edge device. Required. - :paramtype device_id: str - :keyword io_t_host_hub: Host name for the IoT hub associated to the device. Required. - :paramtype io_t_host_hub: str - :keyword io_t_host_hub_id: Id for the IoT hub associated to the device. - :paramtype io_t_host_hub_id: str - :keyword authentication: Encrypted IoT device/IoT edge device connection string. - :paramtype authentication: ~azure.mgmt.databoxedge.models.Authentication - """ - super().__init__(**kwargs) - self.device_id = device_id - self.io_t_host_hub = io_t_host_hub - self.io_t_host_hub_id = io_t_host_hub_id - self.authentication = authentication - - -class IoTEdgeAgentInfo(_serialization.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 server. - - :ivar image_name: Name of the IoT edge agent image. Required. - :vartype image_name: str - :ivar tag: Image Tag. Required. - :vartype tag: str - :ivar image_repository: Image repository details. - :vartype 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: Optional["_models.ImageRepositoryCredential"] = None, - **kwargs: Any - ) -> None: - """ - :keyword image_name: Name of the IoT edge agent image. Required. - :paramtype image_name: str - :keyword tag: Image Tag. Required. - :paramtype tag: str - :keyword image_repository: Image repository details. - :paramtype image_repository: ~azure.mgmt.databoxedge.models.ImageRepositoryCredential - """ - super().__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 server. - - :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 kind: Role type. Required. Known values are: "IOT", "ASA", "Functions", "Cognitive", - "MEC", "CloudEdgeManagement", and "Kubernetes". - :vartype kind: str or ~azure.mgmt.databoxedge.models.RoleTypes - :ivar system_data: Role configured on ASE resource. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar host_platform: Host OS supported by the IoT role. Known values are: "Windows" and - "Linux". - :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType - :ivar io_t_device_details: IoT device metadata to which data box edge device needs to be - connected. - :vartype io_t_device_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo - :ivar io_t_edge_device_details: IoT edge device to which the IoT role needs to be configured. - :vartype io_t_edge_device_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo - :ivar share_mappings: Mount points of shares in role(s). - :vartype share_mappings: list[~azure.mgmt.databoxedge.models.MountPointMap] - :ivar io_t_edge_agent_info: Iot edge agent details to download the agent and bootstrap iot - runtime. - :vartype io_t_edge_agent_info: ~azure.mgmt.databoxedge.models.IoTEdgeAgentInfo - :ivar host_platform_type: Platform where the Iot runtime is hosted. Known values are: - "KubernetesCluster" and "LinuxVM". - :vartype host_platform_type: str or ~azure.mgmt.databoxedge.models.HostPlatformType - :ivar compute_resource: Resource allocation. - :vartype compute_resource: ~azure.mgmt.databoxedge.models.ComputeResource - :ivar role_status: Role status. Known values are: "Enabled" and "Disabled". - :vartype role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - "system_data": {"readonly": True}, - "host_platform_type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "host_platform": {"key": "properties.hostPlatform", "type": "str"}, - "io_t_device_details": {"key": "properties.ioTDeviceDetails", "type": "IoTDeviceInfo"}, - "io_t_edge_device_details": {"key": "properties.ioTEdgeDeviceDetails", "type": "IoTDeviceInfo"}, - "share_mappings": {"key": "properties.shareMappings", "type": "[MountPointMap]"}, - "io_t_edge_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: Optional[Union[str, "_models.PlatformType"]] = None, - io_t_device_details: Optional["_models.IoTDeviceInfo"] = None, - io_t_edge_device_details: Optional["_models.IoTDeviceInfo"] = None, - share_mappings: Optional[List["_models.MountPointMap"]] = None, - io_t_edge_agent_info: Optional["_models.IoTEdgeAgentInfo"] = None, - compute_resource: Optional["_models.ComputeResource"] = None, - role_status: Optional[Union[str, "_models.RoleStatus"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword host_platform: Host OS supported by the IoT role. Known values are: "Windows" and - "Linux". - :paramtype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType - :keyword io_t_device_details: IoT device metadata to which data box edge device needs to be - connected. - :paramtype io_t_device_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo - :keyword io_t_edge_device_details: IoT edge device to which the IoT role needs to be - configured. - :paramtype io_t_edge_device_details: ~azure.mgmt.databoxedge.models.IoTDeviceInfo - :keyword share_mappings: Mount points of shares in role(s). - :paramtype share_mappings: list[~azure.mgmt.databoxedge.models.MountPointMap] - :keyword io_t_edge_agent_info: Iot edge agent details to download the agent and bootstrap iot - runtime. - :paramtype io_t_edge_agent_info: ~azure.mgmt.databoxedge.models.IoTEdgeAgentInfo - :keyword compute_resource: Resource allocation. - :paramtype compute_resource: ~azure.mgmt.databoxedge.models.ComputeResource - :keyword role_status: Role status. Known values are: "Enabled" and "Disabled". - :paramtype role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus - """ - super().__init__(**kwargs) - self.kind: str = "IOT" - self.host_platform = host_platform - self.io_t_device_details = io_t_device_details - self.io_t_edge_device_details = io_t_edge_device_details - self.share_mappings = share_mappings - self.io_t_edge_agent_info = io_t_edge_agent_info - self.host_platform_type: Optional[Union[str, "_models.HostPlatformType"]] = None - self.compute_resource = compute_resource - self.role_status = role_status - - -class Ipv4Config(_serialization.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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.ip_address: Optional[str] = None - self.subnet: Optional[str] = None - self.gateway: Optional[str] = None - - -class Ipv6Config(_serialization.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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.ip_address: Optional[str] = None - self.prefix_length: Optional[int] = None - self.gateway: Optional[str] = None - - -class Job(_serialization.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. Known values are: "Invalid", "Running", - "Succeeded", "Failed", "Canceled", "Paused", and "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.datetime - :ivar end_time: The UTC date and time at which the job completed. - :vartype end_time: ~datetime.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. Known values are: "Invalid", "ScanForUpdates", - "DownloadUpdates", "InstallUpdates", "RefreshShare", "RefreshContainer", "Backup", "Restore", - and "TriggerSupportPackage". - :vartype job_type: str or ~azure.mgmt.databoxedge.models.JobType - :ivar current_stage: Current stage of the update operation. Known values are: "Unknown", - "Initial", "ScanStarted", "ScanComplete", "ScanFailed", "DownloadStarted", "DownloadComplete", - "DownloadFailed", "InstallStarted", "InstallComplete", "InstallFailed", "RebootInitiated", - "Success", "Failure", "RescanStarted", "RescanComplete", and "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 - :ivar 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.). - :vartype 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: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword 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.). - :paramtype folder: str - """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.name: Optional[str] = None - self.type: Optional[str] = None - self.status: Optional[Union[str, "_models.JobStatus"]] = None - self.start_time: Optional[datetime.datetime] = None - self.end_time: Optional[datetime.datetime] = None - self.percent_complete: Optional[int] = None - self.error: Optional["_models.JobErrorDetails"] = None - self.job_type: Optional[Union[str, "_models.JobType"]] = None - self.current_stage: Optional[Union[str, "_models.UpdateOperationStage"]] = None - self.download_progress: Optional["_models.UpdateDownloadProgress"] = None - self.install_progress: Optional["_models.UpdateInstallProgress"] = None - self.total_refresh_errors: Optional[int] = None - self.error_manifest_file: Optional[str] = None - self.refreshed_entity_id: Optional[str] = None - self.folder = folder - - -class JobErrorDetails(_serialization.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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.error_details: Optional[List["_models.JobErrorItem"]] = None - self.code: Optional[str] = None - self.message: Optional[str] = None - - -class JobErrorItem(_serialization.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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.recommendations: Optional[List[str]] = None - self.code: Optional[str] = None - self.message: Optional[str] = None - - -class KubernetesClusterInfo(_serialization.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 server. - - :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] - :ivar version: Kubernetes cluster version. Required. - :vartype 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: Any) -> None: - """ - :keyword version: Kubernetes cluster version. Required. - :paramtype version: str - """ - super().__init__(**kwargs) - self.etcd_info: Optional["_models.EtcdInfo"] = None - self.nodes: Optional[List["_models.NodeInfo"]] = None - self.version = version - - -class KubernetesIPConfiguration(_serialization.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 - :ivar ip_address: IP address of the Kubernetes node. - :vartype 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: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword ip_address: IP address of the Kubernetes node. - :paramtype ip_address: str - """ - super().__init__(**kwargs) - self.port: Optional[str] = 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 server. - - :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 kind: Role type. Required. Known values are: "IOT", "ASA", "Functions", "Cognitive", - "MEC", "CloudEdgeManagement", and "Kubernetes". - :vartype kind: str or ~azure.mgmt.databoxedge.models.RoleTypes - :ivar system_data: Role configured on ASE resource. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar host_platform: Host OS supported by the Kubernetes role. Known values are: "Windows" and - "Linux". - :vartype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType - :ivar provisioning_state: State of Kubernetes deployment. Known values are: "Invalid", - "Creating", "Created", "Updating", "Reconfiguring", "Failed", and "Deleting". - :vartype provisioning_state: str or ~azure.mgmt.databoxedge.models.KubernetesState - :ivar host_platform_type: Platform where the runtime is hosted. Known values are: - "KubernetesCluster" and "LinuxVM". - :vartype host_platform_type: str or ~azure.mgmt.databoxedge.models.HostPlatformType - :ivar kubernetes_cluster_info: Kubernetes cluster configuration. - :vartype kubernetes_cluster_info: ~azure.mgmt.databoxedge.models.KubernetesClusterInfo - :ivar kubernetes_role_resources: Kubernetes role resources. - :vartype kubernetes_role_resources: ~azure.mgmt.databoxedge.models.KubernetesRoleResources - :ivar role_status: Role status. Known values are: "Enabled" and "Disabled". - :vartype role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - "system_data": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "host_platform_type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "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: Optional[Union[str, "_models.PlatformType"]] = None, - kubernetes_cluster_info: Optional["_models.KubernetesClusterInfo"] = None, - kubernetes_role_resources: Optional["_models.KubernetesRoleResources"] = None, - role_status: Optional[Union[str, "_models.RoleStatus"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword host_platform: Host OS supported by the Kubernetes role. Known values are: "Windows" - and "Linux". - :paramtype host_platform: str or ~azure.mgmt.databoxedge.models.PlatformType - :keyword kubernetes_cluster_info: Kubernetes cluster configuration. - :paramtype kubernetes_cluster_info: ~azure.mgmt.databoxedge.models.KubernetesClusterInfo - :keyword kubernetes_role_resources: Kubernetes role resources. - :paramtype kubernetes_role_resources: ~azure.mgmt.databoxedge.models.KubernetesRoleResources - :keyword role_status: Role status. Known values are: "Enabled" and "Disabled". - :paramtype role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus - """ - super().__init__(**kwargs) - self.kind: str = "Kubernetes" - self.host_platform = host_platform - self.provisioning_state: Optional[Union[str, "_models.KubernetesState"]] = None - self.host_platform_type: Optional[Union[str, "_models.HostPlatformType"]] = None - self.kubernetes_cluster_info = kubernetes_cluster_info - self.kubernetes_role_resources = kubernetes_role_resources - self.role_status = role_status - - -class KubernetesRoleCompute(_serialization.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 server. - - :ivar vm_profile: VM profile. Required. - :vartype vm_profile: str - :ivar memory_in_bytes: Memory in bytes. - :vartype memory_in_bytes: int - :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": "int"}, - "processor_count": {"key": "processorCount", "type": "int"}, - } - - def __init__(self, *, vm_profile: str, **kwargs: Any) -> None: - """ - :keyword vm_profile: VM profile. Required. - :paramtype vm_profile: str - """ - super().__init__(**kwargs) - self.vm_profile = vm_profile - self.memory_in_bytes: Optional[int] = None - self.processor_count: Optional[int] = None - - -class KubernetesRoleNetwork(_serialization.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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.cni_config: Optional["_models.CniConfig"] = None - self.load_balancer_config: Optional["_models.LoadBalancerConfig"] = None - - -class KubernetesRoleResources(_serialization.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 server. - - :ivar storage: Kubernetes role storage resource. - :vartype storage: ~azure.mgmt.databoxedge.models.KubernetesRoleStorage - :ivar compute: Kubernetes role compute resource. Required. - :vartype 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: "_models.KubernetesRoleCompute", - storage: Optional["_models.KubernetesRoleStorage"] = None, - **kwargs: Any - ) -> None: - """ - :keyword storage: Kubernetes role storage resource. - :paramtype storage: ~azure.mgmt.databoxedge.models.KubernetesRoleStorage - :keyword compute: Kubernetes role compute resource. Required. - :paramtype compute: ~azure.mgmt.databoxedge.models.KubernetesRoleCompute - """ - super().__init__(**kwargs) - self.storage = storage - self.compute = compute - self.network: Optional["_models.KubernetesRoleNetwork"] = None - - -class KubernetesRoleStorage(_serialization.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] - :ivar endpoints: Mount points of shares in role(s). - :vartype 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: Optional[List["_models.MountPointMap"]] = None, **kwargs: Any) -> None: - """ - :keyword endpoints: Mount points of shares in role(s). - :paramtype endpoints: list[~azure.mgmt.databoxedge.models.MountPointMap] - """ - super().__init__(**kwargs) - self.storage_classes: Optional[List["_models.KubernetesRoleStorageClassInfo"]] = None - self.endpoints = endpoints - - -class KubernetesRoleStorageClassInfo(_serialization.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. Known values are: "Invalid", - "Enabled", and "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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.name: Optional[str] = None - self.type: Optional[str] = None - self.posix_compliant: Optional[Union[str, "_models.PosixComplianceStatus"]] = None - - -class LoadBalancerConfig(_serialization.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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type: Optional[str] = None - self.version: Optional[str] = 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 server. - - :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 kind: Role type. Required. Known values are: "IOT", "ASA", "Functions", "Cognitive", - "MEC", "CloudEdgeManagement", and "Kubernetes". - :vartype kind: str or ~azure.mgmt.databoxedge.models.RoleTypes - :ivar system_data: Role configured on ASE resource. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar connection_string: Activation key of the MEC. - :vartype connection_string: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret - :ivar controller_endpoint: Controller Endpoint. - :vartype controller_endpoint: str - :ivar resource_unique_id: Unique Id of the Resource. - :vartype resource_unique_id: str - :ivar role_status: Role status. Known values are: "Enabled" and "Disabled". - :vartype role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "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, - *, - connection_string: Optional["_models.AsymmetricEncryptedSecret"] = None, - controller_endpoint: Optional[str] = None, - resource_unique_id: Optional[str] = None, - role_status: Optional[Union[str, "_models.RoleStatus"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword connection_string: Activation key of the MEC. - :paramtype connection_string: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret - :keyword controller_endpoint: Controller Endpoint. - :paramtype controller_endpoint: str - :keyword resource_unique_id: Unique Id of the Resource. - :paramtype resource_unique_id: str - :keyword role_status: Role status. Known values are: "Enabled" and "Disabled". - :paramtype role_status: str or ~azure.mgmt.databoxedge.models.RoleStatus - """ - super().__init__(**kwargs) - self.kind: str = "MEC" - self.connection_string = connection_string - self.controller_endpoint = controller_endpoint - self.resource_unique_id = resource_unique_id - self.role_status = role_status - - -class MetricConfiguration(_serialization.Model): - """Metric configuration. - - All required parameters must be populated in order to send to server. - - :ivar resource_id: The Resource ID on which the metrics should be pushed. Required. - :vartype resource_id: str - :ivar mdm_account: The MDM account to which the counters should be pushed. - :vartype mdm_account: str - :ivar metric_name_space: The MDM namespace to which the counters should be pushed. This is - required if MDMAccount is specified. - :vartype metric_name_space: str - :ivar counter_sets: Host name for the IoT hub associated to the device. Required. - :vartype 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: List["_models.MetricCounterSet"], - mdm_account: Optional[str] = None, - metric_name_space: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword resource_id: The Resource ID on which the metrics should be pushed. Required. - :paramtype resource_id: str - :keyword mdm_account: The MDM account to which the counters should be pushed. - :paramtype mdm_account: str - :keyword metric_name_space: The MDM namespace to which the counters should be pushed. This is - required if MDMAccount is specified. - :paramtype metric_name_space: str - :keyword counter_sets: Host name for the IoT hub associated to the device. Required. - :paramtype counter_sets: list[~azure.mgmt.databoxedge.models.MetricCounterSet] - """ - super().__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(_serialization.Model): - """The metric counter. - - All required parameters must be populated in order to send to server. - - :ivar name: The counter name. Required. - :vartype name: str - :ivar instance: The instance from which counter should be collected. - :vartype instance: str - :ivar dimension_filter: The dimension filter. - :vartype dimension_filter: list[~azure.mgmt.databoxedge.models.MetricDimension] - :ivar additional_dimensions: The additional dimensions to be added to metric. - :vartype 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: Optional[str] = None, - dimension_filter: Optional[List["_models.MetricDimension"]] = None, - additional_dimensions: Optional[List["_models.MetricDimension"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: The counter name. Required. - :paramtype name: str - :keyword instance: The instance from which counter should be collected. - :paramtype instance: str - :keyword dimension_filter: The dimension filter. - :paramtype dimension_filter: list[~azure.mgmt.databoxedge.models.MetricDimension] - :keyword additional_dimensions: The additional dimensions to be added to metric. - :paramtype additional_dimensions: list[~azure.mgmt.databoxedge.models.MetricDimension] - """ - super().__init__(**kwargs) - self.name = name - self.instance = instance - self.dimension_filter = dimension_filter - self.additional_dimensions = additional_dimensions - - -class MetricCounterSet(_serialization.Model): - """The metric counter set. - - All required parameters must be populated in order to send to server. - - :ivar counters: The counters that should be collected in this set. Required. - :vartype counters: list[~azure.mgmt.databoxedge.models.MetricCounter] - """ - - _validation = { - "counters": {"required": True}, - } - - _attribute_map = { - "counters": {"key": "counters", "type": "[MetricCounter]"}, - } - - def __init__(self, *, counters: List["_models.MetricCounter"], **kwargs: Any) -> None: - """ - :keyword counters: The counters that should be collected in this set. Required. - :paramtype counters: list[~azure.mgmt.databoxedge.models.MetricCounter] - """ - super().__init__(**kwargs) - self.counters = counters - - -class MetricDimension(_serialization.Model): - """The metric dimension. - - All required parameters must be populated in order to send to server. - - :ivar source_type: The dimension type. Required. - :vartype source_type: str - :ivar source_name: The dimension value. Required. - :vartype 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: Any) -> None: - """ - :keyword source_type: The dimension type. Required. - :paramtype source_type: str - :keyword source_name: The dimension value. Required. - :paramtype source_name: str - """ - super().__init__(**kwargs) - self.source_type = source_type - self.source_name = source_name - - -class MetricDimensionV1(_serialization.Model): - """Metric Dimension v1. - - :ivar name: Name of the metrics dimension. - :vartype name: str - :ivar display_name: Display name of the metrics dimension. - :vartype display_name: str - :ivar to_be_exported_for_shoebox: To be exported to shoe box. - :vartype 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: Optional[str] = None, - display_name: Optional[str] = None, - to_be_exported_for_shoebox: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Name of the metrics dimension. - :paramtype name: str - :keyword display_name: Display name of the metrics dimension. - :paramtype display_name: str - :keyword to_be_exported_for_shoebox: To be exported to shoe box. - :paramtype to_be_exported_for_shoebox: bool - """ - super().__init__(**kwargs) - self.name = name - self.display_name = display_name - self.to_be_exported_for_shoebox = to_be_exported_for_shoebox - - -class MetricSpecificationV1(_serialization.Model): - """Metric specification version 1. - - :ivar name: Name of the metric. - :vartype name: str - :ivar display_name: Display name of the metric. - :vartype display_name: str - :ivar display_description: Description of the metric to be displayed. - :vartype display_description: str - :ivar unit: Metric units. Known values are: "NotSpecified", "Percent", "Count", "Seconds", - "Milliseconds", "Bytes", "BytesPerSecond", and "CountPerSecond". - :vartype unit: str or ~azure.mgmt.databoxedge.models.MetricUnit - :ivar aggregation_type: Metric aggregation type. Known values are: "NotSpecified", "None", - "Average", "Minimum", "Maximum", "Total", and "Count". - :vartype aggregation_type: str or ~azure.mgmt.databoxedge.models.MetricAggregationType - :ivar dimensions: Metric dimensions, other than default dimension which is resource. - :vartype dimensions: list[~azure.mgmt.databoxedge.models.MetricDimensionV1] - :ivar fill_gap_with_zero: Set true to fill the gaps with zero. - :vartype fill_gap_with_zero: bool - :ivar category: Metric category. Known values are: "Capacity" and "Transaction". - :vartype category: str or ~azure.mgmt.databoxedge.models.MetricCategory - :ivar resource_id_dimension_name_override: Resource name override. - :vartype resource_id_dimension_name_override: str - :ivar supported_time_grain_types: Support granularity of metrics. - :vartype supported_time_grain_types: list[str or ~azure.mgmt.databoxedge.models.TimeGrain] - :ivar supported_aggregation_types: Support metric aggregation type. - :vartype 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: Optional[str] = None, - display_name: Optional[str] = None, - display_description: Optional[str] = None, - unit: Optional[Union[str, "_models.MetricUnit"]] = None, - aggregation_type: Optional[Union[str, "_models.MetricAggregationType"]] = None, - dimensions: Optional[List["_models.MetricDimensionV1"]] = None, - fill_gap_with_zero: Optional[bool] = None, - category: Optional[Union[str, "_models.MetricCategory"]] = None, - resource_id_dimension_name_override: Optional[str] = None, - supported_time_grain_types: Optional[List[Union[str, "_models.TimeGrain"]]] = None, - supported_aggregation_types: Optional[List[Union[str, "_models.MetricAggregationType"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Name of the metric. - :paramtype name: str - :keyword display_name: Display name of the metric. - :paramtype display_name: str - :keyword display_description: Description of the metric to be displayed. - :paramtype display_description: str - :keyword unit: Metric units. Known values are: "NotSpecified", "Percent", "Count", "Seconds", - "Milliseconds", "Bytes", "BytesPerSecond", and "CountPerSecond". - :paramtype unit: str or ~azure.mgmt.databoxedge.models.MetricUnit - :keyword aggregation_type: Metric aggregation type. Known values are: "NotSpecified", "None", - "Average", "Minimum", "Maximum", "Total", and "Count". - :paramtype aggregation_type: str or ~azure.mgmt.databoxedge.models.MetricAggregationType - :keyword dimensions: Metric dimensions, other than default dimension which is resource. - :paramtype dimensions: list[~azure.mgmt.databoxedge.models.MetricDimensionV1] - :keyword fill_gap_with_zero: Set true to fill the gaps with zero. - :paramtype fill_gap_with_zero: bool - :keyword category: Metric category. Known values are: "Capacity" and "Transaction". - :paramtype category: str or ~azure.mgmt.databoxedge.models.MetricCategory - :keyword resource_id_dimension_name_override: Resource name override. - :paramtype resource_id_dimension_name_override: str - :keyword supported_time_grain_types: Support granularity of metrics. - :paramtype supported_time_grain_types: list[str or ~azure.mgmt.databoxedge.models.TimeGrain] - :keyword supported_aggregation_types: Support metric aggregation type. - :paramtype supported_aggregation_types: list[str or - ~azure.mgmt.databoxedge.models.MetricAggregationType] - """ - super().__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 server. - - :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 system_data: MonitoringConfiguration on ASE device. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar metric_configurations: The metrics configuration details. Required. - :vartype metric_configurations: list[~azure.mgmt.databoxedge.models.MetricConfiguration] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"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: List["_models.MetricConfiguration"], **kwargs: Any) -> None: - """ - :keyword metric_configurations: The metrics configuration details. Required. - :paramtype metric_configurations: list[~azure.mgmt.databoxedge.models.MetricConfiguration] - """ - super().__init__(**kwargs) - self.system_data: Optional["_models.SystemData"] = None - self.metric_configurations = metric_configurations - - -class MonitoringMetricConfigurationList(_serialization.Model): - """Collection of metric configurations. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of metric configurations. - :vartype value: list[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] - :ivar next_link: Link to the next set of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[MonitoringMetricConfiguration]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[List["_models.MonitoringMetricConfiguration"]] = None - self.next_link: Optional[str] = None - - -class MountPointMap(_serialization.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 server. - - :ivar share_id: ID of the share mounted to the role VM. Required. - :vartype 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. Known values are: "Volume" and "HostPath". - :vartype mount_type: str or ~azure.mgmt.databoxedge.models.MountType - :ivar role_type: Role type. Known values are: "IOT", "ASA", "Functions", "Cognitive", "MEC", - "CloudEdgeManagement", and "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: Any) -> None: - """ - :keyword share_id: ID of the share mounted to the role VM. Required. - :paramtype share_id: str - """ - super().__init__(**kwargs) - self.share_id = share_id - self.role_id: Optional[str] = None - self.mount_point: Optional[str] = None - self.mount_type: Optional[Union[str, "_models.MountType"]] = None - self.role_type: Optional[Union[str, "_models.RoleTypes"]] = None - - -class NetworkAdapter(_serialization.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: int - :ivar status: Value indicating whether this adapter is valid. Known values are: "Inactive" and - "Active". - :vartype status: str or ~azure.mgmt.databoxedge.models.NetworkAdapterStatus - :ivar rdma_status: Value indicating whether this adapter is RDMA capable. Known values are: - "Incapable" and "Capable". - :vartype rdma_status: str or ~azure.mgmt.databoxedge.models.NetworkAdapterRDMAStatus - :ivar dhcp_status: Value indicating whether this adapter has DHCP enabled. Known values are: - "Disabled" and "Enabled". - :vartype 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": "int"}, - "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: Optional[Union[str, "_models.NetworkAdapterRDMAStatus"]] = None, - dhcp_status: Optional[Union[str, "_models.NetworkAdapterDHCPStatus"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword rdma_status: Value indicating whether this adapter is RDMA capable. Known values are: - "Incapable" and "Capable". - :paramtype rdma_status: str or ~azure.mgmt.databoxedge.models.NetworkAdapterRDMAStatus - :keyword dhcp_status: Value indicating whether this adapter has DHCP enabled. Known values are: - "Disabled" and "Enabled". - :paramtype dhcp_status: str or ~azure.mgmt.databoxedge.models.NetworkAdapterDHCPStatus - """ - super().__init__(**kwargs) - self.adapter_id: Optional[str] = None - self.adapter_position: Optional["_models.NetworkAdapterPosition"] = None - self.index: Optional[int] = None - self.node_id: Optional[str] = None - self.network_adapter_name: Optional[str] = None - self.label: Optional[str] = None - self.mac_address: Optional[str] = None - self.link_speed: Optional[int] = None - self.status: Optional[Union[str, "_models.NetworkAdapterStatus"]] = None - self.rdma_status = rdma_status - self.dhcp_status = dhcp_status - self.ipv4_configuration: Optional["_models.Ipv4Config"] = None - self.ipv6_configuration: Optional["_models.Ipv6Config"] = None - self.ipv6_link_local_address: Optional[str] = None - self.dns_servers: Optional[List[str]] = None - - -class NetworkAdapterPosition(_serialization.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. Known values are: "None", "NonRDMA", and "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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.network_group: Optional[Union[str, "_models.NetworkGroup"]] = None - self.port: Optional[int] = 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 system_data: NetworkSettings on ASE device. - :vartype 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}, - "system_data": {"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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.system_data: Optional["_models.SystemData"] = None - self.network_adapters: Optional[List["_models.NetworkAdapter"]] = 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. Known values are: "Unknown", - "Up", "Down", "Rebooting", and "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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.node_status: Optional[Union[str, "_models.NodeStatus"]] = None - self.node_chassis_serial_number: Optional[str] = None - self.node_serial_number: Optional[str] = None - self.node_display_name: Optional[str] = None - self.node_friendly_software_version: Optional[str] = None - self.node_hcs_version: Optional[str] = None - self.node_instance_id: Optional[str] = None - - -class NodeInfo(_serialization.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. Known values are: "Invalid", "Master", and "Worker". - :vartype type: str or ~azure.mgmt.databoxedge.models.KubernetesNodeType - :ivar ip_configuration: IP Configuration of the Kubernetes node. - :vartype 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: Optional[List["_models.KubernetesIPConfiguration"]] = None, **kwargs: Any - ) -> None: - """ - :keyword ip_configuration: IP Configuration of the Kubernetes node. - :paramtype ip_configuration: list[~azure.mgmt.databoxedge.models.KubernetesIPConfiguration] - """ - super().__init__(**kwargs) - self.name: Optional[str] = None - self.type: Optional[Union[str, "_models.KubernetesNodeType"]] = None - self.ip_configuration = ip_configuration - - -class NodeList(_serialization.Model): - """Collection of Nodes. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of Nodes. - :vartype value: list[~azure.mgmt.databoxedge.models.Node] - :ivar next_link: Link to the next set of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Node]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword next_link: Link to the next set of results. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value: Optional[List["_models.Node"]] = None - self.next_link = next_link - - -class Operation(_serialization.Model): - """Operations. - - :ivar name: Name of the operation. - :vartype name: str - :ivar display: Properties displayed for the operation. - :vartype display: ~azure.mgmt.databoxedge.models.OperationDisplay - :ivar origin: Origin of the operation. - :vartype origin: str - :ivar is_data_action: Indicates whether the operation is a data action. - :vartype is_data_action: bool - :ivar service_specification: Service specification. - :vartype 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: Optional[str] = None, - display: Optional["_models.OperationDisplay"] = None, - origin: Optional[str] = None, - is_data_action: Optional[bool] = None, - service_specification: Optional["_models.ServiceSpecification"] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Name of the operation. - :paramtype name: str - :keyword display: Properties displayed for the operation. - :paramtype display: ~azure.mgmt.databoxedge.models.OperationDisplay - :keyword origin: Origin of the operation. - :paramtype origin: str - :keyword is_data_action: Indicates whether the operation is a data action. - :paramtype is_data_action: bool - :keyword service_specification: Service specification. - :paramtype service_specification: ~azure.mgmt.databoxedge.models.ServiceSpecification - """ - super().__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(_serialization.Model): - """Operation display properties. - - :ivar provider: Provider name. - :vartype provider: str - :ivar resource: The type of resource in which the operation is performed. - :vartype resource: str - :ivar operation: Operation to be performed on the resource. - :vartype operation: str - :ivar description: Description of the operation to be performed. - :vartype description: str - """ - - _attribute_map = { - "provider": {"key": "provider", "type": "str"}, - "resource": {"key": "resource", "type": "str"}, - "operation": {"key": "operation", "type": "str"}, - "description": {"key": "description", "type": "str"}, - } - - def __init__( - self, - *, - provider: Optional[str] = None, - resource: Optional[str] = None, - operation: Optional[str] = None, - description: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword provider: Provider name. - :paramtype provider: str - :keyword resource: The type of resource in which the operation is performed. - :paramtype resource: str - :keyword operation: Operation to be performed on the resource. - :paramtype operation: str - :keyword description: Description of the operation to be performed. - :paramtype description: str - """ - super().__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description - - -class OperationsList(_serialization.Model): - """The list of operations used for the discovery of available provider operations. - - All required parameters must be populated in order to send to server. - - :ivar value: The value. Required. - :vartype value: list[~azure.mgmt.databoxedge.models.Operation] - :ivar next_link: Link to the next set of results. - :vartype next_link: str - """ - - _validation = { - "value": {"required": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Operation]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: List["_models.Operation"], next_link: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword value: The value. Required. - :paramtype value: list[~azure.mgmt.databoxedge.models.Operation] - :keyword next_link: Link to the next set of results. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class Order(ARMBaseModel): - """The order details. - - 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 system_data: Order configured on ASE resource. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar contact_information: The contact details. - :vartype contact_information: ~azure.mgmt.databoxedge.models.ContactDetails - :ivar shipping_address: The shipping address. - :vartype 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] - :ivar shipment_type: ShipmentType of the order. Known values are: "NotApplicable", - "ShippedToCustomer", and "SelfPickup". - :vartype shipment_type: str or ~azure.mgmt.databoxedge.models.ShipmentType - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": 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: Optional["_models.ContactDetails"] = None, - shipping_address: Optional["_models.Address"] = None, - shipment_type: Optional[Union[str, "_models.ShipmentType"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword contact_information: The contact details. - :paramtype contact_information: ~azure.mgmt.databoxedge.models.ContactDetails - :keyword shipping_address: The shipping address. - :paramtype shipping_address: ~azure.mgmt.databoxedge.models.Address - :keyword shipment_type: ShipmentType of the order. Known values are: "NotApplicable", - "ShippedToCustomer", and "SelfPickup". - :paramtype shipment_type: str or ~azure.mgmt.databoxedge.models.ShipmentType - """ - super().__init__(**kwargs) - self.system_data: Optional["_models.SystemData"] = None - self.contact_information = contact_information - self.shipping_address = shipping_address - self.current_status: Optional["_models.OrderStatus"] = None - self.order_history: Optional[List["_models.OrderStatus"]] = None - self.serial_number: Optional[str] = None - self.delivery_tracking_info: Optional[List["_models.TrackingInfo"]] = None - self.return_tracking_info: Optional[List["_models.TrackingInfo"]] = None - self.shipment_type = shipment_type - - -class OrderList(_serialization.Model): - """List of order entities. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of orders. - :vartype value: list[~azure.mgmt.databoxedge.models.Order] - :ivar next_link: Link to the next set of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Order]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[List["_models.Order"]] = None - self.next_link: Optional[str] = None - - -class OrderStatus(_serialization.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 server. - - :ivar status: Status of the order as per the allowed status types. Required. Known values are: - "Untracked", "AwaitingFulfillment", "AwaitingPreparation", "AwaitingShipment", "Shipped", - "Arriving", "Delivered", "ReplacementRequested", "LostDevice", "Declined", "ReturnInitiated", - "AwaitingReturnShipment", "ShippedBack", "CollectedAtMicrosoft", "AwaitingPickup", - "PickupCompleted", and "AwaitingDrop". - :vartype status: str or ~azure.mgmt.databoxedge.models.OrderState - :ivar update_date_time: Time of status update. - :vartype update_date_time: ~datetime.datetime - :ivar comments: Comments related to this status change. - :vartype 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: Union[str, "_models.OrderState"], comments: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword status: Status of the order as per the allowed status types. Required. Known values - are: "Untracked", "AwaitingFulfillment", "AwaitingPreparation", "AwaitingShipment", "Shipped", - "Arriving", "Delivered", "ReplacementRequested", "LostDevice", "Declined", "ReturnInitiated", - "AwaitingReturnShipment", "ShippedBack", "CollectedAtMicrosoft", "AwaitingPickup", - "PickupCompleted", and "AwaitingDrop". - :paramtype status: str or ~azure.mgmt.databoxedge.models.OrderState - :keyword comments: Comments related to this status change. - :paramtype comments: str - """ - super().__init__(**kwargs) - self.status = status - self.update_date_time: Optional[datetime.datetime] = None - self.comments = comments - self.tracking_information: Optional["_models.TrackingInfo"] = None - self.additional_order_details: Optional[Dict[str, str]] = 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 server. - - :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 system_data: Trigger in DataBoxEdge Resource. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar kind: Trigger Kind. Required. Known values are: "FileEvent" and "PeriodicTimerEvent". - :vartype kind: str or ~azure.mgmt.databoxedge.models.TriggerEventType - :ivar source_info: Periodic timer details. Required. - :vartype source_info: ~azure.mgmt.databoxedge.models.PeriodicTimerSourceInfo - :ivar sink_info: Role Sink information. Required. - :vartype sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo - :ivar 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. - :vartype custom_context_tag: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"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: "_models.PeriodicTimerSourceInfo", - sink_info: "_models.RoleSinkInfo", - custom_context_tag: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword source_info: Periodic timer details. Required. - :paramtype source_info: ~azure.mgmt.databoxedge.models.PeriodicTimerSourceInfo - :keyword sink_info: Role Sink information. Required. - :paramtype sink_info: ~azure.mgmt.databoxedge.models.RoleSinkInfo - :keyword 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. - :paramtype custom_context_tag: str - """ - super().__init__(**kwargs) - self.kind: str = "PeriodicTimerEvent" - self.source_info = source_info - self.sink_info = sink_info - self.custom_context_tag = custom_context_tag - - -class PeriodicTimerSourceInfo(_serialization.Model): - """Periodic timer event source. - - All required parameters must be populated in order to send to server. - - :ivar start_time: 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. Required. - :vartype start_time: ~datetime.datetime - :ivar schedule: Periodic frequency at which timer event needs to be raised. Supports daily, - hourly, minutes, and seconds. Required. - :vartype schedule: str - :ivar topic: Topic where periodic events are published to IoT device. - :vartype 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: datetime.datetime, schedule: str, topic: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword start_time: 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. Required. - :paramtype start_time: ~datetime.datetime - :keyword schedule: Periodic frequency at which timer event needs to be raised. Supports daily, - hourly, minutes, and seconds. Required. - :paramtype schedule: str - :keyword topic: Topic where periodic events are published to IoT device. - :paramtype topic: str - """ - super().__init__(**kwargs) - self.start_time = start_time - self.schedule = schedule - self.topic = topic - - -class RefreshDetails(_serialization.Model): - """Fields for tracking refresh job on the share or container. - - :ivar 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. - :vartype in_progress_refresh_job_id: str - :ivar 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. - :vartype last_completed_refresh_job_time_in_utc: ~datetime.datetime - :ivar 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. - :vartype error_manifest_file: str - :ivar 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. - :vartype 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: Optional[str] = None, - last_completed_refresh_job_time_in_utc: Optional[datetime.datetime] = None, - error_manifest_file: Optional[str] = None, - last_job: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword 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. - :paramtype in_progress_refresh_job_id: str - :keyword 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. - :paramtype last_completed_refresh_job_time_in_utc: ~datetime.datetime - :keyword 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. - :paramtype error_manifest_file: str - :keyword 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. - :paramtype last_job: str - """ - super().__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(_serialization.Model): - """Msi identity details of the resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: Identity type. Known values are: "None", "SystemAssigned", and "UserAssigned". - :vartype 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: Optional[Union[str, "_models.MsiIdentityType"]] = None, **kwargs: Any) -> None: - """ - :keyword type: Identity type. Known values are: "None", "SystemAssigned", and "UserAssigned". - :paramtype type: str or ~azure.mgmt.databoxedge.models.MsiIdentityType - """ - super().__init__(**kwargs) - self.type = type - self.principal_id: Optional[str] = None - self.tenant_id: Optional[str] = None - - -class ResourceMoveDetails(_serialization.Model): - """Fields for tracking resource move. - - :ivar operation_in_progress: Denotes whether move operation is in progress. Known values are: - "None", "ResourceMoveInProgress", and "ResourceMoveFailed". - :vartype operation_in_progress: str or ~azure.mgmt.databoxedge.models.ResourceMoveStatus - :ivar operation_in_progress_lock_timeout_in_utc: Denotes the timeout of the operation to - finish. - :vartype operation_in_progress_lock_timeout_in_utc: ~datetime.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: Optional[Union[str, "_models.ResourceMoveStatus"]] = None, - operation_in_progress_lock_timeout_in_utc: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword operation_in_progress: Denotes whether move operation is in progress. Known values - are: "None", "ResourceMoveInProgress", and "ResourceMoveFailed". - :paramtype operation_in_progress: str or ~azure.mgmt.databoxedge.models.ResourceMoveStatus - :keyword operation_in_progress_lock_timeout_in_utc: Denotes the timeout of the operation to - finish. - :paramtype operation_in_progress_lock_timeout_in_utc: ~datetime.datetime - """ - super().__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(_serialization.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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.resource_type: Optional[str] = None - self.skus: Optional[List["_models.SkuInformation"]] = None - - -class RoleList(_serialization.Model): - """Collection of all the roles on the Data Box Edge device. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The Value. - :vartype value: list[~azure.mgmt.databoxedge.models.Role] - :ivar next_link: Link to the next set of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Role]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[List["_models.Role"]] = None - self.next_link: Optional[str] = None - - -class RoleSinkInfo(_serialization.Model): - """Compute role against which events will be raised. - - All required parameters must be populated in order to send to server. - - :ivar role_id: Compute role ID. Required. - :vartype role_id: str - """ - - _validation = { - "role_id": {"required": True}, - } - - _attribute_map = { - "role_id": {"key": "roleId", "type": "str"}, - } - - def __init__(self, *, role_id: str, **kwargs: Any) -> None: - """ - :keyword role_id: Compute role ID. Required. - :paramtype role_id: str - """ - super().__init__(**kwargs) - self.role_id = role_id - - -class Secret(_serialization.Model): - """Holds device secret either as a KeyVault reference or as an encrypted value. - - :ivar encrypted_secret: Encrypted (using device public key) secret value. - :vartype encrypted_secret: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret - :ivar key_vault_id: Id of the Key-Vault where secret is stored (ex: - secrets/AuthClientSecret/82ef4346187a4033a10d629cde07d740). - :vartype key_vault_id: str - """ - - _attribute_map = { - "encrypted_secret": {"key": "encryptedSecret", "type": "AsymmetricEncryptedSecret"}, - "key_vault_id": {"key": "keyVaultId", "type": "str"}, - } - - def __init__( - self, - *, - encrypted_secret: Optional["_models.AsymmetricEncryptedSecret"] = None, - key_vault_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword encrypted_secret: Encrypted (using device public key) secret value. - :paramtype encrypted_secret: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret - :keyword key_vault_id: Id of the Key-Vault where secret is stored (ex: - secrets/AuthClientSecret/82ef4346187a4033a10d629cde07d740). - :paramtype key_vault_id: str - """ - super().__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 server. - - :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 device_admin_password: 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. Required. - :vartype 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: "_models.AsymmetricEncryptedSecret", **kwargs: Any) -> None: - """ - :keyword device_admin_password: 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. Required. - :paramtype device_admin_password: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret - """ - super().__init__(**kwargs) - self.device_admin_password = device_admin_password - - -class ServiceSpecification(_serialization.Model): - """Service specification. - - :ivar metric_specifications: Metric specification as defined by shoebox. - :vartype metric_specifications: list[~azure.mgmt.databoxedge.models.MetricSpecificationV1] - """ - - _attribute_map = { - "metric_specifications": {"key": "metricSpecifications", "type": "[MetricSpecificationV1]"}, - } - - def __init__( - self, *, metric_specifications: Optional[List["_models.MetricSpecificationV1"]] = None, **kwargs: Any - ) -> None: - """ - :keyword metric_specifications: Metric specification as defined by shoebox. - :paramtype metric_specifications: list[~azure.mgmt.databoxedge.models.MetricSpecificationV1] - """ - super().__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 server. - - :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 system_data: Share on ASE device. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar description: Description for the share. - :vartype description: str - :ivar share_status: Current status of the share. Required. Known values are: "Offline", - "Unknown", "OK", "Updating", and "NeedsAttention". - :vartype share_status: str or ~azure.mgmt.databoxedge.models.ShareStatus - :ivar monitoring_status: Current monitoring status of the share. Required. Known values are: - "Enabled" and "Disabled". - :vartype monitoring_status: str or ~azure.mgmt.databoxedge.models.MonitoringStatus - :ivar azure_container_info: Azure container mapping for the share. - :vartype azure_container_info: ~azure.mgmt.databoxedge.models.AzureContainerInfo - :ivar access_protocol: Access protocol to be used by the share. Required. Known values are: - "SMB" and "NFS". - :vartype access_protocol: str or ~azure.mgmt.databoxedge.models.ShareAccessProtocol - :ivar user_access_rights: Mapping of users and corresponding access rights on the share - (required for SMB protocol). - :vartype user_access_rights: list[~azure.mgmt.databoxedge.models.UserAccessRight] - :ivar client_access_rights: List of IP addresses and corresponding access rights on the - share(required for NFS protocol). - :vartype client_access_rights: list[~azure.mgmt.databoxedge.models.ClientAccessRight] - :ivar refresh_details: Details of the refresh job on this share. - :vartype 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] - :ivar data_policy: Data policy of the share. Known values are: "Cloud" and "Local". - :vartype data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"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: Union[str, "_models.ShareStatus"], - monitoring_status: Union[str, "_models.MonitoringStatus"], - access_protocol: Union[str, "_models.ShareAccessProtocol"], - description: Optional[str] = None, - azure_container_info: Optional["_models.AzureContainerInfo"] = None, - user_access_rights: Optional[List["_models.UserAccessRight"]] = None, - client_access_rights: Optional[List["_models.ClientAccessRight"]] = None, - refresh_details: Optional["_models.RefreshDetails"] = None, - data_policy: Optional[Union[str, "_models.DataPolicy"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description for the share. - :paramtype description: str - :keyword share_status: Current status of the share. Required. Known values are: "Offline", - "Unknown", "OK", "Updating", and "NeedsAttention". - :paramtype share_status: str or ~azure.mgmt.databoxedge.models.ShareStatus - :keyword monitoring_status: Current monitoring status of the share. Required. Known values are: - "Enabled" and "Disabled". - :paramtype monitoring_status: str or ~azure.mgmt.databoxedge.models.MonitoringStatus - :keyword azure_container_info: Azure container mapping for the share. - :paramtype azure_container_info: ~azure.mgmt.databoxedge.models.AzureContainerInfo - :keyword access_protocol: Access protocol to be used by the share. Required. Known values are: - "SMB" and "NFS". - :paramtype access_protocol: str or ~azure.mgmt.databoxedge.models.ShareAccessProtocol - :keyword user_access_rights: Mapping of users and corresponding access rights on the share - (required for SMB protocol). - :paramtype user_access_rights: list[~azure.mgmt.databoxedge.models.UserAccessRight] - :keyword client_access_rights: List of IP addresses and corresponding access rights on the - share(required for NFS protocol). - :paramtype client_access_rights: list[~azure.mgmt.databoxedge.models.ClientAccessRight] - :keyword refresh_details: Details of the refresh job on this share. - :paramtype refresh_details: ~azure.mgmt.databoxedge.models.RefreshDetails - :keyword data_policy: Data policy of the share. Known values are: "Cloud" and "Local". - :paramtype data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy - """ - super().__init__(**kwargs) - self.system_data: Optional["_models.SystemData"] = None - 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: Optional[List["_models.MountPointMap"]] = None - self.data_policy = data_policy - - -class ShareAccessRight(_serialization.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 server. - - :ivar share_id: The share ID. Required. - :vartype share_id: str - :ivar access_type: Type of access to be allowed on the share for this user. Required. Known - values are: "Change", "Read", and "Custom". - :vartype 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: Union[str, "_models.ShareAccessType"], **kwargs: Any) -> None: - """ - :keyword share_id: The share ID. Required. - :paramtype share_id: str - :keyword access_type: Type of access to be allowed on the share for this user. Required. Known - values are: "Change", "Read", and "Custom". - :paramtype access_type: str or ~azure.mgmt.databoxedge.models.ShareAccessType - """ - super().__init__(**kwargs) - self.share_id = share_id - self.access_type = access_type - - -class ShareList(_serialization.Model): - """Collection of all the shares on the Data Box Edge/Gateway device. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of shares. - :vartype value: list[~azure.mgmt.databoxedge.models.Share] - :ivar next_link: Link to the next set of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Share]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[List["_models.Share"]] = None - self.next_link: Optional[str] = None - - -class Sku(_serialization.Model): - """The SKU type. - - :ivar name: SKU name. Known values are: "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", and "Management". - :vartype name: str or ~azure.mgmt.databoxedge.models.SkuName - :ivar tier: The SKU tier. This is based on the SKU name. "Standard" - :vartype tier: str or ~azure.mgmt.databoxedge.models.SkuTier - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "tier": {"key": "tier", "type": "str"}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "_models.SkuName"]] = None, - tier: Optional[Union[str, "_models.SkuTier"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: SKU name. Known values are: "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", and "Management". - :paramtype name: str or ~azure.mgmt.databoxedge.models.SkuName - :keyword tier: The SKU tier. This is based on the SKU name. "Standard" - :paramtype tier: str or ~azure.mgmt.databoxedge.models.SkuTier - """ - super().__init__(**kwargs) - self.name = name - self.tier = tier - - -class SkuCapability(_serialization.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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.name: Optional[str] = None - self.value: Optional[str] = None - - -class SkuCost(_serialization.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: 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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.meter_id: Optional[str] = None - self.quantity: Optional[int] = None - self.extended_unit: Optional[str] = None - - -class SkuInformation(_serialization.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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.name: Optional[str] = None - self.tier: Optional[str] = None - self.kind: Optional[str] = None - self.family: Optional[str] = None - self.costs: Optional[List["_models.SkuCost"]] = None - self.locations: Optional[List[str]] = None - self.location_info: Optional[List["_models.SkuLocationInfo"]] = None - self.required_quota_ids: Optional[List[str]] = None - self.required_features: Optional[List[str]] = None - - -class SkuInformationList(_serialization.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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[List["_models.ResourceTypeSku"]] = None - self.next_link: Optional[str] = None - - -class SkuLocationInfo(_serialization.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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.location: Optional[str] = None - self.zones: Optional[List[str]] = None - self.sites: Optional[List[str]] = 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 server. - - :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 system_data: StorageAccount object on ASE device. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar description: Description for the storage Account. - :vartype description: str - :ivar storage_account_status: Current status of the storage account. Known values are: "OK", - "Offline", "Unknown", "Updating", and "NeedsAttention". - :vartype storage_account_status: str or ~azure.mgmt.databoxedge.models.StorageAccountStatus - :ivar data_policy: Data policy of the storage Account. Required. Known values are: "Cloud" and - "Local". - :vartype data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy - :ivar storage_account_credential_id: Storage Account Credential Id. - :vartype 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}, - "system_data": {"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: Union[str, "_models.DataPolicy"], - description: Optional[str] = None, - storage_account_status: Optional[Union[str, "_models.StorageAccountStatus"]] = None, - storage_account_credential_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword description: Description for the storage Account. - :paramtype description: str - :keyword storage_account_status: Current status of the storage account. Known values are: "OK", - "Offline", "Unknown", "Updating", and "NeedsAttention". - :paramtype storage_account_status: str or ~azure.mgmt.databoxedge.models.StorageAccountStatus - :keyword data_policy: Data policy of the storage Account. Required. Known values are: "Cloud" - and "Local". - :paramtype data_policy: str or ~azure.mgmt.databoxedge.models.DataPolicy - :keyword storage_account_credential_id: Storage Account Credential Id. - :paramtype storage_account_credential_id: str - """ - super().__init__(**kwargs) - self.system_data: Optional["_models.SystemData"] = None - 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: Optional[str] = None - self.container_count: Optional[int] = 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 server. - - :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 system_data: StorageAccountCredential object. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar alias: Alias for the storage account. Required. - :vartype alias: str - :ivar user_name: Username for the storage account. - :vartype user_name: str - :ivar account_key: Encrypted storage key. - :vartype account_key: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret - :ivar connection_string: Connection string for the storage account. Use this string if username - and account key are not specified. - :vartype connection_string: str - :ivar ssl_status: Signifies whether SSL needs to be enabled or not. Required. Known values are: - "Enabled" and "Disabled". - :vartype ssl_status: str or ~azure.mgmt.databoxedge.models.SSLStatus - :ivar blob_domain_name: Blob end point for private clouds. - :vartype blob_domain_name: str - :ivar account_type: Type of storage accessed on the storage account. Required. Known values - are: "GeneralPurposeStorage" and "BlobStorage". - :vartype account_type: str or ~azure.mgmt.databoxedge.models.AccountType - :ivar storage_account_id: Id of the storage account. - :vartype storage_account_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"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: Union[str, "_models.SSLStatus"], - account_type: Union[str, "_models.AccountType"], - user_name: Optional[str] = None, - account_key: Optional["_models.AsymmetricEncryptedSecret"] = None, - connection_string: Optional[str] = None, - blob_domain_name: Optional[str] = None, - storage_account_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword alias: Alias for the storage account. Required. - :paramtype alias: str - :keyword user_name: Username for the storage account. - :paramtype user_name: str - :keyword account_key: Encrypted storage key. - :paramtype account_key: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret - :keyword connection_string: Connection string for the storage account. Use this string if - username and account key are not specified. - :paramtype connection_string: str - :keyword ssl_status: Signifies whether SSL needs to be enabled or not. Required. Known values - are: "Enabled" and "Disabled". - :paramtype ssl_status: str or ~azure.mgmt.databoxedge.models.SSLStatus - :keyword blob_domain_name: Blob end point for private clouds. - :paramtype blob_domain_name: str - :keyword account_type: Type of storage accessed on the storage account. Required. Known values - are: "GeneralPurposeStorage" and "BlobStorage". - :paramtype account_type: str or ~azure.mgmt.databoxedge.models.AccountType - :keyword storage_account_id: Id of the storage account. - :paramtype storage_account_id: str - """ - super().__init__(**kwargs) - self.system_data: Optional["_models.SystemData"] = None - 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 StorageAccountCredentialList(_serialization.Model): - """The collection of storage account credentials. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The value. - :vartype value: list[~azure.mgmt.databoxedge.models.StorageAccountCredential] - :ivar next_link: Link to the next set of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[StorageAccountCredential]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[List["_models.StorageAccountCredential"]] = None - self.next_link: Optional[str] = None - - -class StorageAccountList(_serialization.Model): - """Collection of all the Storage Accounts on the Data Box Edge/Gateway device. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of storageAccounts. - :vartype value: list[~azure.mgmt.databoxedge.models.StorageAccount] - :ivar next_link: Link to the next set of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[StorageAccount]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[List["_models.StorageAccount"]] = None - self.next_link: Optional[str] = None - - -class SubscriptionRegisteredFeatures(_serialization.Model): - """SubscriptionRegisteredFeatures. - - :ivar name: - :vartype name: str - :ivar state: - :vartype state: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "state": {"key": "state", "type": "str"}, - } - - def __init__(self, *, name: Optional[str] = None, state: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword name: - :paramtype name: str - :keyword state: - :paramtype state: str - """ - super().__init__(**kwargs) - self.name = name - self.state = state - - -class SymmetricKey(_serialization.Model): - """Symmetric key for authentication. - - :ivar connection_string: Connection string based on the symmetric key. - :vartype connection_string: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret - """ - - _attribute_map = { - "connection_string": {"key": "connectionString", "type": "AsymmetricEncryptedSecret"}, - } - - def __init__( - self, *, connection_string: Optional["_models.AsymmetricEncryptedSecret"] = None, **kwargs: Any - ) -> None: - """ - :keyword connection_string: Connection string based on the symmetric key. - :paramtype connection_string: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret - """ - super().__init__(**kwargs) - self.connection_string = connection_string - - -class SystemData(_serialization.Model): - """Metadata pertaining to creation and last modification of the resource. - - :ivar created_by: The identity that created the resource. - :vartype created_by: str - :ivar created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~azure.mgmt.databoxedge.models.CreatedByType - :ivar created_at: The timestamp of resource creation (UTC). - :vartype created_at: ~datetime.datetime - :ivar last_modified_by: The identity that last modified the resource. - :vartype last_modified_by: str - :ivar last_modified_by_type: The type of identity that last modified the resource. Known values - are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or ~azure.mgmt.databoxedge.models.CreatedByType - :ivar last_modified_at: The type of identity that last modified the resource. - :vartype last_modified_at: ~datetime.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: Optional[str] = None, - created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, - created_at: Optional[datetime.datetime] = None, - last_modified_by: Optional[str] = None, - last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, - last_modified_at: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword created_by: The identity that created the resource. - :paramtype created_by: str - :keyword created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~azure.mgmt.databoxedge.models.CreatedByType - :keyword created_at: The timestamp of resource creation (UTC). - :paramtype created_at: ~datetime.datetime - :keyword last_modified_by: The identity that last modified the resource. - :paramtype last_modified_by: str - :keyword last_modified_by_type: The type of identity that last modified the resource. Known - values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or ~azure.mgmt.databoxedge.models.CreatedByType - :keyword last_modified_at: The type of identity that last modified the resource. - :paramtype last_modified_at: ~datetime.datetime - """ - super().__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(_serialization.Model): - """Tracking courier information. - - :ivar serial_number: Serial number of the device being tracked. - :vartype serial_number: str - :ivar carrier_name: Name of the carrier used in the delivery. - :vartype carrier_name: str - :ivar tracking_id: Tracking ID of the shipment. - :vartype tracking_id: str - :ivar tracking_url: Tracking URL of the shipment. - :vartype 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: Optional[str] = None, - carrier_name: Optional[str] = None, - tracking_id: Optional[str] = None, - tracking_url: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword serial_number: Serial number of the device being tracked. - :paramtype serial_number: str - :keyword carrier_name: Name of the carrier used in the delivery. - :paramtype carrier_name: str - :keyword tracking_id: Tracking ID of the shipment. - :paramtype tracking_id: str - :keyword tracking_url: Tracking URL of the shipment. - :paramtype tracking_url: str - """ - super().__init__(**kwargs) - self.serial_number = serial_number - self.carrier_name = carrier_name - self.tracking_id = tracking_id - self.tracking_url = tracking_url - - -class TriggerList(_serialization.Model): - """Collection of all trigger on the data box edge device. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of triggers. - :vartype value: list[~azure.mgmt.databoxedge.models.Trigger] - :ivar next_link: Link to the next set of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Trigger]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[List["_models.Trigger"]] = None - self.next_link: Optional[str] = None - - -class UpdateDetails(_serialization.Model): - """Update Specific attributes. - - :ivar update_title: Title of the Update. - :vartype update_title: str - :ivar update_size: Size of the update(In Bytes). - :vartype update_size: float - :ivar update_type: Type of the Update. Known values are: "Software", "Kubernetes", and - "Firmware". - :vartype update_type: str or ~azure.mgmt.databoxedge.models.UpdateType - :ivar target_version: Target Version number. - :vartype target_version: str - :ivar estimated_install_time_in_mins: Estimated Install Time for the update. - :vartype estimated_install_time_in_mins: int - :ivar reboot_behavior: Indicates if updates are available and at least one of the updates needs - a reboot. Known values are: "NeverReboots", "RequiresReboot", and "RequestReboot". - :vartype reboot_behavior: str or ~azure.mgmt.databoxedge.models.InstallRebootBehavior - :ivar status: Status of the update. Known values are: "DownloadPending", "DownloadStarted", - "DownloadCompleted", "InstallStarted", and "InstallCompleted". - :vartype 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: Optional[str] = None, - update_size: Optional[float] = None, - update_type: Optional[Union[str, "_models.UpdateType"]] = None, - target_version: Optional[str] = None, - estimated_install_time_in_mins: Optional[int] = None, - reboot_behavior: Optional[Union[str, "_models.InstallRebootBehavior"]] = None, - status: Optional[Union[str, "_models.UpdateStatus"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword update_title: Title of the Update. - :paramtype update_title: str - :keyword update_size: Size of the update(In Bytes). - :paramtype update_size: float - :keyword update_type: Type of the Update. Known values are: "Software", "Kubernetes", and - "Firmware". - :paramtype update_type: str or ~azure.mgmt.databoxedge.models.UpdateType - :keyword target_version: Target Version number. - :paramtype target_version: str - :keyword estimated_install_time_in_mins: Estimated Install Time for the update. - :paramtype estimated_install_time_in_mins: int - :keyword reboot_behavior: Indicates if updates are available and at least one of the updates - needs a reboot. Known values are: "NeverReboots", "RequiresReboot", and "RequestReboot". - :paramtype reboot_behavior: str or ~azure.mgmt.databoxedge.models.InstallRebootBehavior - :keyword status: Status of the update. Known values are: "DownloadPending", "DownloadStarted", - "DownloadCompleted", "InstallStarted", and "InstallCompleted". - :paramtype status: str or ~azure.mgmt.databoxedge.models.UpdateStatus - """ - super().__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(_serialization.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. Known values are: "Unknown", "Initializing", - "Downloading", and "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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.download_phase: Optional[Union[str, "_models.DownloadPhase"]] = None - self.percent_complete: Optional[int] = None - self.total_bytes_to_download: Optional[float] = None - self.total_bytes_downloaded: Optional[float] = None - self.number_of_updates_to_download: Optional[int] = None - self.number_of_updates_downloaded: Optional[int] = None - - -class UpdateInstallProgress(_serialization.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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.percent_complete: Optional[int] = None - self.number_of_updates_to_install: Optional[int] = None - self.number_of_updates_installed: Optional[int] = 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 - :ivar system_data: UpdateSummary Result. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar device_version_number: The current version of the device in format: 1.2.17312.13.",. - :vartype device_version_number: str - :ivar friendly_device_version_name: The current version of the device in text format. - :vartype friendly_device_version_name: str - :ivar device_last_scanned_date_time: The last time when a scan was done on the device. - :vartype device_last_scanned_date_time: ~datetime.datetime - :ivar last_completed_scan_job_date_time: The time when the last scan job was completed - (success/cancelled/failed) on the appliance. - :vartype last_completed_scan_job_date_time: ~datetime.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.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. Known values are: - "Invalid", "Running", "Succeeded", "Failed", "Canceled", "Paused", and "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.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. Known values are: - "Invalid", "Running", "Succeeded", "Failed", "Canceled", "Paused", and "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. Known values are: "NeverReboots", "RequiresReboot", and "RequestReboot". - :vartype reboot_behavior: str or ~azure.mgmt.databoxedge.models.InstallRebootBehavior - :ivar ongoing_update_operation: The current update operation. Known values are: "None", "Scan", - "Download", and "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.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.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}, - "system_data": {"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__( # pylint: disable=too-many-locals - self, - *, - device_version_number: Optional[str] = None, - friendly_device_version_name: Optional[str] = None, - device_last_scanned_date_time: Optional[datetime.datetime] = None, - last_completed_scan_job_date_time: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword device_version_number: The current version of the device in format: 1.2.17312.13.",. - :paramtype device_version_number: str - :keyword friendly_device_version_name: The current version of the device in text format. - :paramtype friendly_device_version_name: str - :keyword device_last_scanned_date_time: The last time when a scan was done on the device. - :paramtype device_last_scanned_date_time: ~datetime.datetime - :keyword last_completed_scan_job_date_time: The time when the last scan job was completed - (success/cancelled/failed) on the appliance. - :paramtype last_completed_scan_job_date_time: ~datetime.datetime - """ - super().__init__(**kwargs) - self.system_data: Optional["_models.SystemData"] = None - 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: Optional[datetime.datetime] = None - self.last_completed_download_job_id: Optional[str] = None - self.last_download_job_status: Optional[Union[str, "_models.JobStatus"]] = None - self.last_completed_install_job_date_time: Optional[datetime.datetime] = None - self.last_completed_install_job_id: Optional[str] = None - self.last_install_job_status: Optional[Union[str, "_models.JobStatus"]] = None - self.total_number_of_updates_available: Optional[int] = None - self.total_number_of_updates_pending_download: Optional[int] = None - self.total_number_of_updates_pending_install: Optional[int] = None - self.reboot_behavior: Optional[Union[str, "_models.InstallRebootBehavior"]] = None - self.ongoing_update_operation: Optional[Union[str, "_models.UpdateOperation"]] = None - self.in_progress_download_job_id: Optional[str] = None - self.in_progress_install_job_id: Optional[str] = None - self.in_progress_download_job_started_date_time: Optional[datetime.datetime] = None - self.in_progress_install_job_started_date_time: Optional[datetime.datetime] = None - self.update_titles: Optional[List[str]] = None - self.updates: Optional[List["_models.UpdateDetails"]] = None - self.total_update_size_in_bytes: Optional[float] = None - self.total_time_in_minutes: Optional[int] = None - - -class UploadCertificateRequest(_serialization.Model): - """The upload certificate request. - - All required parameters must be populated in order to send to server. - - :ivar authentication_type: The authentication type. Known values are: "Invalid" and - "AzureActiveDirectory". - :vartype authentication_type: str or ~azure.mgmt.databoxedge.models.AuthenticationType - :ivar certificate: The base64 encoded certificate raw data. Required. - :vartype 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: Optional[Union[str, "_models.AuthenticationType"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword authentication_type: The authentication type. Known values are: "Invalid" and - "AzureActiveDirectory". - :paramtype authentication_type: str or ~azure.mgmt.databoxedge.models.AuthenticationType - :keyword certificate: The base64 encoded certificate raw data. Required. - :paramtype certificate: str - """ - super().__init__(**kwargs) - self.authentication_type = authentication_type - self.certificate = certificate - - -class UploadCertificateResponse(_serialization.Model): - """The upload registration certificate response. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar auth_type: Specifies authentication type. Known values are: "Invalid" and - "AzureActiveDirectory". - :vartype 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: Optional[Union[str, "_models.AuthenticationType"]] = None, **kwargs: Any) -> None: - """ - :keyword auth_type: Specifies authentication type. Known values are: "Invalid" and - "AzureActiveDirectory". - :paramtype auth_type: str or ~azure.mgmt.databoxedge.models.AuthenticationType - """ - super().__init__(**kwargs) - self.auth_type = auth_type - self.resource_id: Optional[str] = None - self.aad_authority: Optional[str] = None - self.aad_tenant_id: Optional[str] = None - self.service_principal_client_id: Optional[str] = None - self.service_principal_object_id: Optional[str] = None - self.azure_management_endpoint_audience: Optional[str] = None - self.aad_audience: Optional[str] = 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 - :ivar system_data: User in DataBoxEdge Resource. - :vartype system_data: ~azure.mgmt.databoxedge.models.SystemData - :ivar encrypted_password: The password details. - :vartype 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] - :ivar user_type: Type of the user. Known values are: "Share", "LocalManagement", and "ARM". - :vartype user_type: str or ~azure.mgmt.databoxedge.models.UserType - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"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, - *, - encrypted_password: Optional["_models.AsymmetricEncryptedSecret"] = None, - user_type: Optional[Union[str, "_models.UserType"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword encrypted_password: The password details. - :paramtype encrypted_password: ~azure.mgmt.databoxedge.models.AsymmetricEncryptedSecret - :keyword user_type: Type of the user. Known values are: "Share", "LocalManagement", and "ARM". - :paramtype user_type: str or ~azure.mgmt.databoxedge.models.UserType - """ - super().__init__(**kwargs) - self.system_data: Optional["_models.SystemData"] = None - self.encrypted_password = encrypted_password - self.share_access_rights: Optional[List["_models.ShareAccessRight"]] = None - self.user_type = user_type - - -class UserAccessRight(_serialization.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 server. - - :ivar user_id: User ID (already existing in the device). Required. - :vartype user_id: str - :ivar access_type: Type of access to be allowed for the user. Required. Known values are: - "Change", "Read", and "Custom". - :vartype 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: Union[str, "_models.ShareAccessType"], **kwargs: Any) -> None: - """ - :keyword user_id: User ID (already existing in the device). Required. - :paramtype user_id: str - :keyword access_type: Type of access to be allowed for the user. Required. Known values are: - "Change", "Read", and "Custom". - :paramtype access_type: str or ~azure.mgmt.databoxedge.models.ShareAccessType - """ - super().__init__(**kwargs) - self.user_id = user_id - self.access_type = access_type - - -class UserList(_serialization.Model): - """Collection of users. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of users. - :vartype value: list[~azure.mgmt.databoxedge.models.User] - :ivar next_link: Link to the next set of results. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[User]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[List["_models.User"]] = None - self.next_link: Optional[str] = None diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_patch.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_patch.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/models/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/__init__.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/__init__.py index c122f949d439..33aed06b0cfb 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/__init__.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,48 +12,56 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import OperationsStatusOperations # type: ignore +from ._operations import DevicesOperations # type: ignore from ._operations import Operations # type: ignore -from ._available_skus_operations import AvailableSkusOperations # type: ignore -from ._devices_operations import DevicesOperations # type: ignore -from ._alerts_operations import AlertsOperations # type: ignore -from ._bandwidth_schedules_operations import BandwidthSchedulesOperations # type: ignore -from ._jobs_operations import JobsOperations # type: ignore -from ._nodes_operations import NodesOperations # type: ignore -from ._operations_status_operations import OperationsStatusOperations # type: ignore -from ._orders_operations import OrdersOperations # type: ignore -from ._roles_operations import RolesOperations # type: ignore -from ._addons_operations import AddonsOperations # type: ignore -from ._monitoring_config_operations import MonitoringConfigOperations # type: ignore -from ._shares_operations import SharesOperations # type: ignore -from ._storage_account_credentials_operations import StorageAccountCredentialsOperations # type: ignore -from ._storage_accounts_operations import StorageAccountsOperations # type: ignore -from ._containers_operations import ContainersOperations # type: ignore -from ._triggers_operations import TriggersOperations # type: ignore -from ._users_operations import UsersOperations # type: ignore +from ._operations import AlertsOperations # type: ignore +from ._operations import BandwidthSchedulesOperations # type: ignore +from ._operations import DiagnosticSettingsOperations # type: ignore +from ._operations import JobsOperations # type: ignore +from ._operations import OrdersOperations # type: ignore +from ._operations import RolesOperations # type: ignore +from ._operations import AddonsOperations # type: ignore +from ._operations import SharesOperations # type: ignore +from ._operations import StorageAccountCredentialsOperations # type: ignore +from ._operations import StorageAccountsOperations # type: ignore +from ._operations import ContainersOperations # type: ignore +from ._operations import TriggersOperations # type: ignore +from ._operations import UsersOperations # type: ignore +from ._operations import DeviceCapacityCheckOperations # type: ignore +from ._operations import NodesOperations # type: ignore +from ._operations import SupportPackagesOperations # type: ignore +from ._operations import DeviceCapacityInfoOperations # type: ignore +from ._operations import MonitoringConfigOperations # type: ignore +from ._operations import AvailableSkusOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Operations", - "AvailableSkusOperations", + "OperationsStatusOperations", "DevicesOperations", + "Operations", "AlertsOperations", "BandwidthSchedulesOperations", + "DiagnosticSettingsOperations", "JobsOperations", - "NodesOperations", - "OperationsStatusOperations", "OrdersOperations", "RolesOperations", "AddonsOperations", - "MonitoringConfigOperations", "SharesOperations", "StorageAccountCredentialsOperations", "StorageAccountsOperations", "ContainersOperations", "TriggersOperations", "UsersOperations", + "DeviceCapacityCheckOperations", + "NodesOperations", + "SupportPackagesOperations", + "DeviceCapacityInfoOperations", + "MonitoringConfigOperations", + "AvailableSkusOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_addons_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_addons_operations.py deleted file mode 100644 index 1a3a0c28fe14..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_addons_operations.py +++ /dev/null @@ -1,668 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_role_request( - device_name: str, role_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "roleName": _SERIALIZER.url("role_name", role_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - device_name: str, role_name: str, addon_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "roleName": _SERIALIZER.url("role_name", role_name, "str"), - "addonName": _SERIALIZER.url("addon_name", addon_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - device_name: str, role_name: str, addon_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "roleName": _SERIALIZER.url("role_name", role_name, "str"), - "addonName": _SERIALIZER.url("addon_name", addon_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - device_name: str, role_name: str, addon_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "roleName": _SERIALIZER.url("role_name", role_name, "str"), - "addonName": _SERIALIZER.url("addon_name", addon_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class AddonsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`addons` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_role( - self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.Addon"]: - """Lists all the addons configured in the role. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either Addon or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Addon] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AddonList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_role_request( - device_name=device_name, - role_name=role_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("AddonList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, device_name: str, role_name: str, addon_name: str, resource_group_name: str, **kwargs: Any - ) -> _models.Addon: - """Gets a specific addon by name. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param addon_name: The addon name. Required. - :type addon_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Addon or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Addon - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Addon] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - role_name=role_name, - addon_name=addon_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Addon", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - device_name: str, - role_name: str, - addon_name: str, - resource_group_name: str, - addon: Union[_models.Addon, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(addon, (IOBase, bytes)): - _content = addon - else: - _json = self._serialize.body(addon, "Addon") - - _request = build_create_or_update_request( - device_name=device_name, - role_name=role_name, - addon_name=addon_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - device_name: str, - role_name: str, - addon_name: str, - resource_group_name: str, - addon: _models.Addon, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Addon]: - """Create or update a addon. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param addon_name: The addon name. Required. - :type addon_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param addon: The addon properties. Required. - :type addon: ~azure.mgmt.databoxedge.models.Addon - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Addon or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Addon] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - device_name: str, - role_name: str, - addon_name: str, - resource_group_name: str, - addon: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Addon]: - """Create or update a addon. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param addon_name: The addon name. Required. - :type addon_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param addon: The addon properties. Required. - :type addon: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Addon or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Addon] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - device_name: str, - role_name: str, - addon_name: str, - resource_group_name: str, - addon: Union[_models.Addon, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Addon]: - """Create or update a addon. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param addon_name: The addon name. Required. - :type addon_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param addon: The addon properties. Is either a Addon type or a IO[bytes] type. Required. - :type addon: ~azure.mgmt.databoxedge.models.Addon or IO[bytes] - :return: An instance of LROPoller that returns either Addon or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Addon] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Addon] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - device_name=device_name, - role_name=role_name, - addon_name=addon_name, - resource_group_name=resource_group_name, - addon=addon, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Addon", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Addon].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Addon]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, device_name: str, role_name: str, addon_name: str, resource_group_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - role_name=role_name, - addon_name=addon_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, device_name: str, role_name: str, addon_name: str, resource_group_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes the addon on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param addon_name: The addon name. Required. - :type addon_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - device_name=device_name, - role_name=role_name, - addon_name=addon_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_alerts_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_alerts_operations.py deleted file mode 100644 index 2352d28f97f3..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_alerts_operations.py +++ /dev/null @@ -1,263 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_data_box_edge_device_request( # pylint: disable=name-too-long - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class AlertsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`alerts` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.Alert"]: - """Gets all the alerts for a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either Alert or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Alert] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AlertList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("AlertList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Alert: - """Gets an alert by name. - - Gets an alert by name. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The alert name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Alert or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Alert - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Alert] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Alert", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_available_skus_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_available_skus_operations.py deleted file mode 100644 index 535cb4fb3247..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_available_skus_operations.py +++ /dev/null @@ -1,158 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/availableSkus") - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class AvailableSkusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`available_skus` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.DataBoxEdgeSku"]: - """List all the available Skus and information related to them. - - List all the available Skus and information related to them. - - :return: An iterator like instance of either DataBoxEdgeSku or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.DataBoxEdgeSku] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DataBoxEdgeSkuList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("DataBoxEdgeSkuList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_bandwidth_schedules_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_bandwidth_schedules_operations.py deleted file mode 100644 index 5156701784f0..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_bandwidth_schedules_operations.py +++ /dev/null @@ -1,638 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_data_box_edge_device_request( # pylint: disable=name-too-long - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class BandwidthSchedulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`bandwidth_schedules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.BandwidthSchedule"]: - """Gets all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either BandwidthSchedule or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.BandwidthSchedule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BandwidthSchedulesList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("BandwidthSchedulesList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.BandwidthSchedule: - """Gets the properties of the specified bandwidth schedule. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The bandwidth schedule name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: BandwidthSchedule or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.BandwidthSchedule - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.BandwidthSchedule] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("BandwidthSchedule", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - device_name: str, - name: str, - resource_group_name: str, - parameters: Union[_models.BandwidthSchedule, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "BandwidthSchedule") - - _request = build_create_or_update_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - parameters: _models.BandwidthSchedule, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BandwidthSchedule]: - """Creates or updates a bandwidth schedule. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The bandwidth schedule name which needs to be added/updated. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The bandwidth schedule to be added or updated. Required. - :type parameters: ~azure.mgmt.databoxedge.models.BandwidthSchedule - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either BandwidthSchedule or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.BandwidthSchedule]: - """Creates or updates a bandwidth schedule. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The bandwidth schedule name which needs to be added/updated. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The bandwidth schedule to be added or updated. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either BandwidthSchedule or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - parameters: Union[_models.BandwidthSchedule, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.BandwidthSchedule]: - """Creates or updates a bandwidth schedule. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The bandwidth schedule name which needs to be added/updated. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The bandwidth schedule to be added or updated. Is either a BandwidthSchedule - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.databoxedge.models.BandwidthSchedule or IO[bytes] - :return: An instance of LROPoller that returns either BandwidthSchedule or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.BandwidthSchedule] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("BandwidthSchedule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.BandwidthSchedule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.BandwidthSchedule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes the specified bandwidth schedule. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The bandwidth schedule name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_containers_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_containers_operations.py deleted file mode 100644 index 0cdb5629e7a3..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_containers_operations.py +++ /dev/null @@ -1,844 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_storage_account_request( - device_name: str, storage_account_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "storageAccountName": _SERIALIZER.url("storage_account_name", storage_account_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - device_name: str, - storage_account_name: str, - container_name: str, - resource_group_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "storageAccountName": _SERIALIZER.url("storage_account_name", storage_account_name, "str"), - "containerName": _SERIALIZER.url("container_name", container_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - device_name: str, - storage_account_name: str, - container_name: str, - resource_group_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "storageAccountName": _SERIALIZER.url("storage_account_name", storage_account_name, "str"), - "containerName": _SERIALIZER.url("container_name", container_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - device_name: str, - storage_account_name: str, - container_name: str, - resource_group_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "storageAccountName": _SERIALIZER.url("storage_account_name", storage_account_name, "str"), - "containerName": _SERIALIZER.url("container_name", container_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_refresh_request( - device_name: str, - storage_account_name: str, - container_name: str, - resource_group_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}/refresh", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "storageAccountName": _SERIALIZER.url("storage_account_name", storage_account_name, "str"), - "containerName": _SERIALIZER.url("container_name", container_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class ContainersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`containers` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_storage_account( - self, device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.Container"]: - """Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device. - - Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The storage Account name. Required. - :type storage_account_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either Container or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Container] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ContainerList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_storage_account_request( - device_name=device_name, - storage_account_name=storage_account_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ContainerList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any - ) -> _models.Container: - """Gets a container by name. - - Gets a container by name. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The Storage Account Name. Required. - :type storage_account_name: str - :param container_name: The container Name. Required. - :type container_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Container or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Container - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Container] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - storage_account_name=storage_account_name, - container_name=container_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Container", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - device_name: str, - storage_account_name: str, - container_name: str, - resource_group_name: str, - container: Union[_models.Container, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(container, (IOBase, bytes)): - _content = container - else: - _json = self._serialize.body(container, "Container") - - _request = build_create_or_update_request( - device_name=device_name, - storage_account_name=storage_account_name, - container_name=container_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - device_name: str, - storage_account_name: str, - container_name: str, - resource_group_name: str, - container: _models.Container, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Container]: - """Creates a new container or updates an existing container on the device. - - Creates a new container or updates an existing container on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The Storage Account Name. Required. - :type storage_account_name: str - :param container_name: The container name. Required. - :type container_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param container: The container properties. Required. - :type container: ~azure.mgmt.databoxedge.models.Container - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Container or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Container] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - device_name: str, - storage_account_name: str, - container_name: str, - resource_group_name: str, - container: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Container]: - """Creates a new container or updates an existing container on the device. - - Creates a new container or updates an existing container on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The Storage Account Name. Required. - :type storage_account_name: str - :param container_name: The container name. Required. - :type container_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param container: The container properties. Required. - :type container: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Container or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Container] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - device_name: str, - storage_account_name: str, - container_name: str, - resource_group_name: str, - container: Union[_models.Container, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Container]: - """Creates a new container or updates an existing container on the device. - - Creates a new container or updates an existing container on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The Storage Account Name. Required. - :type storage_account_name: str - :param container_name: The container name. Required. - :type container_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param container: The container properties. Is either a Container type or a IO[bytes] type. - Required. - :type container: ~azure.mgmt.databoxedge.models.Container or IO[bytes] - :return: An instance of LROPoller that returns either Container or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Container] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Container] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - device_name=device_name, - storage_account_name=storage_account_name, - container_name=container_name, - resource_group_name=resource_group_name, - container=container, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Container", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Container].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Container]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - storage_account_name=storage_account_name, - container_name=container_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes the container on the Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The Storage Account Name. Required. - :type storage_account_name: str - :param container_name: The container name. Required. - :type container_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - 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, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _refresh_initial( - self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_request( - device_name=device_name, - storage_account_name=storage_account_name, - container_name=container_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_refresh( - self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Refreshes the container metadata with the data from the cloud. - - Refreshes the container metadata with the data from the cloud. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The Storage Account Name. Required. - :type storage_account_name: str - :param container_name: The container name. Required. - :type container_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - 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, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_devices_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_devices_operations.py deleted file mode 100644 index 909f7e9388f1..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_devices_operations.py +++ /dev/null @@ -1,2177 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_subscription_request( - subscription_id: str, *, expand: Optional[str] = None, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if expand is not None: - _params["$expand"] = _SERIALIZER.query("expand", expand, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request( - resource_group_name: str, subscription_id: str, *, expand: Optional[str] = None, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if expand is not None: - _params["$expand"] = _SERIALIZER.query("expand", expand, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request(device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_download_updates_request( - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/downloadUpdates", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_generate_certificate_request( - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/generateCertificate", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_extended_information_request( - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/getExtendedInformation", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_install_updates_request( - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/installUpdates", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_network_settings_request( - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/networkSettings/default", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_scan_for_updates_request( - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/scanForUpdates", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_security_settings_request( # pylint: disable=name-too-long - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/securitySettings/default/update", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_extended_information_request( # pylint: disable=name-too-long - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateExtendedInformation", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_update_summary_request( - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateSummary/default", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_upload_certificate_request( - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/uploadCertificate", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class DevicesOperations: # pylint: disable=too-many-public-methods - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`devices` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_subscription( - self, expand: Optional[str] = None, **kwargs: Any - ) -> ItemPaged["_models.DataBoxEdgeDevice"]: - """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=\\ :code:`` to populate the next page in the list. Default value is - None. - :type expand: str - :return: An iterator like instance of either DataBoxEdgeDevice or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DataBoxEdgeDeviceList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("DataBoxEdgeDeviceList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, expand: Optional[str] = None, **kwargs: Any - ) -> ItemPaged["_models.DataBoxEdgeDevice"]: - """Gets all the Data Box Edge/Data Box Gateway devices in a resource group. - - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param expand: Specify $expand=details to populate additional fields related to the resource or - Specify $skipToken=\\ :code:`` to populate the next page in the list. Default value is - None. - :type expand: str - :return: An iterator like instance of either DataBoxEdgeDevice or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DataBoxEdgeDeviceList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("DataBoxEdgeDeviceList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, device_name: str, resource_group_name: str, **kwargs: Any) -> _models.DataBoxEdgeDevice: - """Gets the properties of the Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: DataBoxEdgeDevice or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DataBoxEdgeDevice] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DataBoxEdgeDevice", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - device_name: str, - resource_group_name: str, - data_box_edge_device: Union[_models.DataBoxEdgeDevice, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(data_box_edge_device, (IOBase, bytes)): - _content = data_box_edge_device - else: - _json = self._serialize.body(data_box_edge_device, "DataBoxEdgeDevice") - - _request = build_create_or_update_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - device_name: str, - resource_group_name: str, - data_box_edge_device: _models.DataBoxEdgeDevice, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.DataBoxEdgeDevice]: - """Creates or updates a Data Box Edge/Data Box Gateway resource. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param data_box_edge_device: The resource object. Required. - :type data_box_edge_device: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either DataBoxEdgeDevice or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - device_name: str, - resource_group_name: str, - data_box_edge_device: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.DataBoxEdgeDevice]: - """Creates or updates a Data Box Edge/Data Box Gateway resource. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param data_box_edge_device: The resource object. Required. - :type data_box_edge_device: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either DataBoxEdgeDevice or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - device_name: str, - resource_group_name: str, - data_box_edge_device: Union[_models.DataBoxEdgeDevice, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.DataBoxEdgeDevice]: - """Creates or updates a Data Box Edge/Data Box Gateway resource. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param data_box_edge_device: The resource object. Is either a DataBoxEdgeDevice type or a - IO[bytes] type. Required. - :type data_box_edge_device: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice or IO[bytes] - :return: An instance of LROPoller that returns either DataBoxEdgeDevice or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DataBoxEdgeDevice] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - device_name=device_name, - resource_group_name=resource_group_name, - data_box_edge_device=data_box_edge_device, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DataBoxEdgeDevice", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.DataBoxEdgeDevice].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.DataBoxEdgeDevice]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, device_name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, device_name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes the Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - device_name=device_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @overload - def update( - self, - device_name: str, - resource_group_name: str, - parameters: _models.DataBoxEdgeDevicePatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DataBoxEdgeDevice: - """Modifies a Data Box Edge/Data Box Gateway resource. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The resource parameters. Required. - :type parameters: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DataBoxEdgeDevice or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - device_name: str, - resource_group_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DataBoxEdgeDevice: - """Modifies a Data Box Edge/Data Box Gateway resource. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The resource parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DataBoxEdgeDevice or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - device_name: str, - resource_group_name: str, - parameters: Union[_models.DataBoxEdgeDevicePatch, IO[bytes]], - **kwargs: Any - ) -> _models.DataBoxEdgeDevice: - """Modifies a Data Box Edge/Data Box Gateway resource. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The resource parameters. Is either a DataBoxEdgeDevicePatch type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePatch or IO[bytes] - :return: DataBoxEdgeDevice or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DataBoxEdgeDevice] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DataBoxEdgeDevicePatch") - - _request = build_update_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DataBoxEdgeDevice", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _download_updates_initial(self, device_name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_download_updates_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_download_updates(self, device_name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: - """Downloads the updates on a Data Box Edge/Data Box Gateway device. - - Downloads the updates on a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._download_updates_initial( - device_name=device_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def generate_certificate( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> _models.GenerateCertResponse: - """Generates certificate for activation key. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: GenerateCertResponse or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.GenerateCertResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GenerateCertResponse] = kwargs.pop("cls", None) - - _request = build_generate_certificate_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GenerateCertResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_extended_information( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> _models.DataBoxEdgeDeviceExtendedInfo: - """Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: DataBoxEdgeDeviceExtendedInfo or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DataBoxEdgeDeviceExtendedInfo] = kwargs.pop("cls", None) - - _request = build_get_extended_information_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DataBoxEdgeDeviceExtendedInfo", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _install_updates_initial(self, device_name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_install_updates_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_install_updates(self, device_name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: - """Installs the updates on the Data Box Edge/Data Box Gateway device. - - Installs the updates on the Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._install_updates_initial( - device_name=device_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def get_network_settings( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> _models.NetworkSettings: - """Gets the network settings of the specified Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: NetworkSettings or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.NetworkSettings - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NetworkSettings] = kwargs.pop("cls", None) - - _request = build_get_network_settings_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("NetworkSettings", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _scan_for_updates_initial(self, device_name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_scan_for_updates_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_scan_for_updates(self, device_name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: - """Scans for updates on a Data Box Edge/Data Box Gateway device. - - Scans for updates on a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._scan_for_updates_initial( - device_name=device_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _create_or_update_security_settings_initial( # pylint: disable=name-too-long - self, - device_name: str, - resource_group_name: str, - security_settings: Union[_models.SecuritySettings, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(security_settings, (IOBase, bytes)): - _content = security_settings - else: - _json = self._serialize.body(security_settings, "SecuritySettings") - - _request = build_create_or_update_security_settings_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update_security_settings( - self, - device_name: str, - resource_group_name: str, - security_settings: _models.SecuritySettings, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Updates the security settings on a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param security_settings: The security settings. Required. - :type security_settings: ~azure.mgmt.databoxedge.models.SecuritySettings - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update_security_settings( - self, - device_name: str, - resource_group_name: str, - security_settings: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Updates the security settings on a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param security_settings: The security settings. Required. - :type security_settings: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update_security_settings( - self, - device_name: str, - resource_group_name: str, - security_settings: Union[_models.SecuritySettings, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Updates the security settings on a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param security_settings: The security settings. Is either a SecuritySettings type or a - IO[bytes] type. Required. - :type security_settings: ~azure.mgmt.databoxedge.models.SecuritySettings or IO[bytes] - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_security_settings_initial( - device_name=device_name, - resource_group_name=resource_group_name, - security_settings=security_settings, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @overload - def update_extended_information( - self, - device_name: str, - resource_group_name: str, - parameters: _models.DataBoxEdgeDeviceExtendedInfoPatch, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DataBoxEdgeDeviceExtendedInfo: - """Gets additional information for the specified Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The patch object. Required. - :type parameters: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DataBoxEdgeDeviceExtendedInfo or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update_extended_information( - self, - device_name: str, - resource_group_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DataBoxEdgeDeviceExtendedInfo: - """Gets additional information for the specified Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The patch object. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DataBoxEdgeDeviceExtendedInfo or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update_extended_information( - self, - device_name: str, - resource_group_name: str, - parameters: Union[_models.DataBoxEdgeDeviceExtendedInfoPatch, IO[bytes]], - **kwargs: Any - ) -> _models.DataBoxEdgeDeviceExtendedInfo: - """Gets additional information for the specified Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The patch object. Is either a DataBoxEdgeDeviceExtendedInfoPatch type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch or - IO[bytes] - :return: DataBoxEdgeDeviceExtendedInfo or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DataBoxEdgeDeviceExtendedInfo] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DataBoxEdgeDeviceExtendedInfoPatch") - - _request = build_update_extended_information_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DataBoxEdgeDeviceExtendedInfo", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_update_summary(self, device_name: str, resource_group_name: str, **kwargs: Any) -> _models.UpdateSummary: - """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. - - 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. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: UpdateSummary or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.UpdateSummary - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UpdateSummary] = kwargs.pop("cls", None) - - _request = build_get_update_summary_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("UpdateSummary", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def upload_certificate( - self, - device_name: str, - resource_group_name: str, - parameters: _models.UploadCertificateRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.UploadCertificateResponse: - """Uploads registration certificate for the device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The upload certificate request. Required. - :type parameters: ~azure.mgmt.databoxedge.models.UploadCertificateRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: UploadCertificateResponse or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def upload_certificate( - self, - device_name: str, - resource_group_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.UploadCertificateResponse: - """Uploads registration certificate for the device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The upload certificate request. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: UploadCertificateResponse or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def upload_certificate( - self, - device_name: str, - resource_group_name: str, - parameters: Union[_models.UploadCertificateRequest, IO[bytes]], - **kwargs: Any - ) -> _models.UploadCertificateResponse: - """Uploads registration certificate for the device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param parameters: The upload certificate request. Is either a UploadCertificateRequest type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.databoxedge.models.UploadCertificateRequest or IO[bytes] - :return: UploadCertificateResponse or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.UploadCertificateResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "UploadCertificateRequest") - - _request = build_upload_certificate_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("UploadCertificateResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_jobs_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_jobs_operations.py deleted file mode 100644 index 43113d431969..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_jobs_operations.py +++ /dev/null @@ -1,148 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/jobs/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class JobsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`jobs` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Job: - """Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. - - Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The job name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Job or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Job - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Job] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Job", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_monitoring_config_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_monitoring_config_operations.py deleted file mode 100644 index 661c1288376d..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_monitoring_config_operations.py +++ /dev/null @@ -1,667 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request( - device_name: str, role_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "roleName": _SERIALIZER.url("role_name", role_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - device_name: str, role_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "roleName": _SERIALIZER.url("role_name", role_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - device_name: str, role_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "roleName": _SERIALIZER.url("role_name", role_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - device_name: str, role_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "roleName": _SERIALIZER.url("role_name", role_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class MonitoringConfigOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`monitoring_config` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.MonitoringMetricConfiguration"]: - """Lists metric configurations in a role. - - Lists metric configurations in a role. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either MonitoringMetricConfiguration or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.MonitoringMetricConfigurationList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - device_name=device_name, - role_name=role_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("MonitoringMetricConfigurationList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any - ) -> _models.MonitoringMetricConfiguration: - """Gets a metric configuration of a role. - - Gets a metric configuration of a role. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: MonitoringMetricConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.MonitoringMetricConfiguration] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - role_name=role_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("MonitoringMetricConfiguration", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - device_name: str, - role_name: str, - resource_group_name: str, - monitoring_metric_configuration: Union[_models.MonitoringMetricConfiguration, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(monitoring_metric_configuration, (IOBase, bytes)): - _content = monitoring_metric_configuration - else: - _json = self._serialize.body(monitoring_metric_configuration, "MonitoringMetricConfiguration") - - _request = build_create_or_update_request( - device_name=device_name, - role_name=role_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - device_name: str, - role_name: str, - resource_group_name: str, - monitoring_metric_configuration: _models.MonitoringMetricConfiguration, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.MonitoringMetricConfiguration]: - """Creates a new metric configuration or updates an existing one for a role. - - Creates a new metric configuration or updates an existing one for a role. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param monitoring_metric_configuration: The metric configuration. Required. - :type monitoring_metric_configuration: - ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either MonitoringMetricConfiguration or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - device_name: str, - role_name: str, - resource_group_name: str, - monitoring_metric_configuration: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.MonitoringMetricConfiguration]: - """Creates a new metric configuration or updates an existing one for a role. - - Creates a new metric configuration or updates an existing one for a role. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param monitoring_metric_configuration: The metric configuration. Required. - :type monitoring_metric_configuration: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either MonitoringMetricConfiguration or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - device_name: str, - role_name: str, - resource_group_name: str, - monitoring_metric_configuration: Union[_models.MonitoringMetricConfiguration, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.MonitoringMetricConfiguration]: - """Creates a new metric configuration or updates an existing one for a role. - - Creates a new metric configuration or updates an existing one for a role. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param monitoring_metric_configuration: The metric configuration. Is either a - MonitoringMetricConfiguration type or a IO[bytes] type. Required. - :type monitoring_metric_configuration: - ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration or IO[bytes] - :return: An instance of LROPoller that returns either MonitoringMetricConfiguration or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.MonitoringMetricConfiguration] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - device_name=device_name, - role_name=role_name, - resource_group_name=resource_group_name, - monitoring_metric_configuration=monitoring_metric_configuration, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("MonitoringMetricConfiguration", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.MonitoringMetricConfiguration].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.MonitoringMetricConfiguration]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - role_name=role_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any - ) -> LROPoller[None]: - """deletes a new metric configuration for a role. - - deletes a new metric configuration for a role. - - :param device_name: The device name. Required. - :type device_name: str - :param role_name: The role name. Required. - :type role_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - device_name=device_name, - role_name=role_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_nodes_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_nodes_operations.py deleted file mode 100644 index 2bdbab0fb923..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_nodes_operations.py +++ /dev/null @@ -1,172 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_data_box_edge_device_request( # pylint: disable=name-too-long - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/nodes", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class NodesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`nodes` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.Node"]: - """Gets all the nodes currently configured under this Data Box Edge device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either Node or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Node] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NodeList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NodeList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_operations.py index e1e7ebe669d4..a7fee317cc17 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_operations.py @@ -1,12 +1,15 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar +from io import IOBase +import json +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core import PipelineClient @@ -16,56 +19,11734 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models from .._configuration import DataBoxEdgeManagementClientConfiguration +from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +JSON = MutableMapping[str, Any] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_request(**kwargs: Any) -> HttpRequest: +def build_operations_status_get_request( + device_name: str, name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/operationsStatus/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_devices_get_network_settings_request( # pylint: disable=name-too-long + device_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/networkSettings/default" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_devices_get_request(device_name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_devices_create_or_update_request( + resource_group_name: str, device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_devices_update_request(device_name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) + + +def build_devices_delete_request(device_name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="DELETE", url=_url, **kwargs) + + +def build_devices_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, *, expand: Optional[str] = None, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if expand is not None: + _params["$expand"] = _SERIALIZER.query("expand", expand, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_devices_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, *, expand: Optional[str] = None, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if expand is not None: + _params["$expand"] = _SERIALIZER.query("expand", expand, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_devices_download_updates_request(device_name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/downloadUpdates" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="POST", url=_url, **kwargs) + + +def build_devices_generate_certificate_request( # pylint: disable=name-too-long + device_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/generateCertificate" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) + + +def build_devices_get_extended_information_request( # pylint: disable=name-too-long + device_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/getExtendedInformation" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) + + +def build_devices_install_updates_request(device_name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/installUpdates" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="POST", url=_url, **kwargs) + + +def build_devices_scan_for_updates_request(device_name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/scanForUpdates" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="POST", url=_url, **kwargs) + + +def build_devices_create_or_update_security_settings_request( # pylint: disable=name-too-long + device_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/securitySettings/default/update" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) + + +def build_devices_update_extended_information_request( # pylint: disable=name-too-long + device_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateExtendedInformation" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) + + +def build_devices_upload_certificate_request(device_name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/uploadCertificate" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) + + +def build_devices_get_update_summary_request(device_name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateSummary/default" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.DataBoxEdge/operations" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_alerts_get_request(device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_alerts_list_by_data_box_edge_device_request( # pylint: disable=name-too-long + device_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_bandwidth_schedules_get_request( + device_name: str, name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_bandwidth_schedules_create_or_update_request( # pylint: disable=name-too-long + device_name: str, name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_bandwidth_schedules_delete_request( + device_name: str, name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="DELETE", url=_url, **kwargs) + + +def build_bandwidth_schedules_list_by_data_box_edge_device_request( # pylint: disable=name-too-long + device_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_diagnostic_settings_get_diagnostic_proactive_log_collection_settings_request( # pylint: disable=name-too-long + resource_group_name: str, device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/diagnosticProactiveLogCollectionSettings/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_diagnostic_settings_update_diagnostic_proactive_log_collection_settings_request( # pylint: disable=name-too-long + resource_group_name: str, device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/diagnosticProactiveLogCollectionSettings/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_diagnostic_settings_get_diagnostic_remote_support_settings_request( # pylint: disable=name-too-long + resource_group_name: str, device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/diagnosticRemoteSupportSettings/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_diagnostic_settings_update_diagnostic_remote_support_settings_request( # pylint: disable=name-too-long + resource_group_name: str, device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/diagnosticRemoteSupportSettings/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_jobs_get_request(device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/jobs/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_orders_get_request(device_name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_orders_create_or_update_request(device_name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_orders_delete_request(device_name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="DELETE", url=_url, **kwargs) + + +def build_orders_list_by_data_box_edge_device_request( # pylint: disable=name-too-long + device_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_orders_list_dc_access_code_request(device_name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default/listDCAccessCode" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) + + +def build_roles_get_request(device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_roles_create_or_update_request( + device_name: str, name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_roles_delete_request(device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="DELETE", url=_url, **kwargs) + + +def build_roles_list_by_data_box_edge_device_request( # pylint: disable=name-too-long + device_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_addons_get_request( + device_name: str, role_name: str, addon_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "roleName": _SERIALIZER.url("role_name", role_name, "str"), + "addonName": _SERIALIZER.url("addon_name", addon_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_addons_create_or_update_request( + device_name: str, role_name: str, addon_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "roleName": _SERIALIZER.url("role_name", role_name, "str"), + "addonName": _SERIALIZER.url("addon_name", addon_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_addons_delete_request( + device_name: str, role_name: str, addon_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "roleName": _SERIALIZER.url("role_name", role_name, "str"), + "addonName": _SERIALIZER.url("addon_name", addon_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="DELETE", url=_url, **kwargs) + + +def build_addons_list_by_role_request( + device_name: str, role_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "roleName": _SERIALIZER.url("role_name", role_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_shares_get_request(device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_shares_create_or_update_request( + device_name: str, name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_shares_delete_request(device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="DELETE", url=_url, **kwargs) + + +def build_shares_list_by_data_box_edge_device_request( # pylint: disable=name-too-long + device_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_shares_refresh_request(device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}/refresh" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="POST", url=_url, **kwargs) + + +def build_storage_account_credentials_get_request( # pylint: disable=name-too-long + device_name: str, name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_storage_account_credentials_create_or_update_request( # pylint: disable=name-too-long + device_name: str, name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_storage_account_credentials_delete_request( # pylint: disable=name-too-long + device_name: str, name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="DELETE", url=_url, **kwargs) + + +def build_storage_account_credentials_list_by_data_box_edge_device_request( # pylint: disable=name-too-long + device_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_storage_accounts_get_request( + device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "storageAccountName": _SERIALIZER.url("storage_account_name", storage_account_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_storage_accounts_create_or_update_request( # pylint: disable=name-too-long + device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "storageAccountName": _SERIALIZER.url("storage_account_name", storage_account_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_storage_accounts_delete_request( + device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "storageAccountName": _SERIALIZER.url("storage_account_name", storage_account_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="DELETE", url=_url, **kwargs) + + +def build_storage_accounts_list_by_data_box_edge_device_request( # pylint: disable=name-too-long + device_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_containers_get_request( + device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "storageAccountName": _SERIALIZER.url("storage_account_name", storage_account_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_containers_create_or_update_request( # pylint: disable=name-too-long + device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "storageAccountName": _SERIALIZER.url("storage_account_name", storage_account_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_containers_delete_request( + device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "storageAccountName": _SERIALIZER.url("storage_account_name", storage_account_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="DELETE", url=_url, **kwargs) + + +def build_containers_list_by_storage_account_request( # pylint: disable=name-too-long + device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "storageAccountName": _SERIALIZER.url("storage_account_name", storage_account_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_containers_refresh_request( + device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}/refresh" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "storageAccountName": _SERIALIZER.url("storage_account_name", storage_account_name, "str"), + "containerName": _SERIALIZER.url("container_name", container_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="POST", url=_url, **kwargs) + + +def build_triggers_get_request(device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_triggers_create_or_update_request( + device_name: str, name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_triggers_delete_request(device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="DELETE", url=_url, **kwargs) + + +def build_triggers_list_by_data_box_edge_device_request( # pylint: disable=name-too-long + device_name: str, resource_group_name: str, *, filter: Optional[str] = None, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_users_get_request(device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_users_create_or_update_request( + device_name: str, name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_users_delete_request(device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="DELETE", url=_url, **kwargs) + + +def build_users_list_by_data_box_edge_device_request( # pylint: disable=name-too-long + device_name: str, resource_group_name: str, *, filter: Optional[str] = None, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_device_capacity_check_check_resource_creation_feasibility_request( # pylint: disable=name-too-long + resource_group_name: str, + device_name: str, + subscription_id: str, + *, + capacity_name: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/deviceCapacityCheck" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if capacity_name is not None: + _params["capacityName"] = _SERIALIZER.query("capacity_name", capacity_name, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_nodes_list_by_data_box_edge_device_request( # pylint: disable=name-too-long + device_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/nodes" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_support_packages_trigger_support_package_request( # pylint: disable=name-too-long + resource_group_name: str, device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggerSupportPackage" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_device_capacity_info_get_device_capacity_info_request( # pylint: disable=name-too-long + resource_group_name: str, device_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/deviceCapacityInfo/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_monitoring_config_get_request( + device_name: str, role_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "roleName": _SERIALIZER.url("role_name", role_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_monitoring_config_create_or_update_request( # pylint: disable=name-too-long + device_name: str, role_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "roleName": _SERIALIZER.url("role_name", role_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_monitoring_config_delete_request( + device_name: str, role_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "roleName": _SERIALIZER.url("role_name", role_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + return HttpRequest(method="DELETE", url=_url, **kwargs) + + +def build_monitoring_config_list_request( + device_name: str, role_name: str, resource_group_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig" + path_format_arguments = { + "deviceName": _SERIALIZER.url("device_name", device_name, "str"), + "roleName": _SERIALIZER.url("role_name", role_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_available_skus_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/availableSkus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class OperationsStatusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`operations_status` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Job: + """Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. + + Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The job name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Job. The Job is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Job + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Job] = kwargs.pop("cls", None) + + _request = build_operations_status_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Job, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class DevicesOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`devices` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get_network_settings( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> _models.NetworkSettings: + """Gets the network settings of the specified Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: NetworkSettings. The NetworkSettings is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.NetworkSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.NetworkSettings] = kwargs.pop("cls", None) + + _request = build_devices_get_network_settings_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.NetworkSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get(self, device_name: str, resource_group_name: str, **kwargs: Any) -> _models.DataBoxEdgeDevice: + """Gets the properties of the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DataBoxEdgeDevice] = kwargs.pop("cls", None) + + _request = build_devices_get_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DataBoxEdgeDevice, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + device_name: str, + data_box_edge_device: _models.DataBoxEdgeDevice, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDevice: + """Creates or updates a Data Box Edge/Data Box Gateway resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param data_box_edge_device: The resource object. Required. + :type data_box_edge_device: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + device_name: str, + data_box_edge_device: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDevice: + """Creates or updates a Data Box Edge/Data Box Gateway resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param data_box_edge_device: The resource object. Required. + :type data_box_edge_device: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + device_name: str, + data_box_edge_device: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDevice: + """Creates or updates a Data Box Edge/Data Box Gateway resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param data_box_edge_device: The resource object. Required. + :type data_box_edge_device: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + device_name: str, + data_box_edge_device: Union[_models.DataBoxEdgeDevice, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.DataBoxEdgeDevice: + """Creates or updates a Data Box Edge/Data Box Gateway resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param data_box_edge_device: The resource object. Is one of the following types: + DataBoxEdgeDevice, JSON, IO[bytes] Required. + :type data_box_edge_device: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice or JSON or + IO[bytes] + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DataBoxEdgeDevice] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(data_box_edge_device, (IOBase, bytes)): + _content = data_box_edge_device + else: + _content = json.dumps(data_box_edge_device, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_devices_create_or_update_request( + resource_group_name=resource_group_name, + device_name=device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DataBoxEdgeDevice, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def update( + self, + device_name: str, + resource_group_name: str, + parameters: _models.DataBoxEdgeDevicePatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDevice: + """Modifies a Data Box Edge/Data Box Gateway resource. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The resource parameters. Required. + :type parameters: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + device_name: str, + resource_group_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDevice: + """Modifies a Data Box Edge/Data Box Gateway resource. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The resource parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + device_name: str, + resource_group_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDevice: + """Modifies a Data Box Edge/Data Box Gateway resource. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The resource parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + device_name: str, + resource_group_name: str, + parameters: Union[_models.DataBoxEdgeDevicePatch, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.DataBoxEdgeDevice: + """Modifies a Data Box Edge/Data Box Gateway resource. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The resource parameters. Is one of the following types: + DataBoxEdgeDevicePatch, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevicePatch or JSON or IO[bytes] + :return: DataBoxEdgeDevice. The DataBoxEdgeDevice is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDevice + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DataBoxEdgeDevice] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_devices_update_request( + device_name=device_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DataBoxEdgeDevice, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _delete_initial(self, device_name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_devices_delete_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, device_name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + device_name=device_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, *, expand: Optional[str] = None, **kwargs: Any + ) -> ItemPaged["_models.DataBoxEdgeDevice"]: + """Gets all the Data Box Edge/Data Box Gateway devices in a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword expand: Specify $expand=details to populate additional fields related to the resource + or Specify $skipToken= to populate the next page in the list. Default value is None. + :paramtype expand: str + :return: An iterator like instance of DataBoxEdgeDevice + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DataBoxEdgeDevice]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_devices_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + expand=expand, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.DataBoxEdgeDevice], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription( + self, *, expand: Optional[str] = None, **kwargs: Any + ) -> ItemPaged["_models.DataBoxEdgeDevice"]: + """Gets all the Data Box Edge/Data Box Gateway devices in a subscription. + + :keyword expand: Specify $expand=details to populate additional fields related to the resource + or Specify $skipToken= to populate the next page in the list. Default value is None. + :paramtype expand: str + :return: An iterator like instance of DataBoxEdgeDevice + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.DataBoxEdgeDevice] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DataBoxEdgeDevice]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_devices_list_by_subscription_request( + subscription_id=self._config.subscription_id, + expand=expand, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.DataBoxEdgeDevice], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _download_updates_initial(self, device_name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_devices_download_updates_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_download_updates(self, device_name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: + """Downloads the updates on a Data Box Edge/Data Box Gateway device. + + Downloads the updates on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._download_updates_initial( + device_name=device_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def generate_certificate( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> _models.GenerateCertResponse: + """Generates certificate for activation key. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: GenerateCertResponse. The GenerateCertResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.GenerateCertResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GenerateCertResponse] = kwargs.pop("cls", None) + + _request = build_devices_generate_certificate_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.GenerateCertResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_extended_information( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> _models.DataBoxEdgeDeviceExtendedInfo: + """Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: DataBoxEdgeDeviceExtendedInfo. The DataBoxEdgeDeviceExtendedInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DataBoxEdgeDeviceExtendedInfo] = kwargs.pop("cls", None) + + _request = build_devices_get_extended_information_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DataBoxEdgeDeviceExtendedInfo, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _install_updates_initial(self, device_name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_devices_install_updates_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_install_updates(self, device_name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: + """Installs the updates on the Data Box Edge/Data Box Gateway device. + + Installs the updates on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._install_updates_initial( + device_name=device_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _scan_for_updates_initial(self, device_name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_devices_scan_for_updates_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_scan_for_updates(self, device_name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: + """Scans for updates on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._scan_for_updates_initial( + device_name=device_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _create_or_update_security_settings_initial( # pylint: disable=name-too-long + self, + device_name: str, + resource_group_name: str, + security_settings: Union[_models.SecuritySettings, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(security_settings, (IOBase, bytes)): + _content = security_settings + else: + _content = json.dumps(security_settings, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_devices_create_or_update_security_settings_request( + device_name=device_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update_security_settings( + self, + device_name: str, + resource_group_name: str, + security_settings: _models.SecuritySettings, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Updates the security settings on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param security_settings: The security settings. Required. + :type security_settings: ~azure.mgmt.databoxedge.models.SecuritySettings + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update_security_settings( + self, + device_name: str, + resource_group_name: str, + security_settings: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Updates the security settings on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param security_settings: The security settings. Required. + :type security_settings: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update_security_settings( + self, + device_name: str, + resource_group_name: str, + security_settings: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Updates the security settings on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param security_settings: The security settings. Required. + :type security_settings: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update_security_settings( + self, + device_name: str, + resource_group_name: str, + security_settings: Union[_models.SecuritySettings, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Updates the security settings on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param security_settings: The security settings. Is one of the following types: + SecuritySettings, JSON, IO[bytes] Required. + :type security_settings: ~azure.mgmt.databoxedge.models.SecuritySettings or JSON or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_security_settings_initial( + device_name=device_name, + resource_group_name=resource_group_name, + security_settings=security_settings, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @overload + def update_extended_information( + self, + device_name: str, + resource_group_name: str, + parameters: _models.DataBoxEdgeDeviceExtendedInfoPatch, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDeviceExtendedInfo: + """Gets additional information for the specified Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The patch object. Required. + :type parameters: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDeviceExtendedInfo. The DataBoxEdgeDeviceExtendedInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update_extended_information( + self, + device_name: str, + resource_group_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDeviceExtendedInfo: + """Gets additional information for the specified Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The patch object. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDeviceExtendedInfo. The DataBoxEdgeDeviceExtendedInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update_extended_information( + self, + device_name: str, + resource_group_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DataBoxEdgeDeviceExtendedInfo: + """Gets additional information for the specified Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The patch object. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DataBoxEdgeDeviceExtendedInfo. The DataBoxEdgeDeviceExtendedInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update_extended_information( + self, + device_name: str, + resource_group_name: str, + parameters: Union[_models.DataBoxEdgeDeviceExtendedInfoPatch, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.DataBoxEdgeDeviceExtendedInfo: + """Gets additional information for the specified Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The patch object. Is one of the following types: + DataBoxEdgeDeviceExtendedInfoPatch, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfoPatch or JSON or + IO[bytes] + :return: DataBoxEdgeDeviceExtendedInfo. The DataBoxEdgeDeviceExtendedInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DataBoxEdgeDeviceExtendedInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DataBoxEdgeDeviceExtendedInfo] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_devices_update_extended_information_request( + device_name=device_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DataBoxEdgeDeviceExtendedInfo, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def upload_certificate( + self, + device_name: str, + resource_group_name: str, + parameters: _models.UploadCertificateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UploadCertificateResponse: + """Uploads registration certificate for the device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The upload certificate request. Required. + :type parameters: ~azure.mgmt.databoxedge.models.UploadCertificateRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: UploadCertificateResponse. The UploadCertificateResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def upload_certificate( + self, + device_name: str, + resource_group_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UploadCertificateResponse: + """Uploads registration certificate for the device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The upload certificate request. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: UploadCertificateResponse. The UploadCertificateResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def upload_certificate( + self, + device_name: str, + resource_group_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.UploadCertificateResponse: + """Uploads registration certificate for the device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The upload certificate request. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: UploadCertificateResponse. The UploadCertificateResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def upload_certificate( + self, + device_name: str, + resource_group_name: str, + parameters: Union[_models.UploadCertificateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.UploadCertificateResponse: + """Uploads registration certificate for the device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The upload certificate request. Is one of the following types: + UploadCertificateRequest, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.databoxedge.models.UploadCertificateRequest or JSON or IO[bytes] + :return: UploadCertificateResponse. The UploadCertificateResponse is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.UploadCertificateResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.UploadCertificateResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_devices_upload_certificate_request( + device_name=device_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.UploadCertificateResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_update_summary(self, device_name: str, resource_group_name: str, **kwargs: Any) -> _models.UpdateSummary: + """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. + + 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. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: UpdateSummary. The UpdateSummary is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.UpdateSummary + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.UpdateSummary] = kwargs.pop("cls", None) + + _request = build_devices_get_update_summary_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.UpdateSummary, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class Operations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`operations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: + """List all the supported operations. + + List the operations for the provider. + + :return: An iterator like instance of Operation + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Operation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_operations_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class AlertsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`alerts` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Alert: + """Gets an alert by name. + + Gets an alert by name. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The alert name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Alert. The Alert is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Alert + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Alert] = kwargs.pop("cls", None) + + _request = build_alerts_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Alert, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.Alert"]: + """Gets all the alerts for a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Alert + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Alert] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Alert]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_alerts_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Alert], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class BandwidthSchedulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`bandwidth_schedules` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.BandwidthSchedule: + """Gets the properties of the specified bandwidth schedule. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The bandwidth schedule name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: BandwidthSchedule. The BandwidthSchedule is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.BandwidthSchedule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.BandwidthSchedule] = kwargs.pop("cls", None) + + _request = build_bandwidth_schedules_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.BandwidthSchedule, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + device_name: str, + name: str, + resource_group_name: str, + parameters: Union[_models.BandwidthSchedule, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_bandwidth_schedules_create_or_update_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + parameters: _models.BandwidthSchedule, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BandwidthSchedule]: + """Creates or updates a bandwidth schedule. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The bandwidth schedule name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The bandwidth schedule to be added or updated. Required. + :type parameters: ~azure.mgmt.databoxedge.models.BandwidthSchedule + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BandwidthSchedule. The BandwidthSchedule is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BandwidthSchedule]: + """Creates or updates a bandwidth schedule. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The bandwidth schedule name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The bandwidth schedule to be added or updated. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BandwidthSchedule. The BandwidthSchedule is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.BandwidthSchedule]: + """Creates or updates a bandwidth schedule. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The bandwidth schedule name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The bandwidth schedule to be added or updated. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns BandwidthSchedule. The BandwidthSchedule is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + parameters: Union[_models.BandwidthSchedule, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.BandwidthSchedule]: + """Creates or updates a bandwidth schedule. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The bandwidth schedule name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param parameters: The bandwidth schedule to be added or updated. Is one of the following + types: BandwidthSchedule, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.databoxedge.models.BandwidthSchedule or JSON or IO[bytes] + :return: An instance of LROPoller that returns BandwidthSchedule. The BandwidthSchedule is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.BandwidthSchedule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.BandwidthSchedule] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.BandwidthSchedule, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.BandwidthSchedule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.BandwidthSchedule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_bandwidth_schedules_delete_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes the specified bandwidth schedule. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The bandwidth schedule name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.BandwidthSchedule"]: + """Gets all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of BandwidthSchedule + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.BandwidthSchedule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.BandwidthSchedule]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_bandwidth_schedules_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.BandwidthSchedule], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class DiagnosticSettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`diagnostic_settings` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get_diagnostic_proactive_log_collection_settings( # pylint: disable=name-too-long + self, resource_group_name: str, device_name: str, **kwargs: Any + ) -> _models.DiagnosticProactiveLogCollectionSettings: + """Gets the proactive log collection settings of the specified Data Box Edge/Data Box Gateway + device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :return: DiagnosticProactiveLogCollectionSettings. The DiagnosticProactiveLogCollectionSettings + is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DiagnosticProactiveLogCollectionSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DiagnosticProactiveLogCollectionSettings] = kwargs.pop("cls", None) + + _request = build_diagnostic_settings_get_diagnostic_proactive_log_collection_settings_request( + resource_group_name=resource_group_name, + device_name=device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DiagnosticProactiveLogCollectionSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _update_diagnostic_proactive_log_collection_settings_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + proactive_log_collection_settings: Union[_models.DiagnosticProactiveLogCollectionSettings, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(proactive_log_collection_settings, (IOBase, bytes)): + _content = proactive_log_collection_settings + else: + _content = json.dumps(proactive_log_collection_settings, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_diagnostic_settings_update_diagnostic_proactive_log_collection_settings_request( + resource_group_name=resource_group_name, + device_name=device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_diagnostic_proactive_log_collection_settings( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + proactive_log_collection_settings: _models.DiagnosticProactiveLogCollectionSettings, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DiagnosticProactiveLogCollectionSettings]: + """Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param proactive_log_collection_settings: The proactive log collection settings. Required. + :type proactive_log_collection_settings: + ~azure.mgmt.databoxedge.models.DiagnosticProactiveLogCollectionSettings + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DiagnosticProactiveLogCollectionSettings. The + DiagnosticProactiveLogCollectionSettings is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.DiagnosticProactiveLogCollectionSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_diagnostic_proactive_log_collection_settings( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + proactive_log_collection_settings: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DiagnosticProactiveLogCollectionSettings]: + """Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param proactive_log_collection_settings: The proactive log collection settings. Required. + :type proactive_log_collection_settings: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DiagnosticProactiveLogCollectionSettings. The + DiagnosticProactiveLogCollectionSettings is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.DiagnosticProactiveLogCollectionSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_diagnostic_proactive_log_collection_settings( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + proactive_log_collection_settings: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DiagnosticProactiveLogCollectionSettings]: + """Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param proactive_log_collection_settings: The proactive log collection settings. Required. + :type proactive_log_collection_settings: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DiagnosticProactiveLogCollectionSettings. The + DiagnosticProactiveLogCollectionSettings is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.DiagnosticProactiveLogCollectionSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update_diagnostic_proactive_log_collection_settings( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + proactive_log_collection_settings: Union[_models.DiagnosticProactiveLogCollectionSettings, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.DiagnosticProactiveLogCollectionSettings]: + """Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param proactive_log_collection_settings: The proactive log collection settings. Is one of the + following types: DiagnosticProactiveLogCollectionSettings, JSON, IO[bytes] Required. + :type proactive_log_collection_settings: + ~azure.mgmt.databoxedge.models.DiagnosticProactiveLogCollectionSettings or JSON or IO[bytes] + :return: An instance of LROPoller that returns DiagnosticProactiveLogCollectionSettings. The + DiagnosticProactiveLogCollectionSettings is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.DiagnosticProactiveLogCollectionSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticProactiveLogCollectionSettings] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_diagnostic_proactive_log_collection_settings_initial( + resource_group_name=resource_group_name, + device_name=device_name, + proactive_log_collection_settings=proactive_log_collection_settings, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.DiagnosticProactiveLogCollectionSettings, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.DiagnosticProactiveLogCollectionSettings].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.DiagnosticProactiveLogCollectionSettings]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def get_diagnostic_remote_support_settings( + self, resource_group_name: str, device_name: str, **kwargs: Any + ) -> _models.DiagnosticRemoteSupportSettings: + """Gets the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway + device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :return: DiagnosticRemoteSupportSettings. The DiagnosticRemoteSupportSettings is compatible + with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettings + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DiagnosticRemoteSupportSettings] = kwargs.pop("cls", None) + + _request = build_diagnostic_settings_get_diagnostic_remote_support_settings_request( + resource_group_name=resource_group_name, + device_name=device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DiagnosticRemoteSupportSettings, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _update_diagnostic_remote_support_settings_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + diagnostic_remote_support_settings: Union[_models.DiagnosticRemoteSupportSettings, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(diagnostic_remote_support_settings, (IOBase, bytes)): + _content = diagnostic_remote_support_settings + else: + _content = json.dumps(diagnostic_remote_support_settings, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_diagnostic_settings_update_diagnostic_remote_support_settings_request( + resource_group_name=resource_group_name, + device_name=device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_diagnostic_remote_support_settings( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + diagnostic_remote_support_settings: _models.DiagnosticRemoteSupportSettings, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DiagnosticRemoteSupportSettings]: + """Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param diagnostic_remote_support_settings: The diagnostic remote support settings. Required. + :type diagnostic_remote_support_settings: + ~azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettings + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DiagnosticRemoteSupportSettings. The + DiagnosticRemoteSupportSettings is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_diagnostic_remote_support_settings( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + diagnostic_remote_support_settings: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DiagnosticRemoteSupportSettings]: + """Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param diagnostic_remote_support_settings: The diagnostic remote support settings. Required. + :type diagnostic_remote_support_settings: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DiagnosticRemoteSupportSettings. The + DiagnosticRemoteSupportSettings is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_diagnostic_remote_support_settings( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + diagnostic_remote_support_settings: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DiagnosticRemoteSupportSettings]: + """Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param diagnostic_remote_support_settings: The diagnostic remote support settings. Required. + :type diagnostic_remote_support_settings: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DiagnosticRemoteSupportSettings. The + DiagnosticRemoteSupportSettings is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update_diagnostic_remote_support_settings( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + diagnostic_remote_support_settings: Union[_models.DiagnosticRemoteSupportSettings, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.DiagnosticRemoteSupportSettings]: + """Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param diagnostic_remote_support_settings: The diagnostic remote support settings. Is one of + the following types: DiagnosticRemoteSupportSettings, JSON, IO[bytes] Required. + :type diagnostic_remote_support_settings: + ~azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettings or JSON or IO[bytes] + :return: An instance of LROPoller that returns DiagnosticRemoteSupportSettings. The + DiagnosticRemoteSupportSettings is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.DiagnosticRemoteSupportSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DiagnosticRemoteSupportSettings] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_diagnostic_remote_support_settings_initial( + resource_group_name=resource_group_name, + device_name=device_name, + diagnostic_remote_support_settings=diagnostic_remote_support_settings, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.DiagnosticRemoteSupportSettings, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.DiagnosticRemoteSupportSettings].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.DiagnosticRemoteSupportSettings]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + +class JobsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`jobs` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Job: + """Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. + + Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The job name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Job. The Job is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Job + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Job] = kwargs.pop("cls", None) + + _request = build_jobs_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Job, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class OrdersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`orders` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, device_name: str, resource_group_name: str, **kwargs: Any) -> _models.Order: + """Gets a specific order by name. + + Gets a specific order by name. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Order. The Order is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Order + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Order] = kwargs.pop("cls", None) + + _request = build_orders_get_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Order, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, device_name: str, resource_group_name: str, order: Union[_models.Order, JSON, IO[bytes]], **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(order, (IOBase, bytes)): + _content = order + else: + _content = json.dumps(order, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_orders_create_or_update_request( + device_name=device_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + device_name: str, + resource_group_name: str, + order: _models.Order, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Order]: + """Creates or updates an order. + + Creates or updates an order. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param order: The order to be created or updated. Required. + :type order: ~azure.mgmt.databoxedge.models.Order + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Order. The Order is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Order] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + resource_group_name: str, + order: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Order]: + """Creates or updates an order. + + Creates or updates an order. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param order: The order to be created or updated. Required. + :type order: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Order. The Order is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Order] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + resource_group_name: str, + order: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Order]: + """Creates or updates an order. + + Creates or updates an order. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param order: The order to be created or updated. Required. + :type order: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Order. The Order is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Order] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, device_name: str, resource_group_name: str, order: Union[_models.Order, JSON, IO[bytes]], **kwargs: Any + ) -> LROPoller[_models.Order]: + """Creates or updates an order. + + Creates or updates an order. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param order: The order to be created or updated. Is one of the following types: Order, JSON, + IO[bytes] Required. + :type order: ~azure.mgmt.databoxedge.models.Order or JSON or IO[bytes] + :return: An instance of LROPoller that returns Order. The Order is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Order] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Order] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + device_name=device_name, + resource_group_name=resource_group_name, + order=order, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Order, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Order].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Order]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, device_name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_orders_delete_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, device_name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes the order related to the device. + + Deletes the order related to the device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + device_name=device_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.Order"]: + """Lists all the orders related to a Data Box Edge/Data Box Gateway device. + + Lists all the orders related to a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Order + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Order] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Order]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_orders_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Order], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_dc_access_code(self, device_name: str, resource_group_name: str, **kwargs: Any) -> _models.DCAccessCode: + """Gets the DCAccess Code. + + Gets the DCAccess Code. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: DCAccessCode. The DCAccessCode is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DCAccessCode + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DCAccessCode] = kwargs.pop("cls", None) + + _request = build_orders_list_dc_access_code_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DCAccessCode, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class RolesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`roles` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Role: + """Gets a specific role by name. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The role name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Role. The Role is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Role + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Role] = kwargs.pop("cls", None) + + _request = build_roles_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Role, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + device_name: str, + name: str, + resource_group_name: str, + role: Union[_models.Role, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(role, (IOBase, bytes)): + _content = role + else: + _content = json.dumps(role, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_roles_create_or_update_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + role: _models.Role, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Role]: + """Create or update a role. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The role name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param role: The role properties. Required. + :type role: ~azure.mgmt.databoxedge.models.Role + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Role. The Role is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Role] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + role: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Role]: + """Create or update a role. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The role name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param role: The role properties. Required. + :type role: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Role. The Role is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Role] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + role: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Role]: + """Create or update a role. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The role name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param role: The role properties. Required. + :type role: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Role. The Role is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Role] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + role: Union[_models.Role, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Role]: + """Create or update a role. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The role name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param role: The role properties. Is one of the following types: Role, JSON, IO[bytes] + Required. + :type role: ~azure.mgmt.databoxedge.models.Role or JSON or IO[bytes] + :return: An instance of LROPoller that returns Role. The Role is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Role] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Role] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + role=role, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Role, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Role].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Role]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_roles_delete_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes the role on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The role name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.Role"]: + """Lists all the roles configured in a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Role + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Role] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Role]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_roles_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Role], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class AddonsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`addons` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, device_name: str, role_name: str, addon_name: str, resource_group_name: str, **kwargs: Any + ) -> _models.Addon: + """Gets a specific addon by name. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param addon_name: The name of the addon. Required. + :type addon_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Addon. The Addon is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Addon + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Addon] = kwargs.pop("cls", None) + + _request = build_addons_get_request( + device_name=device_name, + role_name=role_name, + addon_name=addon_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Addon, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + device_name: str, + role_name: str, + addon_name: str, + resource_group_name: str, + addon: Union[_models.Addon, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(addon, (IOBase, bytes)): + _content = addon + else: + _content = json.dumps(addon, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_addons_create_or_update_request( + device_name=device_name, + role_name=role_name, + addon_name=addon_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + device_name: str, + role_name: str, + addon_name: str, + resource_group_name: str, + addon: _models.Addon, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Addon]: + """Create or update a addon. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param addon_name: The name of the addon. Required. + :type addon_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param addon: The addon properties. Required. + :type addon: ~azure.mgmt.databoxedge.models.Addon + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Addon. The Addon is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Addon] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + role_name: str, + addon_name: str, + resource_group_name: str, + addon: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Addon]: + """Create or update a addon. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param addon_name: The name of the addon. Required. + :type addon_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param addon: The addon properties. Required. + :type addon: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Addon. The Addon is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Addon] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + role_name: str, + addon_name: str, + resource_group_name: str, + addon: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Addon]: + """Create or update a addon. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param addon_name: The name of the addon. Required. + :type addon_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param addon: The addon properties. Required. + :type addon: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Addon. The Addon is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Addon] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + device_name: str, + role_name: str, + addon_name: str, + resource_group_name: str, + addon: Union[_models.Addon, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Addon]: + """Create or update a addon. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param addon_name: The name of the addon. Required. + :type addon_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param addon: The addon properties. Is one of the following types: Addon, JSON, IO[bytes] + Required. + :type addon: ~azure.mgmt.databoxedge.models.Addon or JSON or IO[bytes] + :return: An instance of LROPoller that returns Addon. The Addon is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Addon] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Addon] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + device_name=device_name, + role_name=role_name, + addon_name=addon_name, + resource_group_name=resource_group_name, + addon=addon, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Addon, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Addon].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Addon]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, device_name: str, role_name: str, addon_name: str, resource_group_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_addons_delete_request( + device_name=device_name, + role_name=role_name, + addon_name=addon_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, device_name: str, role_name: str, addon_name: str, resource_group_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes the addon on the device. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param addon_name: The name of the addon. Required. + :type addon_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + device_name=device_name, + role_name=role_name, + addon_name=addon_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_role( + self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.Addon"]: + """Lists all the addons configured in the role. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Addon + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Addon] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Addon]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_addons_list_by_role_request( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Addon], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class SharesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`shares` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Share: + """Gets a share by name. + + Gets a share by name. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The share name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Share. The Share is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Share + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Share] = kwargs.pop("cls", None) + + _request = build_shares_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Share, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + device_name: str, + name: str, + resource_group_name: str, + share: Union[_models.Share, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(share, (IOBase, bytes)): + _content = share + else: + _content = json.dumps(share, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_shares_create_or_update_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + share: _models.Share, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Share]: + """Creates a new share or updates an existing share on the device. + + Creates a new share or updates an existing share on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The share name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param share: The share properties. Required. + :type share: ~azure.mgmt.databoxedge.models.Share + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Share. The Share is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Share] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + share: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Share]: + """Creates a new share or updates an existing share on the device. + + Creates a new share or updates an existing share on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The share name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param share: The share properties. Required. + :type share: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Share. The Share is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Share] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + share: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Share]: + """Creates a new share or updates an existing share on the device. + + Creates a new share or updates an existing share on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The share name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param share: The share properties. Required. + :type share: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Share. The Share is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Share] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + share: Union[_models.Share, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Share]: + """Creates a new share or updates an existing share on the device. + + Creates a new share or updates an existing share on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The share name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param share: The share properties. Is one of the following types: Share, JSON, IO[bytes] + Required. + :type share: ~azure.mgmt.databoxedge.models.Share or JSON or IO[bytes] + :return: An instance of LROPoller that returns Share. The Share is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Share] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Share] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + share=share, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Share, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Share].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Share]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_shares_delete_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes the share on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The share name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.Share"]: + """Lists all the shares in a Data Box Edge/Data Box Gateway device. + + Lists all the shares in a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Share + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Share] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Share]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_shares_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Share], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _refresh_initial(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_shares_refresh_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_refresh(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: + """Refreshes the share metadata with the data from the cloud. + + Refreshes the share metadata with the data from the cloud. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The share name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._refresh_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class StorageAccountCredentialsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`storage_account_credentials` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, device_name: str, name: str, resource_group_name: str, **kwargs: Any + ) -> _models.StorageAccountCredential: + """Gets the properties of the specified storage account credential. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The storage account credential name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: StorageAccountCredential. The StorageAccountCredential is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.StorageAccountCredential + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.StorageAccountCredential] = kwargs.pop("cls", None) + + _request = build_storage_account_credentials_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.StorageAccountCredential, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + device_name: str, + name: str, + resource_group_name: str, + storage_account_credential: Union[_models.StorageAccountCredential, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(storage_account_credential, (IOBase, bytes)): + _content = storage_account_credential + else: + _content = json.dumps(storage_account_credential, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_storage_account_credentials_create_or_update_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + storage_account_credential: _models.StorageAccountCredential, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.StorageAccountCredential]: + """Creates or updates the storage account credential. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The storage account credential name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param storage_account_credential: The storage account credential. Required. + :type storage_account_credential: ~azure.mgmt.databoxedge.models.StorageAccountCredential + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns StorageAccountCredential. The + StorageAccountCredential is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + storage_account_credential: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.StorageAccountCredential]: + """Creates or updates the storage account credential. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The storage account credential name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param storage_account_credential: The storage account credential. Required. + :type storage_account_credential: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns StorageAccountCredential. The + StorageAccountCredential is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + storage_account_credential: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.StorageAccountCredential]: + """Creates or updates the storage account credential. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The storage account credential name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param storage_account_credential: The storage account credential. Required. + :type storage_account_credential: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns StorageAccountCredential. The + StorageAccountCredential is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + storage_account_credential: Union[_models.StorageAccountCredential, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.StorageAccountCredential]: + """Creates or updates the storage account credential. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The storage account credential name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param storage_account_credential: The storage account credential. Is one of the following + types: StorageAccountCredential, JSON, IO[bytes] Required. + :type storage_account_credential: ~azure.mgmt.databoxedge.models.StorageAccountCredential or + JSON or IO[bytes] + :return: An instance of LROPoller that returns StorageAccountCredential. The + StorageAccountCredential is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.StorageAccountCredential] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + storage_account_credential=storage_account_credential, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.StorageAccountCredential, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.StorageAccountCredential].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.StorageAccountCredential]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_storage_account_credentials_delete_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes the storage account credential. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The storage account credential name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.StorageAccountCredential"]: + """Gets all the storage account credentials in a Data Box Edge/Data Box Gateway device. + + Gets all the storage account credentials in a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of StorageAccountCredential + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.StorageAccountCredential] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.StorageAccountCredential]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_storage_account_credentials_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.StorageAccountCredential], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class StorageAccountsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`storage_accounts` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any + ) -> _models.StorageAccount: + """Gets a StorageAccount by name. + + Gets a StorageAccount by name. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: StorageAccount. The StorageAccount is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.StorageAccount + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.StorageAccount] = kwargs.pop("cls", None) + + _request = build_storage_accounts_get_request( + device_name=device_name, + storage_account_name=storage_account_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.StorageAccount, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + device_name: str, + storage_account_name: str, + resource_group_name: str, + storage_account: Union[_models.StorageAccount, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(storage_account, (IOBase, bytes)): + _content = storage_account + else: + _content = json.dumps(storage_account, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_storage_accounts_create_or_update_request( + device_name=device_name, + storage_account_name=storage_account_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + device_name: str, + storage_account_name: str, + resource_group_name: str, + storage_account: _models.StorageAccount, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.StorageAccount]: + """Creates a new StorageAccount or updates an existing StorageAccount on the device. + + Creates a new StorageAccount or updates an existing StorageAccount on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param storage_account: The StorageAccount properties. Required. + :type storage_account: ~azure.mgmt.databoxedge.models.StorageAccount + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns StorageAccount. The StorageAccount is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.StorageAccount] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + storage_account_name: str, + resource_group_name: str, + storage_account: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.StorageAccount]: + """Creates a new StorageAccount or updates an existing StorageAccount on the device. + + Creates a new StorageAccount or updates an existing StorageAccount on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param storage_account: The StorageAccount properties. Required. + :type storage_account: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns StorageAccount. The StorageAccount is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.StorageAccount] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + storage_account_name: str, + resource_group_name: str, + storage_account: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.StorageAccount]: + """Creates a new StorageAccount or updates an existing StorageAccount on the device. + + Creates a new StorageAccount or updates an existing StorageAccount on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param storage_account: The StorageAccount properties. Required. + :type storage_account: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns StorageAccount. The StorageAccount is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.StorageAccount] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + device_name: str, + storage_account_name: str, + resource_group_name: str, + storage_account: Union[_models.StorageAccount, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.StorageAccount]: + """Creates a new StorageAccount or updates an existing StorageAccount on the device. + + Creates a new StorageAccount or updates an existing StorageAccount on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param storage_account: The StorageAccount properties. Is one of the following types: + StorageAccount, JSON, IO[bytes] Required. + :type storage_account: ~azure.mgmt.databoxedge.models.StorageAccount or JSON or IO[bytes] + :return: An instance of LROPoller that returns StorageAccount. The StorageAccount is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.StorageAccount] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.StorageAccount] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + device_name=device_name, + storage_account_name=storage_account_name, + resource_group_name=resource_group_name, + storage_account=storage_account, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.StorageAccount, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.StorageAccount].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.StorageAccount]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_storage_accounts_delete_request( + device_name=device_name, + storage_account_name=storage_account_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes the StorageAccount on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + device_name=device_name, + storage_account_name=storage_account_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.StorageAccount"]: + """Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. + + Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of StorageAccount + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.StorageAccount] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.StorageAccount]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_storage_accounts_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.StorageAccount], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ContainersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`containers` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any + ) -> _models.Container: + """Gets a container by name. + + Gets a container by name. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param container_name: The container Name. Required. + :type container_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Container. The Container is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Container + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Container] = kwargs.pop("cls", None) + + _request = build_containers_get_request( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Container, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + device_name: str, + storage_account_name: str, + container_name: str, + resource_group_name: str, + container: Union[_models.Container, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(container, (IOBase, bytes)): + _content = container + else: + _content = json.dumps(container, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_containers_create_or_update_request( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + device_name: str, + storage_account_name: str, + container_name: str, + resource_group_name: str, + container: _models.Container, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Container]: + """Creates a new container or updates an existing container on the device. + + Creates a new container or updates an existing container on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param container_name: The container Name. Required. + :type container_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param container: The container properties. Required. + :type container: ~azure.mgmt.databoxedge.models.Container + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Container. The Container is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Container] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + storage_account_name: str, + container_name: str, + resource_group_name: str, + container: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Container]: + """Creates a new container or updates an existing container on the device. + + Creates a new container or updates an existing container on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param container_name: The container Name. Required. + :type container_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param container: The container properties. Required. + :type container: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Container. The Container is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Container] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + storage_account_name: str, + container_name: str, + resource_group_name: str, + container: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Container]: + """Creates a new container or updates an existing container on the device. + + Creates a new container or updates an existing container on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param container_name: The container Name. Required. + :type container_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param container: The container properties. Required. + :type container: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Container. The Container is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Container] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + device_name: str, + storage_account_name: str, + container_name: str, + resource_group_name: str, + container: Union[_models.Container, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Container]: + """Creates a new container or updates an existing container on the device. + + Creates a new container or updates an existing container on the device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param container_name: The container Name. Required. + :type container_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param container: The container properties. Is one of the following types: Container, JSON, + IO[bytes] Required. + :type container: ~azure.mgmt.databoxedge.models.Container or JSON or IO[bytes] + :return: An instance of LROPoller that returns Container. The Container is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Container] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Container] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_name, + container=container, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Container, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Container].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Container]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_containers_delete_request( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes the container on the Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param container_name: The container Name. Required. + :type container_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + 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, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_storage_account( + self, device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.Container"]: + """Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device. + + Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Container + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Container] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Container]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_containers_list_by_storage_account_request( + device_name=device_name, + storage_account_name=storage_account_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Container], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _refresh_initial( + self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_containers_refresh_request( + device_name=device_name, + storage_account_name=storage_account_name, + container_name=container_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_refresh( + self, device_name: str, storage_account_name: str, container_name: str, resource_group_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Refreshes the container metadata with the data from the cloud. + + Refreshes the container metadata with the data from the cloud. + + :param device_name: The device name. Required. + :type device_name: str + :param storage_account_name: The storage account name. Required. + :type storage_account_name: str + :param container_name: The container Name. Required. + :type container_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + 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, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class TriggersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`triggers` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Trigger: + """Get a specific trigger by name. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The trigger name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: Trigger. The Trigger is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.Trigger + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Trigger] = kwargs.pop("cls", None) + + _request = build_triggers_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.Trigger, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + device_name: str, + name: str, + resource_group_name: str, + trigger: Union[_models.Trigger, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(trigger, (IOBase, bytes)): + _content = trigger + else: + _content = json.dumps(trigger, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_triggers_create_or_update_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + trigger: _models.Trigger, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Trigger]: + """Creates or updates a trigger. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The trigger name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param trigger: The trigger. Required. + :type trigger: ~azure.mgmt.databoxedge.models.Trigger + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Trigger. The Trigger is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Trigger] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + trigger: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Trigger]: + """Creates or updates a trigger. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The trigger name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param trigger: The trigger. Required. + :type trigger: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Trigger. The Trigger is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Trigger] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + trigger: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Trigger]: + """Creates or updates a trigger. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The trigger name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param trigger: The trigger. Required. + :type trigger: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Trigger. The Trigger is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Trigger] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + trigger: Union[_models.Trigger, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Trigger]: + """Creates or updates a trigger. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The trigger name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param trigger: The trigger. Is one of the following types: Trigger, JSON, IO[bytes] Required. + :type trigger: ~azure.mgmt.databoxedge.models.Trigger or JSON or IO[bytes] + :return: An instance of LROPoller that returns Trigger. The Trigger is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Trigger] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Trigger] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + trigger=trigger, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Trigger, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Trigger].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Trigger]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_triggers_delete_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes the trigger on the gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The trigger name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, *, filter: Optional[str] = None, **kwargs: Any + ) -> ItemPaged["_models.Trigger"]: + """Lists all the triggers configured in the device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword filter: Specify $filter='CustomContextTag eq ' to filter on custom context tag + property. Default value is None. + :paramtype filter: str + :return: An iterator like instance of Trigger + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Trigger] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Trigger]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_triggers_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + filter=filter, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Trigger], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class UsersOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`users` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.User: + """Gets the properties of the specified user. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The user name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: User. The User is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.User + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.User] = kwargs.pop("cls", None) + + _request = build_users_get_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.User, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + device_name: str, + name: str, + resource_group_name: str, + user: Union[_models.User, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(user, (IOBase, bytes)): + _content = user + else: + _content = json.dumps(user, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_users_create_or_update_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + user: _models.User, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.User]: + """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. Required. + :type device_name: str + :param name: The user name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param user: The user details. Required. + :type user: ~azure.mgmt.databoxedge.models.User + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns User. The User is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.User] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + user: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.User]: + """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. Required. + :type device_name: str + :param name: The user name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param user: The user details. Required. + :type user: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns User. The User is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.User] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + user: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.User]: + """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. Required. + :type device_name: str + :param name: The user name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param user: The user details. Required. + :type user: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns User. The User is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.User] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + device_name: str, + name: str, + resource_group_name: str, + user: Union[_models.User, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.User]: + """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. Required. + :type device_name: str + :param name: The user name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param user: The user details. Is one of the following types: User, JSON, IO[bytes] Required. + :type user: ~azure.mgmt.databoxedge.models.User or JSON or IO[bytes] + :return: An instance of LROPoller that returns User. The User is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.User] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.User] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + user=user, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.User, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.User].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.User]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_users_delete_request( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes the user on a databox edge/gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param name: The user name. Required. + :type name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + device_name=device_name, + name=name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, *, filter: Optional[str] = None, **kwargs: Any + ) -> ItemPaged["_models.User"]: + """Gets all the users registered on a Data Box Edge/Data Box Gateway device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword filter: Specify $filter='Type eq ' to filter on user type property. Default + value is None. + :paramtype filter: str + :return: An iterator like instance of User + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.User] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.User]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_users_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + filter=filter, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.User], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class DeviceCapacityCheckOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`device_capacity_check` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _check_resource_creation_feasibility_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + device_capacity_request_info: Union[_models.DeviceCapacityRequestInfo, JSON, IO[bytes]], + *, + capacity_name: Optional[str] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(device_capacity_request_info, (IOBase, bytes)): + _content = device_capacity_request_info + else: + _content = json.dumps(device_capacity_request_info, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_device_capacity_check_check_resource_creation_feasibility_request( + resource_group_name=resource_group_name, + device_name=device_name, + subscription_id=self._config.subscription_id, + capacity_name=capacity_name, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_check_resource_creation_feasibility( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + device_capacity_request_info: _models.DeviceCapacityRequestInfo, + *, + capacity_name: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Posts the device capacity request info to check feasibility. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param device_capacity_request_info: The device capacity request info. Required. + :type device_capacity_request_info: ~azure.mgmt.databoxedge.models.DeviceCapacityRequestInfo + :keyword capacity_name: The capacity name. Default value is None. + :paramtype capacity_name: str + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_check_resource_creation_feasibility( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + device_capacity_request_info: JSON, + *, + capacity_name: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Posts the device capacity request info to check feasibility. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param device_capacity_request_info: The device capacity request info. Required. + :type device_capacity_request_info: JSON + :keyword capacity_name: The capacity name. Default value is None. + :paramtype capacity_name: str + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_check_resource_creation_feasibility( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + device_capacity_request_info: IO[bytes], + *, + capacity_name: Optional[str] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Posts the device capacity request info to check feasibility. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param device_capacity_request_info: The device capacity request info. Required. + :type device_capacity_request_info: IO[bytes] + :keyword capacity_name: The capacity name. Default value is None. + :paramtype capacity_name: str + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_check_resource_creation_feasibility( # pylint: disable=name-too-long + self, + resource_group_name: str, + device_name: str, + device_capacity_request_info: Union[_models.DeviceCapacityRequestInfo, JSON, IO[bytes]], + *, + capacity_name: Optional[str] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Posts the device capacity request info to check feasibility. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param device_capacity_request_info: The device capacity request info. Is one of the following + types: DeviceCapacityRequestInfo, JSON, IO[bytes] Required. + :type device_capacity_request_info: ~azure.mgmt.databoxedge.models.DeviceCapacityRequestInfo or + JSON or IO[bytes] + :keyword capacity_name: The capacity name. Default value is None. + :paramtype capacity_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._check_resource_creation_feasibility_initial( + resource_group_name=resource_group_name, + device_name=device_name, + device_capacity_request_info=device_capacity_request_info, + capacity_name=capacity_name, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class NodesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`nodes` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_data_box_edge_device( + self, device_name: str, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.Node"]: + """Gets all the nodes currently configured under this Data Box Edge device. + + :param device_name: The device name. Required. + :type device_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Node + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Node] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Node]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_nodes_list_by_data_box_edge_device_request( + device_name=device_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.Node], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class SupportPackagesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`support_packages` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _trigger_support_package_initial( + self, + resource_group_name: str, + device_name: str, + trigger_support_package_request: Union[_models.TriggerSupportPackageRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(trigger_support_package_request, (IOBase, bytes)): + _content = trigger_support_package_request + else: + _content = json.dumps(trigger_support_package_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_support_packages_trigger_support_package_request( + resource_group_name=resource_group_name, + device_name=device_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_trigger_support_package( + self, + resource_group_name: str, + device_name: str, + trigger_support_package_request: _models.TriggerSupportPackageRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Triggers support package on the device. + + Triggers support package on the device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param trigger_support_package_request: The trigger support package request object. Required. + :type trigger_support_package_request: + ~azure.mgmt.databoxedge.models.TriggerSupportPackageRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_trigger_support_package( + self, + resource_group_name: str, + device_name: str, + trigger_support_package_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Triggers support package on the device. + + Triggers support package on the device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param trigger_support_package_request: The trigger support package request object. Required. + :type trigger_support_package_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_trigger_support_package( + self, + resource_group_name: str, + device_name: str, + trigger_support_package_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Triggers support package on the device. + + Triggers support package on the device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param trigger_support_package_request: The trigger support package request object. Required. + :type trigger_support_package_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_trigger_support_package( + self, + resource_group_name: str, + device_name: str, + trigger_support_package_request: Union[_models.TriggerSupportPackageRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Triggers support package on the device. + + Triggers support package on the device. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :param trigger_support_package_request: The trigger support package request object. Is one of + the following types: TriggerSupportPackageRequest, JSON, IO[bytes] Required. + :type trigger_support_package_request: + ~azure.mgmt.databoxedge.models.TriggerSupportPackageRequest or JSON or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._trigger_support_package_initial( + resource_group_name=resource_group_name, + device_name=device_name, + trigger_support_package_request=trigger_support_package_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.DataBoxEdge/operations") + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) +class DeviceCapacityInfoOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`device_capacity_info` attribute. + """ -class Operations: + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get_device_capacity_info( + self, resource_group_name: str, device_name: str, **kwargs: Any + ) -> _models.DeviceCapacityInfo: + """Gets the properties of the specified device capacity info. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param device_name: The device name. Required. + :type device_name: str + :return: DeviceCapacityInfo. The DeviceCapacityInfo is compatible with MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.DeviceCapacityInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DeviceCapacityInfo] = kwargs.pop("cls", None) + + _request = build_device_capacity_info_get_device_capacity_info_request( + resource_group_name=resource_group_name, + device_name=device_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.DeviceCapacityInfo, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class MonitoringConfigOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`operations` attribute. + :attr:`monitoring_config` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DataBoxEdgeManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any + ) -> _models.MonitoringMetricConfiguration: + """Gets a metric configuration of a role. + + Gets a metric configuration of a role. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: MonitoringMetricConfiguration. The MonitoringMetricConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MonitoringMetricConfiguration] = kwargs.pop("cls", None) + + _request = build_monitoring_config_get_request( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models.MonitoringMetricConfiguration, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + device_name: str, + role_name: str, + resource_group_name: str, + monitoring_metric_configuration: Union[_models.MonitoringMetricConfiguration, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(monitoring_metric_configuration, (IOBase, bytes)): + _content = monitoring_metric_configuration + else: + _content = json.dumps(monitoring_metric_configuration, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_monitoring_config_create_or_update_request( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_name, + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + device_name: str, + role_name: str, + resource_group_name: str, + monitoring_metric_configuration: _models.MonitoringMetricConfiguration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MonitoringMetricConfiguration]: + """Creates a new metric configuration or updates an existing one for a role. + + Creates a new metric configuration or updates an existing one for a role. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param monitoring_metric_configuration: The metric configuration. Required. + :type monitoring_metric_configuration: + ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns MonitoringMetricConfiguration. The + MonitoringMetricConfiguration is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + role_name: str, + resource_group_name: str, + monitoring_metric_configuration: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MonitoringMetricConfiguration]: + """Creates a new metric configuration or updates an existing one for a role. + + Creates a new metric configuration or updates an existing one for a role. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param monitoring_metric_configuration: The metric configuration. Required. + :type monitoring_metric_configuration: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns MonitoringMetricConfiguration. The + MonitoringMetricConfiguration is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + device_name: str, + role_name: str, + resource_group_name: str, + monitoring_metric_configuration: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MonitoringMetricConfiguration]: + """Creates a new metric configuration or updates an existing one for a role. + + Creates a new metric configuration or updates an existing one for a role. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param monitoring_metric_configuration: The metric configuration. Required. + :type monitoring_metric_configuration: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns MonitoringMetricConfiguration. The + MonitoringMetricConfiguration is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + device_name: str, + role_name: str, + resource_group_name: str, + monitoring_metric_configuration: Union[_models.MonitoringMetricConfiguration, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.MonitoringMetricConfiguration]: + """Creates a new metric configuration or updates an existing one for a role. + + Creates a new metric configuration or updates an existing one for a role. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param monitoring_metric_configuration: The metric configuration. Is one of the following + types: MonitoringMetricConfiguration, JSON, IO[bytes] Required. + :type monitoring_metric_configuration: + ~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration or JSON or IO[bytes] + :return: An instance of LROPoller that returns MonitoringMetricConfiguration. The + MonitoringMetricConfiguration is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MonitoringMetricConfiguration] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_name, + monitoring_metric_configuration=monitoring_metric_configuration, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.MonitoringMetricConfiguration, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.MonitoringMetricConfiguration].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.MonitoringMetricConfiguration]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_monitoring_config_delete_request( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any + ) -> LROPoller[None]: + """deletes a new metric configuration for a role. + + deletes a new metric configuration for a role. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list( + self, device_name: str, role_name: str, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.MonitoringMetricConfiguration"]: + """Lists metric configurations in a role. + + Lists metric configurations in a role. + + :param device_name: The name of the device. Required. + :type device_name: str + :param role_name: The name of the role. Required. + :type role_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of MonitoringMetricConfiguration + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.MonitoringMetricConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.MonitoringMetricConfiguration]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_monitoring_config_list_request( + device_name=device_name, + role_name=role_name, + resource_group_name=resource_group_name, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.MonitoringMetricConfiguration], deserialized.get("value", [])) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class AvailableSkusOperations: """ + .. warning:: + **DO NOT** instantiate this class directly. - models = _models + Instead, you should access the following operations through + :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s + :attr:`available_skus` attribute. + """ def __init__(self, *args, **kwargs) -> None: input_args = list(args) @@ -77,20 +11758,19 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: - """List all the supported operations. + def list(self, **kwargs: Any) -> ItemPaged["_models.DataBoxEdgeSku"]: + """List all the available Skus and information related to them. - List all the supported operations. + List all the available Skus and information related to them. - :return: An iterator like instance of either Operation or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Operation] + :return: An iterator like instance of DataBoxEdgeSku + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.DataBoxEdgeSku] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + _params = kwargs.pop("params", {}) or {} - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationsList] = kwargs.pop("cls", None) + cls: ClsType[List[_models.DataBoxEdgeSku]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -103,12 +11783,18 @@ def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: def prepare_request(next_link=None): if not next_link: - _request = build_list_request( - api_version=api_version, + _request = build_available_skus_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, headers=_headers, params=_params, ) - _request.url = self._client.format_url(_request.url) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) else: # make call to next link with the client's api-version @@ -123,16 +11809,21 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + return _request def extract_data(pipeline_response): - deserialized = self._deserialize("OperationsList", pipeline_response) - list_of_elem = deserialized.value + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize(List[_models.DataBoxEdgeSku], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) + return deserialized.get("nextLink") or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) @@ -145,7 +11836,8 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = _failsafe_deserialize(_models.CloudError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_operations_status_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_operations_status_operations.py deleted file mode 100644 index 69a04ed4a592..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_operations_status_operations.py +++ /dev/null @@ -1,148 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/operationsStatus/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class OperationsStatusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`operations_status` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Job: - """Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. - - Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The job name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Job or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Job - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Job] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Job", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_orders_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_orders_operations.py deleted file mode 100644 index c61e878edb9b..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_orders_operations.py +++ /dev/null @@ -1,702 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_data_box_edge_device_request( # pylint: disable=name-too-long - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request(device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_dc_access_code_request( - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default/listDCAccessCode", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class OrdersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`orders` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.Order"]: - """Lists all the orders related to a Data Box Edge/Data Box Gateway device. - - Lists all the orders related to a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either Order or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Order] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OrderList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("OrderList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, device_name: str, resource_group_name: str, **kwargs: Any) -> _models.Order: - """Gets a specific order by name. - - Gets a specific order by name. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Order or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Order - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Order] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Order", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, device_name: str, resource_group_name: str, order: Union[_models.Order, IO[bytes]], **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(order, (IOBase, bytes)): - _content = order - else: - _json = self._serialize.body(order, "Order") - - _request = build_create_or_update_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - device_name: str, - resource_group_name: str, - order: _models.Order, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Order]: - """Creates or updates an order. - - Creates or updates an order. - - :param device_name: The order details of a device. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param order: The order to be created or updated. Required. - :type order: ~azure.mgmt.databoxedge.models.Order - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Order or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Order] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - device_name: str, - resource_group_name: str, - order: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Order]: - """Creates or updates an order. - - Creates or updates an order. - - :param device_name: The order details of a device. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param order: The order to be created or updated. Required. - :type order: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Order or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Order] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, device_name: str, resource_group_name: str, order: Union[_models.Order, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.Order]: - """Creates or updates an order. - - Creates or updates an order. - - :param device_name: The order details of a device. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param order: The order to be created or updated. Is either a Order type or a IO[bytes] type. - Required. - :type order: ~azure.mgmt.databoxedge.models.Order or IO[bytes] - :return: An instance of LROPoller that returns either Order or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Order] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Order] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - device_name=device_name, - resource_group_name=resource_group_name, - order=order, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Order", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Order].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Order]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, device_name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, device_name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes the order related to the device. - - Deletes the order related to the device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - device_name=device_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_dc_access_code(self, device_name: str, resource_group_name: str, **kwargs: Any) -> _models.DCAccessCode: - """Gets the DCAccess Code. - - Gets the DCAccess Code. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: DCAccessCode or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.DCAccessCode - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DCAccessCode] = kwargs.pop("cls", None) - - _request = build_list_dc_access_code_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DCAccessCode", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_patch.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_patch.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_roles_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_roles_operations.py deleted file mode 100644 index 11a782158780..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_roles_operations.py +++ /dev/null @@ -1,624 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_data_box_edge_device_request( # pylint: disable=name-too-long - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class RolesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`roles` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.Role"]: - """Lists all the roles configured in a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either Role or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Role] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RoleList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("RoleList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Role: - """Gets a specific role by name. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The role name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Role or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Role - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Role] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Role", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, device_name: str, name: str, resource_group_name: str, role: Union[_models.Role, IO[bytes]], **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(role, (IOBase, bytes)): - _content = role - else: - _json = self._serialize.body(role, "Role") - - _request = build_create_or_update_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - role: _models.Role, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Role]: - """Create or update a role. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The role name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param role: The role properties. Required. - :type role: ~azure.mgmt.databoxedge.models.Role - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Role or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Role] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - role: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Role]: - """Create or update a role. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The role name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param role: The role properties. Required. - :type role: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Role or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Role] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, device_name: str, name: str, resource_group_name: str, role: Union[_models.Role, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.Role]: - """Create or update a role. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The role name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param role: The role properties. Is either a Role type or a IO[bytes] type. Required. - :type role: ~azure.mgmt.databoxedge.models.Role or IO[bytes] - :return: An instance of LROPoller that returns either Role or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Role] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Role] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - role=role, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Role", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Role].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Role]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes the role on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The role name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_shares_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_shares_operations.py deleted file mode 100644 index faa7f6562590..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_shares_operations.py +++ /dev/null @@ -1,782 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_data_box_edge_device_request( # pylint: disable=name-too-long - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_refresh_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}/refresh", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class SharesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`shares` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.Share"]: - """Lists all the shares in a Data Box Edge/Data Box Gateway device. - - Lists all the shares in a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either Share or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Share] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ShareList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ShareList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Share: - """Gets a share by name. - - Gets a share by name. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The share name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Share or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Share - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Share] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Share", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - device_name: str, - name: str, - resource_group_name: str, - share: Union[_models.Share, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(share, (IOBase, bytes)): - _content = share - else: - _json = self._serialize.body(share, "Share") - - _request = build_create_or_update_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - share: _models.Share, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Share]: - """Creates a new share or updates an existing share on the device. - - Creates a new share or updates an existing share on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The share name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param share: The share properties. Required. - :type share: ~azure.mgmt.databoxedge.models.Share - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Share or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Share] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - share: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Share]: - """Creates a new share or updates an existing share on the device. - - Creates a new share or updates an existing share on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The share name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param share: The share properties. Required. - :type share: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Share or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Share] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - share: Union[_models.Share, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Share]: - """Creates a new share or updates an existing share on the device. - - Creates a new share or updates an existing share on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The share name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param share: The share properties. Is either a Share type or a IO[bytes] type. Required. - :type share: ~azure.mgmt.databoxedge.models.Share or IO[bytes] - :return: An instance of LROPoller that returns either Share or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Share] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Share] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - share=share, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Share", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Share].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Share]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes the share on the Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The share name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _refresh_initial(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_refresh_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_refresh(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: - """Refreshes the share metadata with the data from the cloud. - - Refreshes the share metadata with the data from the cloud. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The share name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._refresh_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_storage_account_credentials_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_storage_account_credentials_operations.py deleted file mode 100644 index 15d11b43e075..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_storage_account_credentials_operations.py +++ /dev/null @@ -1,644 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_data_box_edge_device_request( # pylint: disable=name-too-long - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class StorageAccountCredentialsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`storage_account_credentials` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.StorageAccountCredential"]: - """Gets all the storage account credentials in a Data Box Edge/Data Box Gateway device. - - Gets all the storage account credentials in a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either StorageAccountCredential or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.StorageAccountCredential] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.StorageAccountCredentialList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("StorageAccountCredentialList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, device_name: str, name: str, resource_group_name: str, **kwargs: Any - ) -> _models.StorageAccountCredential: - """Gets the properties of the specified storage account credential. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The storage account credential name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: StorageAccountCredential or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.StorageAccountCredential - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.StorageAccountCredential] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("StorageAccountCredential", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - device_name: str, - name: str, - resource_group_name: str, - storage_account_credential: Union[_models.StorageAccountCredential, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(storage_account_credential, (IOBase, bytes)): - _content = storage_account_credential - else: - _json = self._serialize.body(storage_account_credential, "StorageAccountCredential") - - _request = build_create_or_update_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - storage_account_credential: _models.StorageAccountCredential, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.StorageAccountCredential]: - """Creates or updates the storage account credential. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The storage account credential name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param storage_account_credential: The storage account credential. Required. - :type storage_account_credential: ~azure.mgmt.databoxedge.models.StorageAccountCredential - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either StorageAccountCredential or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - storage_account_credential: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.StorageAccountCredential]: - """Creates or updates the storage account credential. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The storage account credential name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param storage_account_credential: The storage account credential. Required. - :type storage_account_credential: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either StorageAccountCredential or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - storage_account_credential: Union[_models.StorageAccountCredential, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.StorageAccountCredential]: - """Creates or updates the storage account credential. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The storage account credential name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param storage_account_credential: The storage account credential. Is either a - StorageAccountCredential type or a IO[bytes] type. Required. - :type storage_account_credential: ~azure.mgmt.databoxedge.models.StorageAccountCredential or - IO[bytes] - :return: An instance of LROPoller that returns either StorageAccountCredential or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.StorageAccountCredential] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.StorageAccountCredential] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - storage_account_credential=storage_account_credential, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("StorageAccountCredential", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.StorageAccountCredential].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.StorageAccountCredential]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes the storage account credential. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The storage account credential name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_storage_accounts_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_storage_accounts_operations.py deleted file mode 100644 index b5d95f85d48d..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_storage_accounts_operations.py +++ /dev/null @@ -1,654 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_data_box_edge_device_request( # pylint: disable=name-too-long - device_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - device_name: str, storage_account_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "storageAccountName": _SERIALIZER.url("storage_account_name", storage_account_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - device_name: str, storage_account_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "storageAccountName": _SERIALIZER.url("storage_account_name", storage_account_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - device_name: str, storage_account_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "storageAccountName": _SERIALIZER.url("storage_account_name", storage_account_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class StorageAccountsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`storage_accounts` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.StorageAccount"]: - """Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. - - Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An iterator like instance of either StorageAccount or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.StorageAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.StorageAccountList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("StorageAccountList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any - ) -> _models.StorageAccount: - """Gets a StorageAccount by name. - - Gets a StorageAccount by name. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The storage account name. Required. - :type storage_account_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: StorageAccount or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.StorageAccount - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.StorageAccount] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - storage_account_name=storage_account_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("StorageAccount", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - device_name: str, - storage_account_name: str, - resource_group_name: str, - storage_account: Union[_models.StorageAccount, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(storage_account, (IOBase, bytes)): - _content = storage_account - else: - _json = self._serialize.body(storage_account, "StorageAccount") - - _request = build_create_or_update_request( - device_name=device_name, - storage_account_name=storage_account_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - device_name: str, - storage_account_name: str, - resource_group_name: str, - storage_account: _models.StorageAccount, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.StorageAccount]: - """Creates a new StorageAccount or updates an existing StorageAccount on the device. - - Creates a new StorageAccount or updates an existing StorageAccount on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The StorageAccount name. Required. - :type storage_account_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param storage_account: The StorageAccount properties. Required. - :type storage_account: ~azure.mgmt.databoxedge.models.StorageAccount - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either StorageAccount or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.StorageAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - device_name: str, - storage_account_name: str, - resource_group_name: str, - storage_account: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.StorageAccount]: - """Creates a new StorageAccount or updates an existing StorageAccount on the device. - - Creates a new StorageAccount or updates an existing StorageAccount on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The StorageAccount name. Required. - :type storage_account_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param storage_account: The StorageAccount properties. Required. - :type storage_account: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either StorageAccount or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.StorageAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - device_name: str, - storage_account_name: str, - resource_group_name: str, - storage_account: Union[_models.StorageAccount, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.StorageAccount]: - """Creates a new StorageAccount or updates an existing StorageAccount on the device. - - Creates a new StorageAccount or updates an existing StorageAccount on the device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The StorageAccount name. Required. - :type storage_account_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param storage_account: The StorageAccount properties. Is either a StorageAccount type or a - IO[bytes] type. Required. - :type storage_account: ~azure.mgmt.databoxedge.models.StorageAccount or IO[bytes] - :return: An instance of LROPoller that returns either StorageAccount or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.StorageAccount] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.StorageAccount] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - device_name=device_name, - storage_account_name=storage_account_name, - resource_group_name=resource_group_name, - storage_account=storage_account, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("StorageAccount", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.StorageAccount].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.StorageAccount]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - storage_account_name=storage_account_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, device_name: str, storage_account_name: str, resource_group_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes the StorageAccount on the Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param storage_account_name: The StorageAccount name. Required. - :type storage_account_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - device_name=device_name, - storage_account_name=storage_account_name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_triggers_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_triggers_operations.py deleted file mode 100644 index 841d65f37a52..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_triggers_operations.py +++ /dev/null @@ -1,640 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_data_box_edge_device_request( # pylint: disable=name-too-long - device_name: str, resource_group_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class TriggersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`triggers` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, filter: Optional[str] = None, **kwargs: Any - ) -> ItemPaged["_models.Trigger"]: - """Lists all the triggers configured in the device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param filter: Specify $filter='CustomContextTag eq :code:``' to filter on custom context - tag property. Default value is None. - :type filter: str - :return: An iterator like instance of either Trigger or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.Trigger] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.TriggerList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - filter=filter, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("TriggerList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.Trigger: - """Get a specific trigger by name. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The trigger name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: Trigger or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.Trigger - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Trigger] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Trigger", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - device_name: str, - name: str, - resource_group_name: str, - trigger: Union[_models.Trigger, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(trigger, (IOBase, bytes)): - _content = trigger - else: - _json = self._serialize.body(trigger, "Trigger") - - _request = build_create_or_update_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - trigger: _models.Trigger, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Trigger]: - """Creates or updates a trigger. - - :param device_name: Creates or updates a trigger. Required. - :type device_name: str - :param name: The trigger name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param trigger: The trigger. Required. - :type trigger: ~azure.mgmt.databoxedge.models.Trigger - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Trigger or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Trigger] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - trigger: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Trigger]: - """Creates or updates a trigger. - - :param device_name: Creates or updates a trigger. Required. - :type device_name: str - :param name: The trigger name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param trigger: The trigger. Required. - :type trigger: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Trigger or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Trigger] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - trigger: Union[_models.Trigger, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Trigger]: - """Creates or updates a trigger. - - :param device_name: Creates or updates a trigger. Required. - :type device_name: str - :param name: The trigger name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param trigger: The trigger. Is either a Trigger type or a IO[bytes] type. Required. - :type trigger: ~azure.mgmt.databoxedge.models.Trigger or IO[bytes] - :return: An instance of LROPoller that returns either Trigger or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.Trigger] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Trigger] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - trigger=trigger, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Trigger", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Trigger].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Trigger]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes the trigger on the gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The trigger name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_users_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_users_operations.py deleted file mode 100644 index 08f20fd5f180..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/operations/_users_operations.py +++ /dev/null @@ -1,634 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for 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 collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import DataBoxEdgeManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_data_box_edge_device_request( # pylint: disable=name-too-long - device_name: str, resource_group_name: str, subscription_id: str, *, expand: Optional[str] = None, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if expand is not None: - _params["$expand"] = _SERIALIZER.query("expand", expand, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - device_name: str, name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}", - ) - path_format_arguments = { - "deviceName": _SERIALIZER.url("device_name", device_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class UsersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.databoxedge.DataBoxEdgeManagementClient`'s - :attr:`users` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DataBoxEdgeManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_data_box_edge_device( - self, device_name: str, resource_group_name: str, expand: Optional[str] = None, **kwargs: Any - ) -> ItemPaged["_models.User"]: - """Gets all the users registered on a Data Box Edge/Data Box Gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param expand: Specify $expand=details to populate additional fields related to the resource or - Specify $skipToken=\\ :code:`` to populate the next page in the list. Default value is - None. - :type expand: str - :return: An iterator like instance of either User or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.databoxedge.models.User] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_data_box_edge_device_request( - device_name=device_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - expand=expand, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("UserList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> _models.User: - """Gets the properties of the specified user. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The user name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: User or the result of cls(response) - :rtype: ~azure.mgmt.databoxedge.models.User - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.User] = kwargs.pop("cls", None) - - _request = build_get_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize("User", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, device_name: str, name: str, resource_group_name: str, user: Union[_models.User, IO[bytes]], **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(user, (IOBase, bytes)): - _content = user - else: - _json = self._serialize.body(user, "User") - - _request = build_create_or_update_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - user: _models.User, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.User]: - """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. Required. - :type device_name: str - :param name: The user name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param user: The user details. Required. - :type user: ~azure.mgmt.databoxedge.models.User - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either User or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.User] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - device_name: str, - name: str, - resource_group_name: str, - user: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.User]: - """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. Required. - :type device_name: str - :param name: The user name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param user: The user details. Required. - :type user: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either User or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.User] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, device_name: str, name: str, resource_group_name: str, user: Union[_models.User, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.User]: - """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. Required. - :type device_name: str - :param name: The user name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :param user: The user details. Is either a User type or a IO[bytes] type. Required. - :type user: ~azure.mgmt.databoxedge.models.User or IO[bytes] - :return: An instance of LROPoller that returns either User or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.databoxedge.models.User] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.User] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - user=user, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("User", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.User].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.User]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, device_name: str, name: str, resource_group_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes the user on a databox edge/gateway device. - - :param device_name: The device name. Required. - :type device_name: str - :param name: The user name. Required. - :type name: str - :param resource_group_name: The resource group name. Required. - :type resource_group_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - device_name=device_name, - name=name, - resource_group_name=resource_group_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/code_report_typespec.json b/sdk/databoxedge/azure-mgmt-databoxedge/code_report_typespec.json new file mode 100644 index 000000000000..9383060250a3 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/code_report_typespec.json @@ -0,0 +1,42224 @@ +{ + "azure.mgmt.databoxedge": { + "class_nodes": { + "DataBoxEdgeClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "operations": { + "attr_type": "Operations" + }, + "devices": { + "attr_type": "DevicesOperations" + }, + "alerts": { + "attr_type": "AlertsOperations" + }, + "bandwidth_schedules": { + "attr_type": "BandwidthSchedulesOperations" + }, + "diagnostic_settings": { + "attr_type": "DiagnosticSettingsOperations" + }, + "jobs": { + "attr_type": "JobsOperations" + }, + "operations_status": { + "attr_type": "OperationsStatusOperations" + }, + "orders": { + "attr_type": "OrdersOperations" + }, + "roles": { + "attr_type": "RolesOperations" + }, + "addons": { + "attr_type": "AddonsOperations" + }, + "shares": { + "attr_type": "SharesOperations" + }, + "storage_account_credentials": { + "attr_type": "StorageAccountCredentialsOperations" + }, + "storage_accounts": { + "attr_type": "StorageAccountsOperations" + }, + "containers": { + "attr_type": "ContainersOperations" + }, + "triggers": { + "attr_type": "TriggersOperations" + }, + "users": { + "attr_type": "UsersOperations" + }, + "device_capacity_check": { + "attr_type": "DeviceCapacityCheckOperations" + }, + "nodes": { + "attr_type": "NodesOperations" + }, + "support_packages": { + "attr_type": "SupportPackagesOperations" + }, + "device_capacity_info": { + "attr_type": "DeviceCapacityInfoOperations" + }, + "monitoring_config": { + "attr_type": "MonitoringConfigOperations" + }, + "available_skus": { + "attr_type": "AvailableSkusOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.databoxedge.aio": { + "class_nodes": { + "DataBoxEdgeClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "operations": { + "attr_type": "Operations" + }, + "devices": { + "attr_type": "DevicesOperations" + }, + "alerts": { + "attr_type": "AlertsOperations" + }, + "bandwidth_schedules": { + "attr_type": "BandwidthSchedulesOperations" + }, + "diagnostic_settings": { + "attr_type": "DiagnosticSettingsOperations" + }, + "jobs": { + "attr_type": "JobsOperations" + }, + "operations_status": { + "attr_type": "OperationsStatusOperations" + }, + "orders": { + "attr_type": "OrdersOperations" + }, + "roles": { + "attr_type": "RolesOperations" + }, + "addons": { + "attr_type": "AddonsOperations" + }, + "shares": { + "attr_type": "SharesOperations" + }, + "storage_account_credentials": { + "attr_type": "StorageAccountCredentialsOperations" + }, + "storage_accounts": { + "attr_type": "StorageAccountsOperations" + }, + "containers": { + "attr_type": "ContainersOperations" + }, + "triggers": { + "attr_type": "TriggersOperations" + }, + "users": { + "attr_type": "UsersOperations" + }, + "device_capacity_check": { + "attr_type": "DeviceCapacityCheckOperations" + }, + "nodes": { + "attr_type": "NodesOperations" + }, + "support_packages": { + "attr_type": "SupportPackagesOperations" + }, + "device_capacity_info": { + "attr_type": "DeviceCapacityInfoOperations" + }, + "monitoring_config": { + "attr_type": "MonitoringConfigOperations" + }, + "available_skus": { + "attr_type": "AvailableSkusOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.databoxedge.aio.operations": { + "class_nodes": { + "AddonsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "addon_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "addon": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "addon_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "addon": { + "type": "Addon", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "addon_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "addon": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "addon_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "addon": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "addon_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "addon_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_role": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AlertsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AvailableSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "BandwidthSchedulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BandwidthSchedule", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ContainersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "container_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "container": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "container_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "container": { + "type": "Container", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "container_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "container": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "container_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "container": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "container_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_refresh": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "container_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "container_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_storage_account": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "DeviceCapacityCheckOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_check_resource_creation_feasibility": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_capacity_request_info": { + "default": null, + "param_type": "positional_or_keyword" + }, + "capacity_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_capacity_request_info": { + "type": "DeviceCapacityRequestInfo", + "default": null, + "param_type": "positional_or_keyword" + }, + "capacity_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_capacity_request_info": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "capacity_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_capacity_request_info": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "capacity_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "DeviceCapacityInfoOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_device_capacity_info": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "DevicesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update_security_settings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_settings": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_settings": { + "type": "SecuritySettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_settings": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_settings": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_download_updates": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_install_updates": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_scan_for_updates": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_box_edge_device": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_box_edge_device": { + "type": "DataBoxEdgeDevice", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_box_edge_device": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_box_edge_device": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "generate_certificate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_extended_information": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_network_settings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_update_summary": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DataBoxEdgeDevicePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "update_extended_information": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DataBoxEdgeDeviceExtendedInfoPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "upload_certificate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "UploadCertificateRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "DiagnosticSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_update_diagnostic_proactive_log_collection_settings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "proactive_log_collection_settings": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "proactive_log_collection_settings": { + "type": "DiagnosticProactiveLogCollectionSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "proactive_log_collection_settings": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "proactive_log_collection_settings": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_update_diagnostic_remote_support_settings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_remote_support_settings": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_remote_support_settings": { + "type": "DiagnosticRemoteSupportSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_remote_support_settings": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_remote_support_settings": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get_diagnostic_proactive_log_collection_settings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_diagnostic_remote_support_settings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "JobsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "MonitoringConfigOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "monitoring_metric_configuration": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "monitoring_metric_configuration": { + "type": "MonitoringMetricConfiguration", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "monitoring_metric_configuration": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "monitoring_metric_configuration": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "NodesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "OperationsStatusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "OrdersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "order": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "order": { + "type": "Order", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "order": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "order": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_dc_access_code": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "RolesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role": { + "type": "Role", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "SharesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "share": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "share": { + "type": "Share", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "share": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "share": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_refresh": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "StorageAccountCredentialsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_credential": { + "type": "StorageAccountCredential", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_credential": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_credential": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "StorageAccountsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account": { + "type": "StorageAccount", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "SupportPackagesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_trigger_support_package": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "trigger_support_package_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "trigger_support_package_request": { + "type": "TriggerSupportPackageRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "trigger_support_package_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "trigger_support_package_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "TriggersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "trigger": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "trigger": { + "type": "Trigger", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "trigger": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "trigger": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "UsersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user": { + "type": "User", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + }, + "azure.mgmt.databoxedge.models": { + "class_nodes": { + "ARMBaseModel": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional" + } + }, + "AccessLevel": { + "type": "Enum", + "methods": {}, + "properties": { + "FULL_ACCESS": "FULL_ACCESS", + "NONE": "NONE", + "READ_ONLY": "READ_ONLY", + "READ_WRITE": "READ_WRITE" + } + }, + "AccountType": { + "type": "Enum", + "methods": {}, + "properties": { + "BLOB_STORAGE": "BLOB_STORAGE", + "GENERAL_PURPOSE_STORAGE": "GENERAL_PURPOSE_STORAGE" + } + }, + "Addon": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AddonState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATED": "CREATED", + "CREATING": "CREATING", + "DELETING": "DELETING", + "FAILED": "FAILED", + "INVALID": "INVALID", + "RECONFIGURING": "RECONFIGURING", + "UPDATING": "UPDATING" + } + }, + "AddonType": { + "type": "Enum", + "methods": {}, + "properties": { + "ARC_FOR_KUBERNETES": "ARC_FOR_KUBERNETES", + "IOT_EDGE": "IOT_EDGE" + } + }, + "Address": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "country": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "address_line1": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "address_line2": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "address_line3": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "postal_code": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "city": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "address_line1": "Optional", + "address_line2": "Optional", + "address_line3": "Optional", + "postal_code": "Optional", + "city": "Optional", + "state": "Optional", + "country": null + } + }, + "Alert": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AlertErrorDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "error_code": "Optional", + "error_message": "Optional", + "occurrences": "Optional" + } + }, + "AlertProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "title": "Optional", + "alert_type": "Optional", + "appeared_at_date_time": "Optional", + "recommendation": "Optional", + "severity": "Optional", + "error_details": "Optional", + "detailed_information": "Optional" + } + }, + "AlertSeverity": { + "type": "Enum", + "methods": {}, + "properties": { + "CRITICAL": "CRITICAL", + "INFORMATIONAL": "INFORMATIONAL", + "WARNING": "WARNING" + } + }, + "ArcAddon": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.ArcAddonProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ArcAddonProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "resource_location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "subscription_id": null, + "resource_group_name": null, + "resource_name": null, + "resource_location": null, + "version": "Optional", + "host_platform": "Optional", + "host_platform_type": "Optional", + "provisioning_state": "Optional" + } + }, + "AsymmetricEncryptedSecret": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "encryption_algorithm": { + "type": "Union[str, _models.EncryptionAlgorithm]", + "default": null, + "param_type": "keyword_only" + }, + "encryption_cert_thumbprint": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": null, + "encryption_cert_thumbprint": "Optional", + "encryption_algorithm": "Union" + } + }, + "Authentication": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "symmetric_key": { + "type": "Optional[_models.SymmetricKey]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "symmetric_key": "Optional" + } + }, + "AuthenticationType": { + "type": "Enum", + "methods": {}, + "properties": { + "AZURE_ACTIVE_DIRECTORY": "AZURE_ACTIVE_DIRECTORY", + "INVALID": "INVALID" + } + }, + "AzureContainerDataFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "AZURE_FILE": "AZURE_FILE", + "BLOCK_BLOB": "BLOCK_BLOB", + "PAGE_BLOB": "PAGE_BLOB" + } + }, + "AzureContainerInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_credential_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "container_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "data_format": { + "type": "Union[str, _models.AzureContainerDataFormat]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "storage_account_credential_id": null, + "container_name": null, + "data_format": "Union" + } + }, + "BandwidthSchedule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.BandwidthScheduleProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "BandwidthScheduleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "start": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "stop": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "rate_in_mbps": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "days": { + "type": "list[Union[str, _models.DayOfWeek]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "start": null, + "stop": null, + "rate_in_mbps": null, + "days": "list" + } + }, + "ClientAccessRight": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "client": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "access_permission": { + "type": "Union[str, _models.ClientPermissionType]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client": null, + "access_permission": "Union" + } + }, + "ClientPermissionType": { + "type": "Enum", + "methods": {}, + "properties": { + "NO_ACCESS": "NO_ACCESS", + "READ_ONLY": "READ_ONLY", + "READ_WRITE": "READ_WRITE" + } + }, + "CloudEdgeManagementRole": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.CloudEdgeManagementRoleProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "CloudEdgeManagementRoleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "role_status": { + "type": "Union[str, _models.RoleStatus]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "local_management_status": "Optional", + "edge_profile": "Optional", + "role_status": "Union" + } + }, + "CloudError": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.CloudErrorBody]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "error": "Optional" + } + }, + "CloudErrorBody": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "code": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "details": { + "type": "Optional[list[_models.CloudErrorBody]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "code": "Optional", + "message": "Optional", + "details": "Optional" + } + }, + "ClusterCapacityViewData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "fqdn": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "gpu_capacity": { + "type": "Optional[_models.ClusterGpuCapacity]", + "default": null, + "param_type": "keyword_only" + }, + "memory_capacity": { + "type": "Optional[_models.ClusterMemoryCapacity]", + "default": null, + "param_type": "keyword_only" + }, + "last_refreshed_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "total_provisioned_non_hpn_cores": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "fqdn": "Optional", + "gpu_capacity": "Optional", + "memory_capacity": "Optional", + "last_refreshed_time": "Optional", + "total_provisioned_non_hpn_cores": "Optional" + } + }, + "ClusterGpuCapacity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "gpu_type": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "gpu_used_units_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "gpu_free_units_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "gpu_reserved_for_failover_units_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "gpu_total_units_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "gpu_type": "Optional", + "gpu_used_units_count": "Optional", + "gpu_free_units_count": "Optional", + "gpu_reserved_for_failover_units_count": "Optional", + "gpu_total_units_count": "Optional" + } + }, + "ClusterMemoryCapacity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_free_memory_mb": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "cluster_used_memory_mb": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "cluster_failover_memory_mb": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "cluster_fragmentation_memory_mb": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "cluster_hyperv_reserve_memory_mb": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "cluster_infra_vm_memory_mb": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "cluster_total_memory_mb": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "cluster_non_failover_vm_mb": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "cluster_memory_used_by_vms_mb": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "cluster_free_memory_mb": "Optional", + "cluster_used_memory_mb": "Optional", + "cluster_failover_memory_mb": "Optional", + "cluster_fragmentation_memory_mb": "Optional", + "cluster_hyperv_reserve_memory_mb": "Optional", + "cluster_infra_vm_memory_mb": "Optional", + "cluster_total_memory_mb": "Optional", + "cluster_non_failover_vm_mb": "Optional", + "cluster_memory_used_by_vms_mb": "Optional" + } + }, + "ClusterStorageViewData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_total_storage_mb": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "cluster_free_storage_mb": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "cluster_total_storage_mb": "Optional", + "cluster_free_storage_mb": "Optional" + } + }, + "ClusterWitnessType": { + "type": "Enum", + "methods": {}, + "properties": { + "CLOUD": "CLOUD", + "FILE_SHARE": "FILE_SHARE", + "NONE": "NONE" + } + }, + "CniConfig": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "version": "Optional", + "pod_subnet": "Optional", + "service_subnet": "Optional" + } + }, + "ComputeResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "processor_count": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "memory_in_gb": { + "type": "int", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "processor_count": null, + "memory_in_gb": null + } + }, + "ContactDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "contact_person": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "company_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "phone": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "email_list": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "contact_person": null, + "company_name": null, + "phone": null, + "email_list": "list" + } + }, + "Container": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.ContainerProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ContainerProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "data_format": { + "type": "Union[str, _models.AzureContainerDataFormat]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "container_status": "Optional", + "data_format": "Union", + "refresh_details": "Optional", + "created_date_time": "Optional" + } + }, + "ContainerStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "NEEDS_ATTENTION": "NEEDS_ATTENTION", + "OFFLINE": "OFFLINE", + "OK": "OK", + "UNKNOWN": "UNKNOWN", + "UPDATING": "UPDATING" + } + }, + "CreatedByType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION": "APPLICATION", + "KEY": "KEY", + "MANAGED_IDENTITY": "MANAGED_IDENTITY", + "USER": "USER" + } + }, + "DCAccessCode": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.DCAccessCodeProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "DCAccessCodeProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "auth_code": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "auth_code": "Optional" + } + }, + "DataBoxEdgeDevice": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.DataBoxEdgeDeviceProperties]", + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "type": "Optional[_models.Sku]", + "default": null, + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ResourceIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "sku": "Optional", + "etag": "Optional", + "identity": "Optional", + "kind": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "DataBoxEdgeDeviceExtendedInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.DataBoxEdgeDeviceExtendedInfoProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "system_data": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional" + } + }, + "DataBoxEdgeDeviceExtendedInfoPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "client_secret_store_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_secret_store_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "channel_integrity_key_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "channel_integrity_key_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "sync_status": { + "type": "Optional[Union[str, _models.KeyVaultSyncStatus]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_secret_store_id": "Optional", + "client_secret_store_url": "Optional", + "channel_integrity_key_name": "Optional", + "channel_integrity_key_version": "Optional", + "sync_status": "Optional" + } + }, + "DataBoxEdgeDeviceExtendedInfoProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "encryption_key_thumbprint": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "encryption_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_secret_store_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "client_secret_store_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "channel_integrity_key_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "channel_integrity_key_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "key_vault_sync_status": { + "type": "Optional[Union[str, _models.KeyVaultSyncStatus]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "encryption_key_thumbprint": "Optional", + "encryption_key": "Optional", + "resource_key": "Optional", + "client_secret_store_id": "Optional", + "client_secret_store_url": "Optional", + "channel_integrity_key_name": "Optional", + "channel_integrity_key_version": "Optional", + "key_vault_sync_status": "Optional", + "device_secrets": "Optional", + "cluster_witness_type": "Optional", + "file_share_witness_location": "Optional", + "file_share_witness_username": "Optional", + "cloud_witness_storage_account_name": "Optional", + "cloud_witness_container_name": "Optional", + "cloud_witness_storage_endpoint": "Optional" + } + }, + "DataBoxEdgeDeviceKind": { + "type": "Enum", + "methods": {}, + "properties": { + "AZURE_DATA_BOX_GATEWAY": "AZURE_DATA_BOX_GATEWAY", + "AZURE_MODULAR_DATA_CENTRE": "AZURE_MODULAR_DATA_CENTRE", + "AZURE_STACK_EDGE": "AZURE_STACK_EDGE", + "AZURE_STACK_HUB": "AZURE_STACK_HUB" + } + }, + "DataBoxEdgeDevicePatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ResourceIdentity]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.DataBoxEdgeDevicePropertiesPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tags": "Optional", + "identity": "Optional", + "properties": "Optional" + } + }, + "DataBoxEdgeDeviceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "data_residency": { + "type": "Optional[_models.DataResidency]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "system_data": "Optional", + "data_box_edge_device_status": "Optional", + "serial_number": "Optional", + "description": "Optional", + "model_description": "Optional", + "device_type": "Optional", + "friendly_name": "Optional", + "culture": "Optional", + "device_model": "Optional", + "device_software_version": "Optional", + "device_local_capacity": "Optional", + "time_zone": "Optional", + "device_hcs_version": "Optional", + "configured_role_types": "Optional", + "node_count": "Optional", + "resource_move_details": "Optional", + "edge_profile": "Optional", + "data_residency": "Optional", + "kubernetes_workload_profile": "Optional" + } + }, + "DataBoxEdgeDevicePropertiesPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "edge_profile": { + "type": "Optional[_models.EdgeProfilePatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "edge_profile": "Optional" + } + }, + "DataBoxEdgeDeviceStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "DISCONNECTED": "DISCONNECTED", + "MAINTENANCE": "MAINTENANCE", + "NEEDS_ATTENTION": "NEEDS_ATTENTION", + "OFFLINE": "OFFLINE", + "ONLINE": "ONLINE", + "PARTIALLY_DISCONNECTED": "PARTIALLY_DISCONNECTED", + "READY_TO_SETUP": "READY_TO_SETUP" + } + }, + "DataBoxEdgeSku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "resource_type": "Optional", + "name": "Optional", + "kind": "Optional", + "tier": "Optional", + "size": "Optional", + "family": "Optional", + "locations": "Optional", + "api_versions": "Optional", + "location_info": "Optional", + "costs": "Optional", + "signup_option": "Optional", + "version": "Optional", + "availability": "Optional", + "shipment_types": "Optional", + "capabilities": "Optional" + } + }, + "DataPolicy": { + "type": "Enum", + "methods": {}, + "properties": { + "CLOUD": "CLOUD", + "LOCAL": "LOCAL" + } + }, + "DataResidency": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.DataResidencyType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": "Optional" + } + }, + "DataResidencyType": { + "type": "Enum", + "methods": {}, + "properties": { + "GEO_ZONE_REPLICATION": "GEO_ZONE_REPLICATION", + "ZONE_REPLICATION": "ZONE_REPLICATION" + } + }, + "DayOfWeek": { + "type": "Enum", + "methods": {}, + "properties": { + "FRIDAY": "FRIDAY", + "MONDAY": "MONDAY", + "SATURDAY": "SATURDAY", + "SUNDAY": "SUNDAY", + "THURSDAY": "THURSDAY", + "TUESDAY": "TUESDAY", + "WEDNESDAY": "WEDNESDAY" + } + }, + "DeviceCapacityInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.DeviceCapacityInfoProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "DeviceCapacityInfoProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "time_stamp": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "cluster_storage_capacity_info": { + "type": "Optional[_models.ClusterStorageViewData]", + "default": null, + "param_type": "keyword_only" + }, + "cluster_compute_capacity_info": { + "type": "Optional[_models.ClusterCapacityViewData]", + "default": null, + "param_type": "keyword_only" + }, + "node_capacity_infos": { + "type": "Optional[dict[str, _models.HostCapacity]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "time_stamp": "Optional", + "cluster_storage_capacity_info": "Optional", + "cluster_compute_capacity_info": "Optional", + "node_capacity_infos": "Optional" + } + }, + "DeviceCapacityRequestInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.DeviceCapacityRequestInfoProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null + } + }, + "DeviceCapacityRequestInfoProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "vm_placement_query": { + "type": "list[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "vm_placement_results": { + "type": "Optional[list[_models.VmPlacementRequestResult]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "vm_placement_query": "list", + "vm_placement_results": "Optional" + } + }, + "DeviceType": { + "type": "Enum", + "methods": {}, + "properties": { + "DATA_BOX_EDGE_DEVICE": "DATA_BOX_EDGE_DEVICE" + } + }, + "DiagnosticProactiveLogCollectionSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.ProactiveLogCollectionSettingsProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "DiagnosticRemoteSupportSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.DiagnosticRemoteSupportSettingsProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "DiagnosticRemoteSupportSettingsProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "remote_support_settings_list": { + "type": "Optional[list[_models.RemoteSupportSettings]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "remote_support_settings_list": "Optional" + } + }, + "DownloadPhase": { + "type": "Enum", + "methods": {}, + "properties": { + "DOWNLOADING": "DOWNLOADING", + "INITIALIZING": "INITIALIZING", + "UNKNOWN": "UNKNOWN", + "VERIFYING": "VERIFYING" + } + }, + "EdgeProfile": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription": { + "type": "Optional[_models.EdgeProfileSubscription]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "subscription": "Optional" + } + }, + "EdgeProfilePatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription": { + "type": "Optional[_models.EdgeProfileSubscriptionPatch]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "subscription": "Optional" + } + }, + "EdgeProfileSubscription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "registration_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.SubscriptionState]]", + "default": null, + "param_type": "keyword_only" + }, + "registration_date": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.SubscriptionProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "registration_id": "Optional", + "id": "Optional", + "state": "Optional", + "registration_date": "Optional", + "subscription_id": "Optional", + "properties": "Optional" + } + }, + "EdgeProfileSubscriptionPatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional" + } + }, + "EncryptionAlgorithm": { + "type": "Enum", + "methods": {}, + "properties": { + "AES256": "AES256", + "NONE": "NONE", + "RSAES_PKCS1_V1_5": "RSAES_PKCS1_V1_5" + } + }, + "EtcdInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "version": "Optional" + } + }, + "FileEventTrigger": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.FileTriggerProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "FileSourceInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "share_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "share_id": null + } + }, + "FileTriggerProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "source_info": { + "type": "_models.FileSourceInfo", + "default": null, + "param_type": "keyword_only" + }, + "sink_info": { + "type": "_models.RoleSinkInfo", + "default": null, + "param_type": "keyword_only" + }, + "custom_context_tag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "source_info": null, + "sink_info": null, + "custom_context_tag": "Optional" + } + }, + "GenerateCertResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "public_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "private_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "expiry_time_in_utc": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "public_key": "Optional", + "private_key": "Optional", + "expiry_time_in_utc": "Optional" + } + }, + "HostCapacity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "host_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "effective_available_memory_mb_on_host": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "available_gpu_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "vm_used_memory": { + "type": "Optional[dict[str, _models.VmMemory]]", + "default": null, + "param_type": "keyword_only" + }, + "gpu_type": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "numa_nodes_data": { + "type": "Optional[list[_models.NumaNodeData]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "host_name": "Optional", + "effective_available_memory_mb_on_host": "Optional", + "available_gpu_count": "Optional", + "vm_used_memory": "Optional", + "gpu_type": "Optional", + "numa_nodes_data": "Optional" + } + }, + "HostPlatformType": { + "type": "Enum", + "methods": {}, + "properties": { + "KUBERNETES_CLUSTER": "KUBERNETES_CLUSTER", + "LINUX_VM": "LINUX_VM" + } + }, + "ImageRepositoryCredential": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "image_repository_url": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "user_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "password": { + "type": "Optional[_models.AsymmetricEncryptedSecret]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "image_repository_url": null, + "user_name": null, + "password": "Optional" + } + }, + "InstallRebootBehavior": { + "type": "Enum", + "methods": {}, + "properties": { + "NEVER_REBOOTS": "NEVER_REBOOTS", + "REQUEST_REBOOT": "REQUEST_REBOOT", + "REQUIRES_REBOOT": "REQUIRES_REBOOT" + } + }, + "InstallationImpact": { + "type": "Enum", + "methods": {}, + "properties": { + "DEVICE_REBOOTED": "DEVICE_REBOOTED", + "KUBERNETES_WORKLOADS_DOWN": "KUBERNETES_WORKLOADS_DOWN", + "NONE": "NONE" + } + }, + "IoTAddon": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.IoTAddonProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "IoTAddonProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "io_t_device_details": { + "type": "_models.IoTDeviceInfo", + "default": null, + "param_type": "keyword_only" + }, + "io_t_edge_device_details": { + "type": "_models.IoTDeviceInfo", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "io_t_device_details": null, + "io_t_edge_device_details": null, + "version": "Optional", + "host_platform": "Optional", + "host_platform_type": "Optional", + "provisioning_state": "Optional" + } + }, + "IoTDeviceInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "device_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "io_t_host_hub": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "io_t_host_hub_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication": { + "type": "Optional[_models.Authentication]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "device_id": null, + "io_t_host_hub": null, + "io_t_host_hub_id": "Optional", + "authentication": "Optional" + } + }, + "IoTEdgeAgentInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "image_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "image_repository": { + "type": "Optional[_models.ImageRepositoryCredential]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "image_name": null, + "tag": null, + "image_repository": "Optional" + } + }, + "IoTRole": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.IoTRoleProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "IoTRoleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "host_platform": { + "type": "Union[str, _models.PlatformType]", + "default": null, + "param_type": "keyword_only" + }, + "io_t_device_details": { + "type": "_models.IoTDeviceInfo", + "default": null, + "param_type": "keyword_only" + }, + "io_t_edge_device_details": { + "type": "_models.IoTDeviceInfo", + "default": null, + "param_type": "keyword_only" + }, + "role_status": { + "type": "Union[str, _models.RoleStatus]", + "default": null, + "param_type": "keyword_only" + }, + "share_mappings": { + "type": "Optional[list[_models.MountPointMap]]", + "default": null, + "param_type": "keyword_only" + }, + "io_t_edge_agent_info": { + "type": "Optional[_models.IoTEdgeAgentInfo]", + "default": null, + "param_type": "keyword_only" + }, + "compute_resource": { + "type": "Optional[_models.ComputeResource]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "host_platform": "Union", + "io_t_device_details": null, + "io_t_edge_device_details": null, + "share_mappings": "Optional", + "io_t_edge_agent_info": "Optional", + "host_platform_type": "Optional", + "compute_resource": "Optional", + "role_status": "Union" + } + }, + "Ipv4Config": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "ip_address": "Optional", + "subnet": "Optional", + "gateway": "Optional" + } + }, + "Ipv6Config": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "ip_address": "Optional", + "prefix_length": "Optional", + "gateway": "Optional" + } + }, + "Job": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.JobProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "status": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "percent_complete": "Optional", + "error": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "JobErrorDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "error_details": "Optional", + "code": "Optional", + "message": "Optional" + } + }, + "JobErrorItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "recommendations": "Optional", + "code": "Optional", + "message": "Optional" + } + }, + "JobProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "folder": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "job_type": "Optional", + "current_stage": "Optional", + "download_progress": "Optional", + "install_progress": "Optional", + "total_refresh_errors": "Optional", + "error_manifest_file": "Optional", + "refreshed_entity_id": "Optional", + "folder": "Optional" + } + }, + "JobStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "CANCELED": "CANCELED", + "FAILED": "FAILED", + "INVALID": "INVALID", + "PAUSED": "PAUSED", + "RUNNING": "RUNNING", + "SCHEDULED": "SCHEDULED", + "SUCCEEDED": "SUCCEEDED" + } + }, + "JobType": { + "type": "Enum", + "methods": {}, + "properties": { + "BACKUP": "BACKUP", + "DOWNLOAD_UPDATES": "DOWNLOAD_UPDATES", + "INSTALL_UPDATES": "INSTALL_UPDATES", + "INVALID": "INVALID", + "REFRESH_CONTAINER": "REFRESH_CONTAINER", + "REFRESH_SHARE": "REFRESH_SHARE", + "RESTORE": "RESTORE", + "SCAN_FOR_UPDATES": "SCAN_FOR_UPDATES", + "TRIGGER_SUPPORT_PACKAGE": "TRIGGER_SUPPORT_PACKAGE" + } + }, + "KeyVaultSyncStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "KEY_VAULT_NOT_CONFIGURED": "KEY_VAULT_NOT_CONFIGURED", + "KEY_VAULT_NOT_SYNCED": "KEY_VAULT_NOT_SYNCED", + "KEY_VAULT_SYNCED": "KEY_VAULT_SYNCED", + "KEY_VAULT_SYNCING": "KEY_VAULT_SYNCING", + "KEY_VAULT_SYNC_FAILED": "KEY_VAULT_SYNC_FAILED", + "KEY_VAULT_SYNC_PENDING": "KEY_VAULT_SYNC_PENDING" + } + }, + "KubernetesClusterInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "version": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "etcd_info": "Optional", + "nodes": "Optional", + "version": null + } + }, + "KubernetesIPConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_address": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "port": "Optional", + "ip_address": "Optional" + } + }, + "KubernetesNodeType": { + "type": "Enum", + "methods": {}, + "properties": { + "INVALID": "INVALID", + "MASTER": "MASTER", + "WORKER": "WORKER" + } + }, + "KubernetesRole": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.KubernetesRoleProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "KubernetesRoleCompute": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "vm_profile": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "vm_profile": null, + "memory_in_bytes": "Optional", + "processor_count": "Optional" + } + }, + "KubernetesRoleNetwork": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "cni_config": "Optional", + "load_balancer_config": "Optional" + } + }, + "KubernetesRoleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "host_platform": { + "type": "Union[str, _models.PlatformType]", + "default": null, + "param_type": "keyword_only" + }, + "kubernetes_cluster_info": { + "type": "_models.KubernetesClusterInfo", + "default": null, + "param_type": "keyword_only" + }, + "kubernetes_role_resources": { + "type": "_models.KubernetesRoleResources", + "default": null, + "param_type": "keyword_only" + }, + "role_status": { + "type": "Union[str, _models.RoleStatus]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "host_platform": "Union", + "provisioning_state": "Optional", + "host_platform_type": "Optional", + "kubernetes_cluster_info": null, + "kubernetes_role_resources": null, + "role_status": "Union" + } + }, + "KubernetesRoleResources": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "compute": { + "type": "_models.KubernetesRoleCompute", + "default": null, + "param_type": "keyword_only" + }, + "storage": { + "type": "Optional[_models.KubernetesRoleStorage]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "storage": "Optional", + "compute": null, + "network": "Optional" + } + }, + "KubernetesRoleStorage": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoints": { + "type": "Optional[list[_models.MountPointMap]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "storage_classes": "Optional", + "endpoints": "Optional" + } + }, + "KubernetesRoleStorageClassInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "type": "Optional", + "posix_compliant": "Optional" + } + }, + "KubernetesState": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATED": "CREATED", + "CREATING": "CREATING", + "DELETING": "DELETING", + "FAILED": "FAILED", + "INVALID": "INVALID", + "RECONFIGURING": "RECONFIGURING", + "UPDATING": "UPDATING" + } + }, + "LoadBalancerConfig": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_range": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "version": "Optional", + "ip_range": "Optional" + } + }, + "MECRole": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.MECRoleProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "MECRoleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "role_status": { + "type": "Union[str, _models.RoleStatus]", + "default": null, + "param_type": "keyword_only" + }, + "connection_string": { + "type": "Optional[_models.AsymmetricEncryptedSecret]", + "default": null, + "param_type": "keyword_only" + }, + "controller_endpoint": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_unique_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "connection_string": "Optional", + "controller_endpoint": "Optional", + "resource_unique_id": "Optional", + "role_status": "Union" + } + }, + "MetricAggregationType": { + "type": "Enum", + "methods": {}, + "properties": { + "AVERAGE": "AVERAGE", + "COUNT": "COUNT", + "MAXIMUM": "MAXIMUM", + "MINIMUM": "MINIMUM", + "NONE": "NONE", + "NOT_SPECIFIED": "NOT_SPECIFIED", + "TOTAL": "TOTAL" + } + }, + "MetricCategory": { + "type": "Enum", + "methods": {}, + "properties": { + "CAPACITY": "CAPACITY", + "TRANSACTION": "TRANSACTION" + } + }, + "MetricConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "counter_sets": { + "type": "list[_models.MetricCounterSet]", + "default": null, + "param_type": "keyword_only" + }, + "mdm_account": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "metric_name_space": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "resource_id": null, + "mdm_account": "Optional", + "metric_name_space": "Optional", + "counter_sets": "list" + } + }, + "MetricCounter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "instance": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "dimension_filter": { + "type": "Optional[list[_models.MetricDimension]]", + "default": null, + "param_type": "keyword_only" + }, + "additional_dimensions": { + "type": "Optional[list[_models.MetricDimension]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": null, + "instance": "Optional", + "dimension_filter": "Optional", + "additional_dimensions": "Optional" + } + }, + "MetricCounterSet": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "counters": { + "type": "list[_models.MetricCounter]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "counters": "list" + } + }, + "MetricDimension": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "source_type": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "source_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "source_type": null, + "source_name": null + } + }, + "MetricDimension_V1": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "to_be_exported_for_shoebox": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "display_name": "Optional", + "to_be_exported_for_shoebox": "Optional" + } + }, + "MetricSpecification_V1": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display_description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "unit": { + "type": "Optional[Union[str, _models.MetricUnit]]", + "default": null, + "param_type": "keyword_only" + }, + "aggregation_type": { + "type": "Optional[Union[str, _models.MetricAggregationType]]", + "default": null, + "param_type": "keyword_only" + }, + "dimensions": { + "type": "Optional[list[_models.MetricDimension_V1]]", + "default": null, + "param_type": "keyword_only" + }, + "fill_gap_with_zero": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "category": { + "type": "Optional[Union[str, _models.MetricCategory]]", + "default": null, + "param_type": "keyword_only" + }, + "resource_id_dimension_name_override": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "supported_time_grain_types": { + "type": "Optional[list[Union[str, _models.TimeGrain]]]", + "default": null, + "param_type": "keyword_only" + }, + "supported_aggregation_types": { + "type": "Optional[list[Union[str, _models.MetricAggregationType]]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "display_name": "Optional", + "display_description": "Optional", + "unit": "Optional", + "aggregation_type": "Optional", + "dimensions": "Optional", + "fill_gap_with_zero": "Optional", + "category": "Optional", + "resource_id_dimension_name_override": "Optional", + "supported_time_grain_types": "Optional", + "supported_aggregation_types": "Optional" + } + }, + "MetricUnit": { + "type": "Enum", + "methods": {}, + "properties": { + "BYTES": "BYTES", + "BYTES_PER_SECOND": "BYTES_PER_SECOND", + "COUNT": "COUNT", + "COUNT_PER_SECOND": "COUNT_PER_SECOND", + "MILLISECONDS": "MILLISECONDS", + "NOT_SPECIFIED": "NOT_SPECIFIED", + "PERCENT": "PERCENT", + "SECONDS": "SECONDS" + } + }, + "MonitoringMetricConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.MonitoringMetricConfigurationProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "MonitoringMetricConfigurationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "metric_configurations": { + "type": "list[_models.MetricConfiguration]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "metric_configurations": "list" + } + }, + "MonitoringStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED" + } + }, + "MountPointMap": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "share_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "share_id": null, + "role_id": "Optional", + "mount_point": "Optional", + "mount_type": "Optional", + "role_type": "Optional" + } + }, + "MountType": { + "type": "Enum", + "methods": {}, + "properties": { + "HOST_PATH": "HOST_PATH", + "VOLUME": "VOLUME" + } + }, + "MsiIdentityType": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "SYSTEM_ASSIGNED": "SYSTEM_ASSIGNED", + "USER_ASSIGNED": "USER_ASSIGNED" + } + }, + "NetworkAdapter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "rdma_status": { + "type": "Optional[Union[str, _models.NetworkAdapterRDMAStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "dhcp_status": { + "type": "Optional[Union[str, _models.NetworkAdapterDHCPStatus]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "adapter_id": "Optional", + "adapter_position": "Optional", + "index": "Optional", + "node_id": "Optional", + "network_adapter_name": "Optional", + "label": "Optional", + "mac_address": "Optional", + "link_speed": "Optional", + "status": "Optional", + "rdma_status": "Optional", + "dhcp_status": "Optional", + "ipv4_configuration": "Optional", + "ipv6_configuration": "Optional", + "ipv6_link_local_address": "Optional", + "dns_servers": "Optional" + } + }, + "NetworkAdapterDHCPStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED" + } + }, + "NetworkAdapterPosition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "network_group": "Optional", + "port": "Optional" + } + }, + "NetworkAdapterRDMAStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "CAPABLE": "CAPABLE", + "INCAPABLE": "INCAPABLE" + } + }, + "NetworkAdapterStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "ACTIVE": "ACTIVE", + "INACTIVE": "INACTIVE" + } + }, + "NetworkGroup": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "NON_RDMA": "NON_RDMA", + "RDMA": "RDMA" + } + }, + "NetworkSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "NetworkSettingsProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "network_adapters": "Optional" + } + }, + "Node": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional" + } + }, + "NodeInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "ip_configuration": { + "type": "Optional[list[_models.KubernetesIPConfiguration]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "type": "Optional", + "ip_configuration": "Optional" + } + }, + "NodeProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "node_status": "Optional", + "node_chassis_serial_number": "Optional", + "node_serial_number": "Optional", + "node_display_name": "Optional", + "node_friendly_software_version": "Optional", + "node_hcs_version": "Optional", + "node_instance_id": "Optional" + } + }, + "NodeStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "DOWN": "DOWN", + "REBOOTING": "REBOOTING", + "SHUTTING_DOWN": "SHUTTING_DOWN", + "UNKNOWN": "UNKNOWN", + "UP": "UP" + } + }, + "NumaNodeData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "numa_node_index": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "total_memory_in_mb": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "logical_core_count_per_core": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "effective_available_memory_in_mb": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "free_v_cpu_indexes_for_hpn": { + "type": "Optional[list[int]]", + "default": null, + "param_type": "keyword_only" + }, + "v_cpu_indexes_for_hpn": { + "type": "Optional[list[int]]", + "default": null, + "param_type": "keyword_only" + }, + "v_cpu_indexes_for_root": { + "type": "Optional[list[int]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "numa_node_index": "Optional", + "total_memory_in_mb": "Optional", + "logical_core_count_per_core": "Optional", + "effective_available_memory_in_mb": "Optional", + "free_v_cpu_indexes_for_hpn": "Optional", + "v_cpu_indexes_for_hpn": "Optional", + "v_cpu_indexes_for_root": "Optional" + } + }, + "Operation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_data_action": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "display": { + "type": "Optional[_models.OperationDisplay]", + "default": null, + "param_type": "keyword_only" + }, + "origin": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.OperationProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "is_data_action": "Optional", + "display": "Optional", + "origin": "Optional", + "properties": "Optional" + } + }, + "OperationDisplay": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "provider": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "operation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provider": "Optional", + "resource": "Optional", + "operation": "Optional", + "description": "Optional" + } + }, + "OperationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "service_specification": { + "type": "Optional[_models.ServiceSpecification]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "service_specification": "Optional" + } + }, + "Order": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.OrderProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "OrderProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "contact_information": { + "type": "_models.ContactDetails", + "default": null, + "param_type": "keyword_only" + }, + "shipping_address": { + "type": "Optional[_models.Address]", + "default": null, + "param_type": "keyword_only" + }, + "shipment_type": { + "type": "Optional[Union[str, _models.ShipmentType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "order_id": "Optional", + "contact_information": null, + "shipping_address": "Optional", + "current_status": "Optional", + "order_history": "Optional", + "serial_number": "Optional", + "delivery_tracking_info": "Optional", + "return_tracking_info": "Optional", + "shipment_type": "Optional" + } + }, + "OrderState": { + "type": "Enum", + "methods": {}, + "properties": { + "ARRIVING": "ARRIVING", + "AWAITING_DROP": "AWAITING_DROP", + "AWAITING_FULFILLMENT": "AWAITING_FULFILLMENT", + "AWAITING_PICKUP": "AWAITING_PICKUP", + "AWAITING_PREPARATION": "AWAITING_PREPARATION", + "AWAITING_RETURN_SHIPMENT": "AWAITING_RETURN_SHIPMENT", + "AWAITING_SHIPMENT": "AWAITING_SHIPMENT", + "COLLECTED_AT_MICROSOFT": "COLLECTED_AT_MICROSOFT", + "DECLINED": "DECLINED", + "DELIVERED": "DELIVERED", + "LOST_DEVICE": "LOST_DEVICE", + "PICKUP_COMPLETED": "PICKUP_COMPLETED", + "REPLACEMENT_REQUESTED": "REPLACEMENT_REQUESTED", + "RETURN_INITIATED": "RETURN_INITIATED", + "SHIPPED": "SHIPPED", + "SHIPPED_BACK": "SHIPPED_BACK", + "UNTRACKED": "UNTRACKED" + } + }, + "OrderStatus": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "Union[str, _models.OrderState]", + "default": null, + "param_type": "keyword_only" + }, + "comments": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "status": "Union", + "update_date_time": "Optional", + "comments": "Optional", + "tracking_information": "Optional", + "additional_order_details": "Optional" + } + }, + "PeriodicTimerEventTrigger": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.PeriodicTimerProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PeriodicTimerProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "source_info": { + "type": "_models.PeriodicTimerSourceInfo", + "default": null, + "param_type": "keyword_only" + }, + "sink_info": { + "type": "_models.RoleSinkInfo", + "default": null, + "param_type": "keyword_only" + }, + "custom_context_tag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "source_info": null, + "sink_info": null, + "custom_context_tag": "Optional" + } + }, + "PeriodicTimerSourceInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "start_time": { + "type": "datetime", + "default": null, + "param_type": "keyword_only" + }, + "schedule": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "topic": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "start_time": "datetime", + "schedule": null, + "topic": "Optional" + } + }, + "PlatformType": { + "type": "Enum", + "methods": {}, + "properties": { + "LINUX": "LINUX", + "WINDOWS": "WINDOWS" + } + }, + "PosixComplianceStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "INVALID": "INVALID" + } + }, + "ProactiveDiagnosticsConsent": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED" + } + }, + "ProactiveLogCollectionSettingsProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "user_consent": { + "type": "Union[str, _models.ProactiveDiagnosticsConsent]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "user_consent": "Union" + } + }, + "ProxyResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "RawCertificateData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "authentication_type": { + "type": "Optional[Union[str, _models.AuthenticationType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "authentication_type": "Optional", + "certificate": null + } + }, + "RefreshDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "in_progress_refresh_job_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "last_completed_refresh_job_time_in_utc": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "error_manifest_file": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "last_job": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "in_progress_refresh_job_id": "Optional", + "last_completed_refresh_job_time_in_utc": "Optional", + "error_manifest_file": "Optional", + "last_job": "Optional" + } + }, + "RemoteApplicationType": { + "type": "Enum", + "methods": {}, + "properties": { + "ALL_APPLICATIONS": "ALL_APPLICATIONS", + "LOCAL_UI": "LOCAL_UI", + "POWERSHELL": "POWERSHELL", + "WAC": "WAC" + } + }, + "RemoteSupportSettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "remote_application_type": { + "type": "Optional[Union[str, _models.RemoteApplicationType]]", + "default": null, + "param_type": "keyword_only" + }, + "access_level": { + "type": "Optional[Union[str, _models.AccessLevel]]", + "default": null, + "param_type": "keyword_only" + }, + "expiration_time_stamp_in_utc": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "remote_application_type": "Optional", + "access_level": "Optional", + "expiration_time_stamp_in_utc": "Optional" + } + }, + "Resource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ResourceIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.MsiIdentityType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "principal_id": "Optional", + "tenant_id": "Optional" + } + }, + "ResourceMoveDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_in_progress": { + "type": "Optional[Union[str, _models.ResourceMoveStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "operation_in_progress_lock_timeout_in_utc": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "operation_in_progress": "Optional", + "operation_in_progress_lock_timeout_in_utc": "Optional" + } + }, + "ResourceMoveStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "RESOURCE_MOVE_FAILED": "RESOURCE_MOVE_FAILED", + "RESOURCE_MOVE_IN_PROGRESS": "RESOURCE_MOVE_IN_PROGRESS" + } + }, + "Role": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "RoleSinkInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "role_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "role_id": null + } + }, + "RoleStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED" + } + }, + "RoleTypes": { + "type": "Enum", + "methods": {}, + "properties": { + "ASA": "ASA", + "CLOUD_EDGE_MANAGEMENT": "CLOUD_EDGE_MANAGEMENT", + "COGNITIVE": "COGNITIVE", + "FUNCTIONS": "FUNCTIONS", + "IOT": "IOT", + "KUBERNETES": "KUBERNETES", + "MEC": "MEC" + } + }, + "SSLStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED" + } + }, + "Secret": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "encrypted_secret": { + "type": "Optional[_models.AsymmetricEncryptedSecret]", + "default": null, + "param_type": "keyword_only" + }, + "key_vault_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "encrypted_secret": "Optional", + "key_vault_id": "Optional" + } + }, + "SecuritySettings": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.SecuritySettingsProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional" + } + }, + "SecuritySettingsProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "device_admin_password": { + "type": "_models.AsymmetricEncryptedSecret", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "device_admin_password": null + } + }, + "ServiceSpecification": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "metric_specifications": { + "type": "Optional[list[_models.MetricSpecification_V1]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "metric_specifications": "Optional" + } + }, + "Share": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.ShareProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ShareAccessProtocol": { + "type": "Enum", + "methods": {}, + "properties": { + "NFS": "NFS", + "SMB": "SMB" + } + }, + "ShareAccessRight": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "share_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "access_type": { + "type": "Union[str, _models.ShareAccessType]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "share_id": null, + "access_type": "Union" + } + }, + "ShareAccessType": { + "type": "Enum", + "methods": {}, + "properties": { + "CHANGE": "CHANGE", + "CUSTOM": "CUSTOM", + "READ": "READ" + } + }, + "ShareProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "share_status": { + "type": "Union[str, _models.ShareStatus]", + "default": null, + "param_type": "keyword_only" + }, + "monitoring_status": { + "type": "Union[str, _models.MonitoringStatus]", + "default": null, + "param_type": "keyword_only" + }, + "access_protocol": { + "type": "Union[str, _models.ShareAccessProtocol]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "azure_container_info": { + "type": "Optional[_models.AzureContainerInfo]", + "default": null, + "param_type": "keyword_only" + }, + "user_access_rights": { + "type": "Optional[list[_models.UserAccessRight]]", + "default": null, + "param_type": "keyword_only" + }, + "client_access_rights": { + "type": "Optional[list[_models.ClientAccessRight]]", + "default": null, + "param_type": "keyword_only" + }, + "refresh_details": { + "type": "Optional[_models.RefreshDetails]", + "default": null, + "param_type": "keyword_only" + }, + "data_policy": { + "type": "Optional[Union[str, _models.DataPolicy]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": "Optional", + "share_status": "Union", + "monitoring_status": "Union", + "azure_container_info": "Optional", + "access_protocol": "Union", + "user_access_rights": "Optional", + "client_access_rights": "Optional", + "refresh_details": "Optional", + "share_mappings": "Optional", + "data_policy": "Optional" + } + }, + "ShareStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "NEEDS_ATTENTION": "NEEDS_ATTENTION", + "OFFLINE": "OFFLINE", + "OK": "OK", + "UNKNOWN": "UNKNOWN", + "UPDATING": "UPDATING" + } + }, + "ShipmentType": { + "type": "Enum", + "methods": {}, + "properties": { + "NOT_APPLICABLE": "NOT_APPLICABLE", + "SELF_PICKUP": "SELF_PICKUP", + "SHIPPED_TO_CUSTOMER": "SHIPPED_TO_CUSTOMER" + } + }, + "Sku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[Union[str, _models.SkuName]]", + "default": null, + "param_type": "keyword_only" + }, + "tier": { + "type": "Optional[Union[str, _models.SkuTier]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "tier": "Optional" + } + }, + "SkuAvailability": { + "type": "Enum", + "methods": {}, + "properties": { + "AVAILABLE": "AVAILABLE", + "UNAVAILABLE": "UNAVAILABLE" + } + }, + "SkuCapability": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "value": "Optional" + } + }, + "SkuCost": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "meter_id": "Optional", + "quantity": "Optional", + "extended_unit": "Optional" + } + }, + "SkuLocationInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "location": "Optional", + "zones": "Optional", + "sites": "Optional" + } + }, + "SkuName": { + "type": "Enum", + "methods": {}, + "properties": { + "EDGE": "EDGE", + "EDGE_MR_MINI": "EDGE_MR_MINI", + "EDGE_MR_TCP": "EDGE_MR_TCP", + "EDGE_PR_BASE": "EDGE_PR_BASE", + "EDGE_PR_BASE_UPS": "EDGE_PR_BASE_UPS", + "EDGE_P_BASE": "EDGE_P_BASE", + "EDGE_P_HIGH": "EDGE_P_HIGH", + "EP2_128_1_T4_MX1_W": "EP2_128_1_T4_MX1_W", + "EP2_128_GPU1_MX1_W": "EP2_128_GPU1_MX1_W", + "EP2_256_2T4_W": "EP2_256_2T4_W", + "EP2_256_GPU2_MX1": "EP2_256_GPU2_MX1", + "EP2_64_1VPU_W": "EP2_64_1VPU_W", + "EP2_64_MX1_W": "EP2_64_MX1_W", + "GATEWAY": "GATEWAY", + "GPU": "GPU", + "MANAGEMENT": "MANAGEMENT", + "RCA_LARGE": "RCA_LARGE", + "RCA_SMALL": "RCA_SMALL", + "RDC": "RDC", + "TCA_LARGE": "TCA_LARGE", + "TCA_SMALL": "TCA_SMALL", + "TDC": "TDC", + "TEA1_NODE": "TEA1_NODE", + "TEA1_NODE_HEATER": "TEA1_NODE_HEATER", + "TEA1_NODE_UPS": "TEA1_NODE_UPS", + "TEA1_NODE_UPS_HEATER": "TEA1_NODE_UPS_HEATER", + "TEA4_NODE_HEATER": "TEA4_NODE_HEATER", + "TEA4_NODE_UPS_HEATER": "TEA4_NODE_UPS_HEATER", + "TMA": "TMA" + } + }, + "SkuSignupOption": { + "type": "Enum", + "methods": {}, + "properties": { + "AVAILABLE": "AVAILABLE", + "NONE": "NONE" + } + }, + "SkuTier": { + "type": "Enum", + "methods": {}, + "properties": { + "STANDARD": "STANDARD" + } + }, + "SkuVersion": { + "type": "Enum", + "methods": {}, + "properties": { + "PREVIEW": "PREVIEW", + "STABLE": "STABLE" + } + }, + "StorageAccount": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.StorageAccountProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "StorageAccountCredential": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.StorageAccountCredentialProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "StorageAccountCredentialProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "alias": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "ssl_status": { + "type": "Union[str, _models.SSLStatus]", + "default": null, + "param_type": "keyword_only" + }, + "account_type": { + "type": "Union[str, _models.AccountType]", + "default": null, + "param_type": "keyword_only" + }, + "user_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "account_key": { + "type": "Optional[_models.AsymmetricEncryptedSecret]", + "default": null, + "param_type": "keyword_only" + }, + "connection_string": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "blob_domain_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "storage_account_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "alias": null, + "user_name": "Optional", + "account_key": "Optional", + "connection_string": "Optional", + "ssl_status": "Union", + "blob_domain_name": "Optional", + "account_type": "Union", + "storage_account_id": "Optional" + } + }, + "StorageAccountProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "data_policy": { + "type": "Union[str, _models.DataPolicy]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "storage_account_status": { + "type": "Optional[Union[str, _models.StorageAccountStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "storage_account_credential_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "description": "Optional", + "storage_account_status": "Optional", + "data_policy": "Union", + "storage_account_credential_id": "Optional", + "blob_endpoint": "Optional", + "container_count": "Optional" + } + }, + "StorageAccountStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "NEEDS_ATTENTION": "NEEDS_ATTENTION", + "OFFLINE": "OFFLINE", + "OK": "OK", + "UNKNOWN": "UNKNOWN", + "UPDATING": "UPDATING" + } + }, + "SubscriptionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tenant_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "location_placement_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "quota_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "serialized_details": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "registered_features": { + "type": "Optional[list[_models.SubscriptionRegisteredFeatures]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tenant_id": "Optional", + "location_placement_id": "Optional", + "quota_id": "Optional", + "serialized_details": "Optional", + "registered_features": "Optional" + } + }, + "SubscriptionRegisteredFeatures": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "state": "Optional" + } + }, + "SubscriptionState": { + "type": "Enum", + "methods": {}, + "properties": { + "DELETED": "DELETED", + "REGISTERED": "REGISTERED", + "SUSPENDED": "SUSPENDED", + "UNREGISTERED": "UNREGISTERED", + "WARNED": "WARNED" + } + }, + "SupportPackageRequestProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "minimum_time_stamp": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "maximum_time_stamp": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "include": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "minimum_time_stamp": "Optional", + "maximum_time_stamp": "Optional", + "include": "Optional" + } + }, + "SymmetricKey": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "connection_string": { + "type": "Optional[_models.AsymmetricEncryptedSecret]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "connection_string": "Optional" + } + }, + "SystemData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "created_by": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "created_by_type": { + "type": "Optional[Union[str, _models.CreatedByType]]", + "default": null, + "param_type": "keyword_only" + }, + "created_at": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_by": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_by_type": { + "type": "Optional[Union[str, _models.CreatedByType]]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_at": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "created_by": "Optional", + "created_by_type": "Optional", + "created_at": "Optional", + "last_modified_by": "Optional", + "last_modified_by_type": "Optional", + "last_modified_at": "Optional" + } + }, + "TimeGrain": { + "type": "Enum", + "methods": {}, + "properties": { + "PT12H": "PT12H", + "PT15M": "PT15M", + "PT1D": "PT1D", + "PT1H": "PT1H", + "PT1M": "PT1M", + "PT30M": "PT30M", + "PT5M": "PT5M", + "PT6H": "PT6H" + } + }, + "TrackedResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "TrackingInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "serial_number": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "carrier_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "tracking_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "tracking_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "serial_number": "Optional", + "carrier_name": "Optional", + "tracking_id": "Optional", + "tracking_url": "Optional" + } + }, + "Trigger": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "TriggerEventType": { + "type": "Enum", + "methods": {}, + "properties": { + "FILE_EVENT": "FILE_EVENT", + "PERIODIC_TIMER_EVENT": "PERIODIC_TIMER_EVENT" + } + }, + "TriggerSupportPackageRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.SupportPackageRequestProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional" + } + }, + "UpdateDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "update_title": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "update_size": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "update_type": { + "type": "Optional[Union[str, _models.UpdateType]]", + "default": null, + "param_type": "keyword_only" + }, + "target_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "friendly_version_number": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "estimated_install_time_in_mins": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "reboot_behavior": { + "type": "Optional[Union[str, _models.InstallRebootBehavior]]", + "default": null, + "param_type": "keyword_only" + }, + "installation_impact": { + "type": "Optional[Union[str, _models.InstallationImpact]]", + "default": null, + "param_type": "keyword_only" + }, + "status": { + "type": "Optional[Union[str, _models.UpdateStatus]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "update_title": "Optional", + "update_size": "Optional", + "update_type": "Optional", + "target_version": "Optional", + "friendly_version_number": "Optional", + "estimated_install_time_in_mins": "Optional", + "reboot_behavior": "Optional", + "installation_impact": "Optional", + "status": "Optional" + } + }, + "UpdateDownloadProgress": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "download_phase": "Optional", + "percent_complete": "Optional", + "total_bytes_to_download": "Optional", + "total_bytes_downloaded": "Optional", + "number_of_updates_to_download": "Optional", + "number_of_updates_downloaded": "Optional" + } + }, + "UpdateInstallProgress": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "percent_complete": "Optional", + "number_of_updates_to_install": "Optional", + "number_of_updates_installed": "Optional" + } + }, + "UpdateOperation": { + "type": "Enum", + "methods": {}, + "properties": { + "DOWNLOAD": "DOWNLOAD", + "INSTALL": "INSTALL", + "NONE": "NONE", + "SCAN": "SCAN" + } + }, + "UpdateOperationStage": { + "type": "Enum", + "methods": {}, + "properties": { + "DOWNLOAD_COMPLETE": "DOWNLOAD_COMPLETE", + "DOWNLOAD_FAILED": "DOWNLOAD_FAILED", + "DOWNLOAD_STARTED": "DOWNLOAD_STARTED", + "FAILURE": "FAILURE", + "INITIAL": "INITIAL", + "INSTALL_COMPLETE": "INSTALL_COMPLETE", + "INSTALL_FAILED": "INSTALL_FAILED", + "INSTALL_STARTED": "INSTALL_STARTED", + "REBOOT_INITIATED": "REBOOT_INITIATED", + "RESCAN_COMPLETE": "RESCAN_COMPLETE", + "RESCAN_FAILED": "RESCAN_FAILED", + "RESCAN_STARTED": "RESCAN_STARTED", + "SCAN_COMPLETE": "SCAN_COMPLETE", + "SCAN_FAILED": "SCAN_FAILED", + "SCAN_STARTED": "SCAN_STARTED", + "SUCCESS": "SUCCESS", + "UNKNOWN": "UNKNOWN" + } + }, + "UpdateStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "DOWNLOAD_COMPLETED": "DOWNLOAD_COMPLETED", + "DOWNLOAD_PENDING": "DOWNLOAD_PENDING", + "DOWNLOAD_STARTED": "DOWNLOAD_STARTED", + "INSTALL_COMPLETED": "INSTALL_COMPLETED", + "INSTALL_STARTED": "INSTALL_STARTED" + } + }, + "UpdateSummary": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.UpdateSummaryProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "UpdateSummaryProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "device_version_number": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "friendly_device_version_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "device_last_scanned_date_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "last_completed_scan_job_date_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "last_successful_scan_job_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "last_successful_install_job_date_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "device_version_number": "Optional", + "friendly_device_version_name": "Optional", + "device_last_scanned_date_time": "Optional", + "last_completed_scan_job_date_time": "Optional", + "last_successful_scan_job_time": "Optional", + "last_completed_download_job_date_time": "Optional", + "last_completed_download_job_id": "Optional", + "last_download_job_status": "Optional", + "last_successful_install_job_date_time": "Optional", + "last_completed_install_job_date_time": "Optional", + "last_completed_install_job_id": "Optional", + "last_install_job_status": "Optional", + "total_number_of_updates_available": "Optional", + "total_number_of_updates_pending_download": "Optional", + "total_number_of_updates_pending_install": "Optional", + "reboot_behavior": "Optional", + "ongoing_update_operation": "Optional", + "in_progress_download_job_id": "Optional", + "in_progress_install_job_id": "Optional", + "in_progress_download_job_started_date_time": "Optional", + "in_progress_install_job_started_date_time": "Optional", + "update_titles": "Optional", + "updates": "Optional", + "total_update_size_in_bytes": "Optional", + "total_time_in_minutes": "Optional" + } + }, + "UpdateType": { + "type": "Enum", + "methods": {}, + "properties": { + "FIRMWARE": "FIRMWARE", + "KUBERNETES": "KUBERNETES", + "SOFTWARE": "SOFTWARE" + } + }, + "UploadCertificateRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.RawCertificateData", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null + } + }, + "UploadCertificateResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "auth_type": { + "type": "Optional[Union[str, _models.AuthenticationType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "auth_type": "Optional", + "resource_id": "Optional", + "aad_authority": "Optional", + "aad_tenant_id": "Optional", + "service_principal_client_id": "Optional", + "service_principal_object_id": "Optional", + "azure_management_endpoint_audience": "Optional", + "aad_audience": "Optional" + } + }, + "User": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.UserProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "UserAccessRight": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "user_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "access_type": { + "type": "Union[str, _models.ShareAccessType]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "user_id": null, + "access_type": "Union" + } + }, + "UserProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "user_type": { + "type": "Union[str, _models.UserType]", + "default": null, + "param_type": "keyword_only" + }, + "encrypted_password": { + "type": "Optional[_models.AsymmetricEncryptedSecret]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "encrypted_password": "Optional", + "share_access_rights": "Optional", + "user_type": "Union" + } + }, + "UserType": { + "type": "Enum", + "methods": {}, + "properties": { + "ARM": "ARM", + "LOCAL_MANAGEMENT": "LOCAL_MANAGEMENT", + "SHARE": "SHARE" + } + }, + "VmMemory": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "startup_memory_mb": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "current_memory_usage_mb": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "startup_memory_mb": "Optional", + "current_memory_usage_mb": "Optional" + } + }, + "VmPlacementRequestResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "vm_size": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "is_feasible": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "message_code": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "vm_size": "Optional", + "is_feasible": "Optional", + "message_code": "Optional", + "message": "Optional" + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.databoxedge.operations": { + "class_nodes": { + "AddonsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "addon_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "addon": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "addon_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "addon": { + "type": "Addon", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "addon_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "addon": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "addon_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "addon": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "addon_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "addon_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_role": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AlertsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "AvailableSkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "BandwidthSchedulesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "BandwidthSchedule", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ContainersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "container_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "container": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "container_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "container": { + "type": "Container", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "container_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "container": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "container_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "container": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "container_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_refresh": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "container_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "container_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_storage_account": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "DeviceCapacityCheckOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_check_resource_creation_feasibility": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_capacity_request_info": { + "default": null, + "param_type": "positional_or_keyword" + }, + "capacity_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_capacity_request_info": { + "type": "DeviceCapacityRequestInfo", + "default": null, + "param_type": "positional_or_keyword" + }, + "capacity_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_capacity_request_info": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "capacity_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_capacity_request_info": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "capacity_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "DeviceCapacityInfoOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_device_capacity_info": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "DevicesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update_security_settings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "security_settings": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_settings": { + "type": "SecuritySettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_settings": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "security_settings": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_download_updates": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_install_updates": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_scan_for_updates": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_box_edge_device": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_box_edge_device": { + "type": "DataBoxEdgeDevice", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_box_edge_device": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_box_edge_device": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "generate_certificate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_extended_information": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_network_settings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_update_summary": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "expand": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DataBoxEdgeDevicePatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "update_extended_information": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DataBoxEdgeDeviceExtendedInfoPatch", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "upload_certificate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "UploadCertificateRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "DiagnosticSettingsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_update_diagnostic_proactive_log_collection_settings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "proactive_log_collection_settings": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "proactive_log_collection_settings": { + "type": "DiagnosticProactiveLogCollectionSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "proactive_log_collection_settings": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "proactive_log_collection_settings": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_update_diagnostic_remote_support_settings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_remote_support_settings": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_remote_support_settings": { + "type": "DiagnosticRemoteSupportSettings", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_remote_support_settings": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "diagnostic_remote_support_settings": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get_diagnostic_proactive_log_collection_settings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_diagnostic_remote_support_settings": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "JobsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "MonitoringConfigOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "monitoring_metric_configuration": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "monitoring_metric_configuration": { + "type": "MonitoringMetricConfiguration", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "monitoring_metric_configuration": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "monitoring_metric_configuration": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "NodesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "OperationsStatusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "OrdersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "order": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "order": { + "type": "Order", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "order": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "order": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_dc_access_code": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "RolesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role": { + "type": "Role", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "role": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "SharesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "share": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "share": { + "type": "Share", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "share": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "share": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_refresh": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "StorageAccountCredentialsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_credential": { + "type": "StorageAccountCredential", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_credential": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_credential": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "StorageAccountsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account": { + "type": "StorageAccount", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "SupportPackagesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_trigger_support_package": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "trigger_support_package_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "trigger_support_package_request": { + "type": "TriggerSupportPackageRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "trigger_support_package_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "trigger_support_package_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "TriggersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "trigger": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "trigger": { + "type": "Trigger", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "trigger": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "trigger": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "UsersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user": { + "type": "User", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "user": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_data_box_edge_device": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "device_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + } +} \ No newline at end of file diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/alert_get.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/alert_get.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/alert_get.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/alert_get.py index f83f54a00d1d..2ba33e322ef9 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/alert_get.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/alert_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.alerts.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/AlertGet.json +# x-ms-original-file: 2023-12-01/AlertGet.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/alert_get_all_in_device.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/alert_get_all_in_device.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/alert_get_all_in_device.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/alert_get_all_in_device.py index 11e83762f4c2..dece58677f0a 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/alert_get_all_in_device.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/alert_get_all_in_device.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.alerts.list_by_data_box_edge_device( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/AlertGetAllInDevice.json +# x-ms-original-file: 2023-12-01/AlertGetAllInDevice.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/available_skus_list.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/available_skus_list.py similarity index 79% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/available_skus_list.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/available_skus_list.py index 4a9578a978fb..4ae414b6e6f7 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/available_skus_list.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/available_skus_list.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.available_skus.list() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/AvailableSkusList.json +# x-ms-original-file: 2023-12-01/AvailableSkusList.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/bandwidth_schedule_delete.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/bandwidth_schedule_delete.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/bandwidth_schedule_delete.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/bandwidth_schedule_delete.py index 67095ae3a655..6173455868bd 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/bandwidth_schedule_delete.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/bandwidth_schedule_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.bandwidth_schedules.begin_delete( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/BandwidthScheduleDelete.json +# x-ms-original-file: 2023-12-01/BandwidthScheduleDelete.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/bandwidth_schedule_get.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/bandwidth_schedule_get.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/bandwidth_schedule_get.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/bandwidth_schedule_get.py index 955da8176b39..555964bb8139 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/bandwidth_schedule_get.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/bandwidth_schedule_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.bandwidth_schedules.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/BandwidthScheduleGet.json +# x-ms-original-file: 2023-12-01/BandwidthScheduleGet.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/bandwidth_schedule_get_all_in_device.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/bandwidth_schedule_get_all_in_device.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/bandwidth_schedule_get_all_in_device.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/bandwidth_schedule_get_all_in_device.py index e4c0b855117c..f0999f7a341b 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/bandwidth_schedule_get_all_in_device.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/bandwidth_schedule_get_all_in_device.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.bandwidth_schedules.list_by_data_box_edge_device( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/BandwidthScheduleGetAllInDevice.json +# x-ms-original-file: 2023-12-01/BandwidthScheduleGetAllInDevice.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/bandwidth_schedule_put.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/bandwidth_schedule_put.py similarity index 82% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/bandwidth_schedule_put.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/bandwidth_schedule_put.py index 4d8f67f31b65..f382b01197f4 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/bandwidth_schedule_put.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/bandwidth_schedule_put.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.bandwidth_schedules.begin_create_or_update( @@ -42,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/BandwidthSchedulePut.json +# x-ms-original-file: 2023-12-01/BandwidthSchedulePut.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/container_delete.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/container_delete.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/container_delete.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/container_delete.py index 17d3f13c87d2..298df23cc6fb 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/container_delete.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/container_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.containers.begin_delete( @@ -39,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/ContainerDelete.json +# x-ms-original-file: 2023-12-01/ContainerDelete.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/container_get.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/container_get.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/container_get.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/container_get.py index dbc3b4af0bca..eb0faccac2c9 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/container_get.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/container_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.containers.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/ContainerGet.json +# x-ms-original-file: 2023-12-01/ContainerGet.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/container_list_all_in_device.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/container_list_all_in_device.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/container_list_all_in_device.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/container_list_all_in_device.py index 2ffa06956df1..6aca2418e502 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/container_list_all_in_device.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/container_list_all_in_device.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.containers.list_by_storage_account( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/ContainerListAllInDevice.json +# x-ms-original-file: 2023-12-01/ContainerListAllInDevice.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/container_put.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/container_put.py similarity index 82% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/container_put.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/container_put.py index e0a9be283b26..a0b5744e714e 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/container_put.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/container_put.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.containers.begin_create_or_update( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/ContainerPut.json +# x-ms-original-file: 2023-12-01/ContainerPut.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/container_refresh.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/container_refresh.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/container_refresh.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/container_refresh.py index 00aa102dcf19..c11b3cb3dc3a 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/container_refresh.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/container_refresh.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.containers.begin_refresh( @@ -39,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/ContainerRefresh.json +# x-ms-original-file: 2023-12-01/ContainerRefresh.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_delete.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_delete.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_delete.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_delete.py index 254015ba192f..c461f2e6fb1a 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_delete.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.devices.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/DataBoxEdgeDeviceDelete.json +# x-ms-original-file: 2023-12-01/DataBoxEdgeDeviceDelete.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_get_by_name.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_get_by_name.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_get_by_name.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_get_by_name.py index 57c6e8397ecf..016e15d38f36 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_get_by_name.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_get_by_name.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.devices.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/DataBoxEdgeDeviceGetByName.json +# x-ms-original-file: 2023-12-01/DataBoxEdgeDeviceGetByName.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_get_by_name_with_data_residency.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_get_by_name_with_data_residency.py new file mode 100644 index 000000000000..cffce70399a4 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_get_by_name_with_data_residency.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.databoxedge import DataBoxEdgeManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-databoxedge +# USAGE + python data_box_edge_device_get_by_name_with_data_residency.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataBoxEdgeManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.devices.get( + device_name="testedgedevice", + resource_group_name="GroupForEdgeAutomation", + ) + print(response) + + +# x-ms-original-file: 2023-12-01/DataBoxEdgeDeviceGetByNameWithDataResidency.json +if __name__ == "__main__": + main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_get_by_resource_group.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_get_by_resource_group.py similarity index 79% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_get_by_resource_group.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_get_by_resource_group.py index 5d6ddb6d43cc..4f14f9f52fab 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_get_by_resource_group.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_get_by_resource_group.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.devices.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/DataBoxEdgeDeviceGetByResourceGroup.json +# x-ms-original-file: 2023-12-01/DataBoxEdgeDeviceGetByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_get_by_subscription.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_get_by_subscription.py similarity index 79% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_get_by_subscription.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_get_by_subscription.py index b87e8b08a95f..d42269d6c7ab 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_get_by_subscription.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_get_by_subscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.devices.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/DataBoxEdgeDeviceGetBySubscription.json +# x-ms-original-file: 2023-12-01/DataBoxEdgeDeviceGetBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_patch.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_patch.py similarity index 86% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_patch.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_patch.py index f3c666e56d63..cd719fc445e0 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_patch.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_patch.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.devices.update( @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/DataBoxEdgeDevicePatch.json +# x-ms-original-file: 2023-12-01/DataBoxEdgeDevicePatch.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_put.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_put.py similarity index 78% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_put.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_put.py index f11afdd47649..c05d0f0827bc 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/data_box_edge_device_put.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_put.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,17 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) - response = client.devices.begin_create_or_update( - device_name="testedgedevice", + response = client.devices.create_or_update( resource_group_name="GroupForEdgeAutomation", + device_name="testedgedevice", data_box_edge_device={"location": "WUS", "sku": {"name": "Edge", "tier": "Standard"}, "tags": {}}, - ).result() + ) print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/DataBoxEdgeDevicePut.json +# x-ms-original-file: 2023-12-01/DataBoxEdgeDevicePut.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_put_with_data_residency.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_put_with_data_residency.py new file mode 100644 index 000000000000..1597009103d3 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/data_box_edge_device_put_with_data_residency.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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.databoxedge import DataBoxEdgeManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-databoxedge +# USAGE + python data_box_edge_device_put_with_data_residency.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataBoxEdgeManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.devices.create_or_update( + resource_group_name="GroupForEdgeAutomation", + device_name="testedgedevice", + data_box_edge_device={ + "location": "WUS", + "properties": {"dataResidency": {"type": "ZoneReplication"}}, + "sku": {"name": "Edge", "tier": "Standard"}, + "tags": {}, + }, + ) + print(response) + + +# x-ms-original-file: 2023-12-01/DataBoxEdgeDevicePutWithDataResidency.json +if __name__ == "__main__": + main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/delete_addons.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/delete_addons.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/delete_addons.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/delete_addons.py index 9b57d31918ed..cfe1e007157c 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/delete_addons.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/delete_addons.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.addons.begin_delete( @@ -39,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/DeleteAddons.json +# x-ms-original-file: 2023-12-01/DeleteAddons.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/delete_monitoring_config.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/delete_monitoring_config.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/delete_monitoring_config.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/delete_monitoring_config.py index 65b61ea6089e..c6063ae52752 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/delete_monitoring_config.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/delete_monitoring_config.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.monitoring_config.begin_delete( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/DeleteMonitoringConfig.json +# x-ms-original-file: 2023-12-01/DeleteMonitoringConfig.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/device_capacity_get.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/device_capacity_get.py new file mode 100644 index 000000000000..def09f1a7297 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/device_capacity_get.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.databoxedge import DataBoxEdgeManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-databoxedge +# USAGE + python device_capacity_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataBoxEdgeManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.device_capacity_info.get_device_capacity_info( + resource_group_name="GroupForEdgeAutomation", + device_name="testedgedevice", + ) + print(response) + + +# x-ms-original-file: 2023-12-01/DeviceCapacityGet.json +if __name__ == "__main__": + main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/device_capacity_request_post.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/device_capacity_request_post.py new file mode 100644 index 000000000000..106ba34ad8e1 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/device_capacity_request_post.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.databoxedge import DataBoxEdgeManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-databoxedge +# USAGE + python device_capacity_request_post.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataBoxEdgeManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.device_capacity_check.begin_check_resource_creation_feasibility( + resource_group_name="GroupForEdgeAutomation", + device_name="testedgedevice", + device_capacity_request_info={"properties": {"vmPlacementQuery": [["Standard_D2_v2"]]}}, + ).result() + + +# x-ms-original-file: 2023-12-01/DeviceCapacityRequestPost.json +if __name__ == "__main__": + main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/download_updates_post.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/download_updates_post.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/download_updates_post.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/download_updates_post.py index d3a9f3a7d6e0..1d44a5a47cb9 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/download_updates_post.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/download_updates_post.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.devices.begin_download_updates( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/DownloadUpdatesPost.json +# x-ms-original-file: 2023-12-01/DownloadUpdatesPost.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/extended_info_post.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/extended_info_post.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/extended_info_post.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/extended_info_post.py index 545f48950291..f2402c4a8587 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/extended_info_post.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/extended_info_post.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.devices.get_extended_information( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/ExtendedInfoPost.json +# x-ms-original-file: 2023-12-01/ExtendedInfoPost.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/generate_certificate.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/generate_certificate.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/generate_certificate.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/generate_certificate.py index 593dfca58a53..73bc030f3300 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/generate_certificate.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/generate_certificate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.devices.generate_certificate( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/GenerateCertificate.json +# x-ms-original-file: 2023-12-01/GenerateCertificate.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/get_addons.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/get_addons.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/get_addons.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/get_addons.py index 907a210f41c7..30aa7b3c6be2 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/get_addons.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/get_addons.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.addons.get( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/GetAddons.json +# x-ms-original-file: 2023-12-01/GetAddons.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/get_dc_access_code.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/get_dc_access_code.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/get_dc_access_code.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/get_dc_access_code.py index e8ffbb580a74..c439199e2ed8 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/get_dc_access_code.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/get_dc_access_code.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.orders.list_dc_access_code( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/GetDCAccessCode.json +# x-ms-original-file: 2023-12-01/GetDCAccessCode.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/get_diagnostic_proactive_log_collection_settings.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/get_diagnostic_proactive_log_collection_settings.py new file mode 100644 index 000000000000..23e3b706de71 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/get_diagnostic_proactive_log_collection_settings.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.databoxedge import DataBoxEdgeManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-databoxedge +# USAGE + python get_diagnostic_proactive_log_collection_settings.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataBoxEdgeManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.diagnostic_settings.get_diagnostic_proactive_log_collection_settings( + resource_group_name="GroupForEdgeAutomation", + device_name="testedgedevice", + ) + print(response) + + +# x-ms-original-file: 2023-12-01/GetDiagnosticProactiveLogCollectionSettings.json +if __name__ == "__main__": + main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/get_diagnostic_remote_support_settings.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/get_diagnostic_remote_support_settings.py new file mode 100644 index 000000000000..eaf32a60e852 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/get_diagnostic_remote_support_settings.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.databoxedge import DataBoxEdgeManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-databoxedge +# USAGE + python get_diagnostic_remote_support_settings.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataBoxEdgeManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.diagnostic_settings.get_diagnostic_remote_support_settings( + resource_group_name="GroupForEdgeAutomation", + device_name="testedgedevice", + ) + print(response) + + +# x-ms-original-file: 2023-12-01/GetDiagnosticRemoteSupportSettings.json +if __name__ == "__main__": + main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/get_monitoring_config.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/get_monitoring_config.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/get_monitoring_config.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/get_monitoring_config.py index 0fa7be0bff74..750871eeddc5 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/get_monitoring_config.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/get_monitoring_config.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.monitoring_config.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/GetMonitoringConfig.json +# x-ms-original-file: 2023-12-01/GetMonitoringConfig.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/install_updates_post.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/install_updates_post.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/install_updates_post.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/install_updates_post.py index 0ff5604bf592..3f5a6da8e8d7 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/install_updates_post.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/install_updates_post.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.devices.begin_install_updates( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/InstallUpdatesPost.json +# x-ms-original-file: 2023-12-01/InstallUpdatesPost.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/jobs_get.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/jobs_get.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/jobs_get.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/jobs_get.py index 4f4fd0e10d2f..fd0cab833f4c 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/jobs_get.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/jobs_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.jobs.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/JobsGet.json +# x-ms-original-file: 2023-12-01/JobsGet.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/list_monitoring_config.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/list_monitoring_config.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/list_monitoring_config.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/list_monitoring_config.py index 7161a3480fe7..7fb47d5172ab 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/list_monitoring_config.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/list_monitoring_config.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.monitoring_config.list( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/ListMonitoringConfig.json +# x-ms-original-file: 2023-12-01/ListMonitoringConfig.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/network_settings_get.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/network_settings_get.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/network_settings_get.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/network_settings_get.py index b0dd7f570412..c38a1ad04e2f 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/network_settings_get.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/network_settings_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.devices.get_network_settings( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/NetworkSettingsGet.json +# x-ms-original-file: 2023-12-01/NetworkSettingsGet.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/node_get_all_in_device.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/node_get_all_in_device.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/node_get_all_in_device.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/node_get_all_in_device.py index 30e6eeae01b0..9f875d1d97b9 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/node_get_all_in_device.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/node_get_all_in_device.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.nodes.list_by_data_box_edge_device( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/NodeGetAllInDevice.json +# x-ms-original-file: 2023-12-01/NodeGetAllInDevice.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/operations_get.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/operations_get.py similarity index 83% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/operations_get.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/operations_get.py index 66dd7b05173b..256b9d6e9374 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/operations_get.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/operations_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/OperationsGet.json +# x-ms-original-file: 2023-12-01/OperationsGet.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/operations_status_get.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/operations_status_get.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/operations_status_get.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/operations_status_get.py index 8aa2e306663b..d9bd1d53e8ec 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/operations_status_get.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/operations_status_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.operations_status.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/OperationsStatusGet.json +# x-ms-original-file: 2023-12-01/OperationsStatusGet.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/order_delete.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/order_delete.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/order_delete.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/order_delete.py index bd4a2874495f..928d7ebf120b 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/order_delete.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/order_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.orders.begin_delete( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/OrderDelete.json +# x-ms-original-file: 2023-12-01/OrderDelete.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/order_get.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/order_get.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/order_get.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/order_get.py index d938e5cb367b..e9277145b4ee 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/order_get.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/order_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.orders.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/OrderGet.json +# x-ms-original-file: 2023-12-01/OrderGet.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/order_get_all_in_device.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/order_get_all_in_device.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/order_get_all_in_device.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/order_get_all_in_device.py index 2d983ec34e00..18ef5dac1c94 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/order_get_all_in_device.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/order_get_all_in_device.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.orders.list_by_data_box_edge_device( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/OrderGetAllInDevice.json +# x-ms-original-file: 2023-12-01/OrderGetAllInDevice.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/order_put.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/order_put.py similarity index 86% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/order_put.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/order_put.py index 77b44c4613ba..7fc938ccab80 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/order_put.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/order_put.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.orders.begin_create_or_update( @@ -57,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/OrderPut.json +# x-ms-original-file: 2023-12-01/OrderPut.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/put_addons.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/put_addons.py similarity index 84% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/put_addons.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/put_addons.py index 5cb268606edb..25a1bccb2269 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/put_addons.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/put_addons.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.addons.begin_create_or_update( @@ -49,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/PutAddons.json +# x-ms-original-file: 2023-12-01/PutAddons.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/put_monitoring_config.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/put_monitoring_config.py similarity index 84% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/put_monitoring_config.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/put_monitoring_config.py index fc2204ccad2b..3dda8107fdb2 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/put_monitoring_config.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/put_monitoring_config.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.monitoring_config.begin_create_or_update( @@ -51,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/PutMonitoringConfig.json +# x-ms-original-file: 2023-12-01/PutMonitoringConfig.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/role_delete.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/role_delete.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/role_delete.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/role_delete.py index 15e00fb7354b..280a4578a457 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/role_delete.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/role_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.roles.begin_delete( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/RoleDelete.json +# x-ms-original-file: 2023-12-01/RoleDelete.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/role_get.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/role_get.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/role_get.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/role_get.py index 6bfac9293c26..3c8b8e901610 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/role_get.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/role_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.roles.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/RoleGet.json +# x-ms-original-file: 2023-12-01/RoleGet.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/role_get_all_in_device.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/role_get_all_in_device.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/role_get_all_in_device.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/role_get_all_in_device.py index 834bed571a5d..16e7ed3f1373 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/role_get_all_in_device.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/role_get_all_in_device.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.roles.list_by_data_box_edge_device( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/RoleGetAllInDevice.json +# x-ms-original-file: 2023-12-01/RoleGetAllInDevice.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/role_list_add_ons.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/role_list_add_ons.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/role_list_add_ons.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/role_list_add_ons.py index 95dd4e636723..7f8e41e51fdc 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/role_list_add_ons.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/role_list_add_ons.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.addons.list_by_role( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/RoleListAddOns.json +# x-ms-original-file: 2023-12-01/RoleListAddOns.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/role_put.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/role_put.py similarity index 92% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/role_put.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/role_put.py index fcb0c9a5f3a3..11a1d8880a67 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/role_put.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/role_put.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.roles.begin_create_or_update( @@ -73,6 +73,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/RolePut.json +# x-ms-original-file: 2023-12-01/RolePut.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/sac_delete.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/sac_delete.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/sac_delete.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/sac_delete.py index f5a90b519774..409943a5c560 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/sac_delete.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/sac_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.storage_account_credentials.begin_delete( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/SACDelete.json +# x-ms-original-file: 2023-12-01/SACDelete.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/sac_get.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/sac_get.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/sac_get.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/sac_get.py index 83a164f8a86b..5eb95fa13bce 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/sac_get.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/sac_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.storage_account_credentials.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/SACGet.json +# x-ms-original-file: 2023-12-01/SACGet.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/sac_get_all_in_device.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/sac_get_all_in_device.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/sac_get_all_in_device.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/sac_get_all_in_device.py index 239d466b62e7..27ebfcdcf558 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/sac_get_all_in_device.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/sac_get_all_in_device.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.storage_account_credentials.list_by_data_box_edge_device( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/SACGetAllInDevice.json +# x-ms-original-file: 2023-12-01/SACGetAllInDevice.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/sac_put.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/sac_put.py similarity index 89% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/sac_put.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/sac_put.py index a50578c496fd..d2b3b661c822 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/sac_put.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/sac_put.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.storage_account_credentials.begin_create_or_update( @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/SACPut.json +# x-ms-original-file: 2023-12-01/SACPut.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/scan_for_updates_post.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/scan_for_updates_post.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/scan_for_updates_post.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/scan_for_updates_post.py index 3b15b3851b89..b21bb2ac2551 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/scan_for_updates_post.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/scan_for_updates_post.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.devices.begin_scan_for_updates( @@ -37,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/ScanForUpdatesPost.json +# x-ms-original-file: 2023-12-01/ScanForUpdatesPost.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/security_settings_update_post.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/security_settings_update_post.py similarity index 83% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/security_settings_update_post.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/security_settings_update_post.py index b1c9c30d16fe..19fe718d7e0c 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/security_settings_update_post.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/security_settings_update_post.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.devices.begin_create_or_update_security_settings( @@ -46,6 +45,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/SecuritySettingsUpdatePost.json +# x-ms-original-file: 2023-12-01/SecuritySettingsUpdatePost.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/share_delete.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/share_delete.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/share_delete.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/share_delete.py index 92ecd291bb4f..15a560e4b7fc 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/share_delete.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/share_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.shares.begin_delete( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/ShareDelete.json +# x-ms-original-file: 2023-12-01/ShareDelete.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/share_get.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/share_get.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/share_get.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/share_get.py index 103fcf755ecd..a8c1be1304c3 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/share_get.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/share_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.shares.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/ShareGet.json +# x-ms-original-file: 2023-12-01/ShareGet.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/share_get_all_in_device.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/share_get_all_in_device.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/share_get_all_in_device.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/share_get_all_in_device.py index 23c0c4e6bf9f..9f5e01d38db8 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/share_get_all_in_device.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/share_get_all_in_device.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.shares.list_by_data_box_edge_device( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/ShareGetAllInDevice.json +# x-ms-original-file: 2023-12-01/ShareGetAllInDevice.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/share_put.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/share_put.py similarity index 90% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/share_put.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/share_put.py index cf5d998d71d6..3e6217e5f0b0 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/share_put.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/share_put.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.shares.begin_create_or_update( @@ -59,6 +59,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/SharePut.json +# x-ms-original-file: 2023-12-01/SharePut.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/share_refresh_post.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/share_refresh_post.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/share_refresh_post.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/share_refresh_post.py index 2fe95a1bb710..e6a5ea40d933 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/share_refresh_post.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/share_refresh_post.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.shares.begin_refresh( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/ShareRefreshPost.json +# x-ms-original-file: 2023-12-01/ShareRefreshPost.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/storage_account_delete.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/storage_account_delete.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/storage_account_delete.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/storage_account_delete.py index 5b1b6dffdaf5..dfbb0e419573 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/storage_account_delete.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/storage_account_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.storage_accounts.begin_delete( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/StorageAccountDelete.json +# x-ms-original-file: 2023-12-01/StorageAccountDelete.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/storage_account_get.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/storage_account_get.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/storage_account_get.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/storage_account_get.py index 8ebc4027a7d5..dfbd6d7f81f0 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/storage_account_get.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/storage_account_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.storage_accounts.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/StorageAccountGet.json +# x-ms-original-file: 2023-12-01/StorageAccountGet.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/storage_account_get_all_in_device.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/storage_account_get_all_in_device.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/storage_account_get_all_in_device.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/storage_account_get_all_in_device.py index e4f5dadb23e0..f826ad392b25 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/storage_account_get_all_in_device.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/storage_account_get_all_in_device.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.storage_accounts.list_by_data_box_edge_device( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/StorageAccountGetAllInDevice.json +# x-ms-original-file: 2023-12-01/StorageAccountGetAllInDevice.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/storage_account_put.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/storage_account_put.py similarity index 87% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/storage_account_put.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/storage_account_put.py index 68d2892cbc5d..000dcbee864b 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/storage_account_put.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/storage_account_put.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.storage_accounts.begin_create_or_update( @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/StorageAccountPut.json +# x-ms-original-file: 2023-12-01/StorageAccountPut.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/trigger_delete.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/trigger_delete.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/trigger_delete.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/trigger_delete.py index 017dc1ef4168..1554cd9cd055 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/trigger_delete.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/trigger_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.triggers.begin_delete( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/TriggerDelete.json +# x-ms-original-file: 2023-12-01/TriggerDelete.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/trigger_get.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/trigger_get.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/trigger_get.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/trigger_get.py index df3df2819fed..4c78bcd86b6b 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/trigger_get.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/trigger_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.triggers.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/TriggerGet.json +# x-ms-original-file: 2023-12-01/TriggerGet.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/trigger_get_all_in_device.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/trigger_get_all_in_device.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/trigger_get_all_in_device.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/trigger_get_all_in_device.py index c3a42ac30a26..0dd8e40eff2e 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/trigger_get_all_in_device.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/trigger_get_all_in_device.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.triggers.list_by_data_box_edge_device( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/TriggerGetAllInDevice.json +# x-ms-original-file: 2023-12-01/TriggerGetAllInDevice.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/trigger_put.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/trigger_put.py similarity index 88% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/trigger_put.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/trigger_put.py index 4dce3202a7ed..96ac4fe165bc 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/trigger_put.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/trigger_put.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.triggers.begin_create_or_update( @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/TriggerPut.json +# x-ms-original-file: 2023-12-01/TriggerPut.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/trigger_support_package.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/trigger_support_package.py new file mode 100644 index 000000000000..eeeecfc44218 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/trigger_support_package.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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.databoxedge import DataBoxEdgeManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-databoxedge +# USAGE + python trigger_support_package.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataBoxEdgeManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.support_packages.begin_trigger_support_package( + resource_group_name="GroupForEdgeAutomation", + device_name="testedgedevice", + trigger_support_package_request={ + "properties": { + "include": "DefaultWithDumps", + "maximumTimeStamp": "2018-12-18T02:19:51.4270267Z", + "minimumTimeStamp": "2018-12-18T02:18:51.4270267Z", + } + }, + ).result() + + +# x-ms-original-file: 2023-12-01/TriggerSupportPackage.json +if __name__ == "__main__": + main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/update_diagnostic_proactive_log_collection_settings.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/update_diagnostic_proactive_log_collection_settings.py new file mode 100644 index 000000000000..33d3338e6c77 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/update_diagnostic_proactive_log_collection_settings.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.databoxedge import DataBoxEdgeManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-databoxedge +# USAGE + python update_diagnostic_proactive_log_collection_settings.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataBoxEdgeManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.diagnostic_settings.begin_update_diagnostic_proactive_log_collection_settings( + resource_group_name="GroupForEdgeAutomation", + device_name="testedgedevice", + proactive_log_collection_settings={"properties": {"userConsent": "Enabled"}}, + ).result() + print(response) + + +# x-ms-original-file: 2023-12-01/UpdateDiagnosticProactiveLogCollectionSettings.json +if __name__ == "__main__": + main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/update_diagnostic_remote_support_settings.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/update_diagnostic_remote_support_settings.py new file mode 100644 index 000000000000..2937b0ce2cd0 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/update_diagnostic_remote_support_settings.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.databoxedge import DataBoxEdgeManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-databoxedge +# USAGE + python update_diagnostic_remote_support_settings.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = DataBoxEdgeManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.diagnostic_settings.begin_update_diagnostic_remote_support_settings( + resource_group_name="GroupForEdgeAutomation", + device_name="testedgedevice", + diagnostic_remote_support_settings={ + "properties": { + "remoteSupportSettingsList": [ + { + "accessLevel": "ReadWrite", + "expirationTimeStampInUTC": "2021-07-07T00:00:00+00:00", + "remoteApplicationType": "Powershell", + } + ] + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2023-12-01/UpdateDiagnosticRemoteSupportSettings.json +if __name__ == "__main__": + main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/update_summary_get.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/update_summary_get.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/update_summary_get.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/update_summary_get.py index fc55a14a3dfa..28d3af90ba0d 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/update_summary_get.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/update_summary_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.devices.get_update_summary( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/UpdateSummaryGet.json +# x-ms-original-file: 2023-12-01/UpdateSummaryGet.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/upload_certificate_post.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/upload_certificate_post.py similarity index 90% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/upload_certificate_post.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/upload_certificate_post.py index 2e99b4c4c55b..e86bf5ae541e 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/upload_certificate_post.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/upload_certificate_post.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.devices.upload_certificate( @@ -43,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/UploadCertificatePost.json +# x-ms-original-file: 2023-12-01/UploadCertificatePost.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/user_delete.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/user_delete.py similarity index 80% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/user_delete.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/user_delete.py index 7e9bf5e0cb90..99aedc17de18 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/user_delete.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/user_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) client.users.begin_delete( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/UserDelete.json +# x-ms-original-file: 2023-12-01/UserDelete.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/user_get.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/user_get.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/user_get.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/user_get.py index 49c94ae747a7..dbaac3033411 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/user_get.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/user_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.users.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/UserGet.json +# x-ms-original-file: 2023-12-01/UserGet.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/user_get_all_in_device.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/user_get_all_in_device.py similarity index 81% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/user_get_all_in_device.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/user_get_all_in_device.py index 45af16fc9cc7..6208c0921be3 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/user_get_all_in_device.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/user_get_all_in_device.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.users.list_by_data_box_edge_device( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/UserGetAllInDevice.json +# x-ms-original-file: 2023-12-01/UserGetAllInDevice.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/user_put.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/user_put.py similarity index 84% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/user_put.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/user_put.py index 7e0997b53327..b5ce63e6563d 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/mgmt/databoxedge/user_put.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_samples/user_put.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = DataBoxEdgeManagementClient( credential=DefaultAzureCredential(), - subscription_id="4385cf00-2d3a-425a-832f-f4285b1c9dce", + subscription_id="SUBSCRIPTION_ID", ) response = client.users.begin_create_or_update( @@ -49,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/preview/2021-02-01-preview/examples/UserPut.json +# x-ms-original-file: 2023-12-01/UserPut.json if __name__ == "__main__": main() diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/conftest.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/conftest.py index 753d9257ffa2..74f8d41e86ca 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/conftest.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/conftest.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import os diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_addons_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_addons_operations.py index cfd1dd23c661..b3a32cb7b042 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_addons_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_addons_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,19 +18,6 @@ class TestDataBoxEdgeManagementAddonsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_addons_list_by_role(self, resource_group): - response = self.client.addons.list_by_role( - device_name="str", - role_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_addons_get(self, resource_group): @@ -39,7 +26,6 @@ def test_addons_get(self, resource_group): role_name="str", addon_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -55,15 +41,18 @@ def test_addons_begin_create_or_update(self, resource_group): resource_group_name=resource_group.name, addon={ "kind": "ArcForKubernetes", - "resourceGroupName": "str", - "resourceLocation": "str", - "resourceName": "str", - "subscriptionId": "str", - "hostPlatform": "str", - "hostPlatformType": "str", + "properties": { + "resourceGroupName": "str", + "resourceLocation": "str", + "resourceName": "str", + "subscriptionId": "str", + "hostPlatform": "str", + "hostPlatformType": "str", + "provisioningState": "str", + "version": "str", + }, "id": "str", "name": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -73,9 +62,7 @@ def test_addons_begin_create_or_update(self, resource_group): "lastModifiedByType": "str", }, "type": "str", - "version": "str", }, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -89,8 +76,19 @@ def test_addons_begin_delete(self, resource_group): role_name="str", addon_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_addons_list_by_role(self, resource_group): + response = self.client.addons.list_by_role( + device_name="str", + role_name="str", + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_addons_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_addons_operations_async.py index 4bcea58aa23d..a123728ab01e 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_addons_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_addons_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,19 +19,6 @@ class TestDataBoxEdgeManagementAddonsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_addons_list_by_role(self, resource_group): - response = self.client.addons.list_by_role( - device_name="str", - role_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_addons_get(self, resource_group): @@ -40,7 +27,6 @@ async def test_addons_get(self, resource_group): role_name="str", addon_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -57,15 +43,18 @@ async def test_addons_begin_create_or_update(self, resource_group): resource_group_name=resource_group.name, addon={ "kind": "ArcForKubernetes", - "resourceGroupName": "str", - "resourceLocation": "str", - "resourceName": "str", - "subscriptionId": "str", - "hostPlatform": "str", - "hostPlatformType": "str", + "properties": { + "resourceGroupName": "str", + "resourceLocation": "str", + "resourceName": "str", + "subscriptionId": "str", + "hostPlatform": "str", + "hostPlatformType": "str", + "provisioningState": "str", + "version": "str", + }, "id": "str", "name": "str", - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -75,9 +64,7 @@ async def test_addons_begin_create_or_update(self, resource_group): "lastModifiedByType": "str", }, "type": "str", - "version": "str", }, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -93,9 +80,20 @@ async def test_addons_begin_delete(self, resource_group): role_name="str", addon_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_addons_list_by_role(self, resource_group): + response = self.client.addons.list_by_role( + device_name="str", + role_name="str", + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_alerts_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_alerts_operations.py index 6ae61d5c90aa..f07648c0e4ff 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_alerts_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_alerts_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,25 +20,23 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_alerts_list_by_data_box_edge_device(self, resource_group): - response = self.client.alerts.list_by_data_box_edge_device( + def test_alerts_get(self, resource_group): + response = self.client.alerts.get( device_name="str", + name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_alerts_get(self, resource_group): - response = self.client.alerts.get( + def test_alerts_list_by_data_box_edge_device(self, resource_group): + response = self.client.alerts.list_by_data_box_edge_device( device_name="str", - name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_alerts_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_alerts_operations_async.py index 2e8eb77ad4cd..eb56ac6850e1 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_alerts_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_alerts_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,25 +21,23 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_alerts_list_by_data_box_edge_device(self, resource_group): - response = self.client.alerts.list_by_data_box_edge_device( + async def test_alerts_get(self, resource_group): + response = await self.client.alerts.get( device_name="str", + name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_alerts_get(self, resource_group): - response = await self.client.alerts.get( + async def test_alerts_list_by_data_box_edge_device(self, resource_group): + response = self.client.alerts.list_by_data_box_edge_device( device_name="str", - name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_available_skus_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_available_skus_operations.py index 01a7bedaf8dc..b39712759e8e 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_available_skus_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_available_skus_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,9 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_available_skus_list(self, resource_group): - response = self.client.available_skus.list( - api_version="2021-02-01-preview", - ) + response = self.client.available_skus.list() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_available_skus_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_available_skus_operations_async.py index 63e1619be84b..81c155f83ba5 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_available_skus_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_available_skus_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -22,9 +22,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_available_skus_list(self, resource_group): - response = self.client.available_skus.list( - api_version="2021-02-01-preview", - ) + response = self.client.available_skus.list() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_bandwidth_schedules_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_bandwidth_schedules_operations.py index 326edb43b6c0..f58751d91aee 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_bandwidth_schedules_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_bandwidth_schedules_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,18 +18,6 @@ class TestDataBoxEdgeManagementBandwidthSchedulesOperations(AzureMgmtRecordedTes def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_bandwidth_schedules_list_by_data_box_edge_device(self, resource_group): - response = self.client.bandwidth_schedules.list_by_data_box_edge_device( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_bandwidth_schedules_get(self, resource_group): @@ -37,7 +25,6 @@ def test_bandwidth_schedules_get(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -51,10 +38,7 @@ def test_bandwidth_schedules_begin_create_or_update(self, resource_group): name="str", resource_group_name=resource_group.name, parameters={ - "days": ["str"], - "rateInMbps": 0, - "start": "str", - "stop": "str", + "properties": {"days": ["str"], "rateInMbps": 0, "start": "str", "stop": "str"}, "id": "str", "name": "str", "systemData": { @@ -67,7 +51,6 @@ def test_bandwidth_schedules_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -80,8 +63,18 @@ def test_bandwidth_schedules_begin_delete(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_bandwidth_schedules_list_by_data_box_edge_device(self, resource_group): + response = self.client.bandwidth_schedules.list_by_data_box_edge_device( + device_name="str", + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_bandwidth_schedules_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_bandwidth_schedules_operations_async.py index 15ee1616ea5a..5f6db5e8f654 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_bandwidth_schedules_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_bandwidth_schedules_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,18 +19,6 @@ class TestDataBoxEdgeManagementBandwidthSchedulesOperationsAsync(AzureMgmtRecord def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_bandwidth_schedules_list_by_data_box_edge_device(self, resource_group): - response = self.client.bandwidth_schedules.list_by_data_box_edge_device( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_bandwidth_schedules_get(self, resource_group): @@ -38,7 +26,6 @@ async def test_bandwidth_schedules_get(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -53,10 +40,7 @@ async def test_bandwidth_schedules_begin_create_or_update(self, resource_group): name="str", resource_group_name=resource_group.name, parameters={ - "days": ["str"], - "rateInMbps": 0, - "start": "str", - "stop": "str", + "properties": {"days": ["str"], "rateInMbps": 0, "start": "str", "stop": "str"}, "id": "str", "name": "str", "systemData": { @@ -69,7 +53,6 @@ async def test_bandwidth_schedules_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -84,9 +67,19 @@ async def test_bandwidth_schedules_begin_delete(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_bandwidth_schedules_list_by_data_box_edge_device(self, resource_group): + response = self.client.bandwidth_schedules.list_by_data_box_edge_device( + device_name="str", + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_containers_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_containers_operations.py index 4090e853527c..ca85b8e160e4 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_containers_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_containers_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,19 +18,6 @@ class TestDataBoxEdgeManagementContainersOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_containers_list_by_storage_account(self, resource_group): - response = self.client.containers.list_by_storage_account( - device_name="str", - storage_account_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_containers_get(self, resource_group): @@ -39,7 +26,6 @@ def test_containers_get(self, resource_group): storage_account_name="str", container_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -54,17 +40,19 @@ def test_containers_begin_create_or_update(self, resource_group): container_name="str", resource_group_name=resource_group.name, container={ - "dataFormat": "str", - "containerStatus": "str", - "createdDateTime": "2020-02-20 00:00:00", + "properties": { + "dataFormat": "str", + "containerStatus": "str", + "createdDateTime": "2020-02-20 00:00:00", + "refreshDetails": { + "errorManifestFile": "str", + "inProgressRefreshJobId": "str", + "lastCompletedRefreshJobTimeInUTC": "2020-02-20 00:00:00", + "lastJob": "str", + }, + }, "id": "str", "name": "str", - "refreshDetails": { - "errorManifestFile": "str", - "inProgressRefreshJobId": "str", - "lastCompletedRefreshJobTimeInUTC": "2020-02-20 00:00:00", - "lastJob": "str", - }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -75,7 +63,6 @@ def test_containers_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -89,12 +76,23 @@ def test_containers_begin_delete(self, resource_group): storage_account_name="str", container_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_containers_list_by_storage_account(self, resource_group): + response = self.client.containers.list_by_storage_account( + device_name="str", + storage_account_name="str", + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_containers_begin_refresh(self, resource_group): @@ -103,7 +101,6 @@ def test_containers_begin_refresh(self, resource_group): storage_account_name="str", container_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_containers_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_containers_operations_async.py index bcb63a5593fa..e7c78b71fdff 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_containers_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_containers_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,19 +19,6 @@ class TestDataBoxEdgeManagementContainersOperationsAsync(AzureMgmtRecordedTestCa def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_containers_list_by_storage_account(self, resource_group): - response = self.client.containers.list_by_storage_account( - device_name="str", - storage_account_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_containers_get(self, resource_group): @@ -40,7 +27,6 @@ async def test_containers_get(self, resource_group): storage_account_name="str", container_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -56,17 +42,19 @@ async def test_containers_begin_create_or_update(self, resource_group): container_name="str", resource_group_name=resource_group.name, container={ - "dataFormat": "str", - "containerStatus": "str", - "createdDateTime": "2020-02-20 00:00:00", + "properties": { + "dataFormat": "str", + "containerStatus": "str", + "createdDateTime": "2020-02-20 00:00:00", + "refreshDetails": { + "errorManifestFile": "str", + "inProgressRefreshJobId": "str", + "lastCompletedRefreshJobTimeInUTC": "2020-02-20 00:00:00", + "lastJob": "str", + }, + }, "id": "str", "name": "str", - "refreshDetails": { - "errorManifestFile": "str", - "inProgressRefreshJobId": "str", - "lastCompletedRefreshJobTimeInUTC": "2020-02-20 00:00:00", - "lastJob": "str", - }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -77,7 +65,6 @@ async def test_containers_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -93,13 +80,24 @@ async def test_containers_begin_delete(self, resource_group): storage_account_name="str", container_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_containers_list_by_storage_account(self, resource_group): + response = self.client.containers.list_by_storage_account( + device_name="str", + storage_account_name="str", + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_containers_begin_refresh(self, resource_group): @@ -109,7 +107,6 @@ async def test_containers_begin_refresh(self, resource_group): storage_account_name="str", container_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_device_capacity_check_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_device_capacity_check_operations.py new file mode 100644 index 000000000000..6498fe213604 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_device_capacity_check_operations.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.databoxedge import DataBoxEdgeManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataBoxEdgeManagementDeviceCapacityCheckOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(DataBoxEdgeManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_device_capacity_check_begin_check_resource_creation_feasibility(self, resource_group): + response = self.client.device_capacity_check.begin_check_resource_creation_feasibility( + resource_group_name=resource_group.name, + device_name="str", + device_capacity_request_info={ + "properties": { + "vmPlacementQuery": [["str"]], + "vmPlacementResults": [ + {"isFeasible": bool, "message": "str", "messageCode": "str", "vmSize": ["str"]} + ], + } + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_device_capacity_check_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_device_capacity_check_operations_async.py new file mode 100644 index 000000000000..09cff663f834 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_device_capacity_check_operations_async.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.databoxedge.aio import DataBoxEdgeManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataBoxEdgeManagementDeviceCapacityCheckOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(DataBoxEdgeManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_device_capacity_check_begin_check_resource_creation_feasibility(self, resource_group): + response = await ( + await self.client.device_capacity_check.begin_check_resource_creation_feasibility( + resource_group_name=resource_group.name, + device_name="str", + device_capacity_request_info={ + "properties": { + "vmPlacementQuery": [["str"]], + "vmPlacementResults": [ + {"isFeasible": bool, "message": "str", "messageCode": "str", "vmSize": ["str"]} + ], + } + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_skus_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_device_capacity_info_operations.py similarity index 71% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_skus_operations.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_device_capacity_info_operations.py index f689c67c8e88..f37872361510 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_skus_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_device_capacity_info_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -14,16 +14,17 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDataBoxEdgeManagementSkusOperations(AzureMgmtRecordedTestCase): +class TestDataBoxEdgeManagementDeviceCapacityInfoOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_skus_list(self, resource_group): - response = self.client.skus.list( - api_version="2019-08-01", + def test_device_capacity_info_get_device_capacity_info(self, resource_group): + response = self.client.device_capacity_info.get_device_capacity_info( + resource_group_name=resource_group.name, + device_name="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_skus_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_device_capacity_info_operations_async.py similarity index 72% rename from sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_skus_operations_async.py rename to sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_device_capacity_info_operations_async.py index 8babaed1a677..dc7fdba4f26a 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_skus_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_device_capacity_info_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -15,16 +15,17 @@ @pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDataBoxEdgeManagementSkusOperationsAsync(AzureMgmtRecordedTestCase): +class TestDataBoxEdgeManagementDeviceCapacityInfoOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient, is_async=True) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_skus_list(self, resource_group): - response = self.client.skus.list( - api_version="2019-08-01", + async def test_device_capacity_info_get_device_capacity_info(self, resource_group): + response = await self.client.device_capacity_info.get_device_capacity_info( + resource_group_name=resource_group.name, + device_name="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_devices_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_devices_operations.py index fc7465a96953..6e2cbcbb6c9c 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_devices_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_devices_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,22 +20,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_devices_list_by_subscription(self, resource_group): - response = self.client.devices.list_by_subscription( - api_version="2021-02-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_devices_list_by_resource_group(self, resource_group): - response = self.client.devices.list_by_resource_group( + def test_devices_get_network_settings(self, resource_group): + response = self.client.devices.get_network_settings( + device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @@ -45,7 +35,6 @@ def test_devices_get(self, resource_group): response = self.client.devices.get( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -53,48 +42,63 @@ def test_devices_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_devices_begin_create_or_update(self, resource_group): - response = self.client.devices.begin_create_or_update( - device_name="str", + def test_devices_create_or_update(self, resource_group): + response = self.client.devices.create_or_update( resource_group_name=resource_group.name, + device_name="str", data_box_edge_device={ "location": "str", - "configuredRoleTypes": ["str"], - "culture": "str", - "dataBoxEdgeDeviceStatus": "str", - "description": "str", - "deviceHcsVersion": "str", - "deviceLocalCapacity": 0, - "deviceModel": "str", - "deviceSoftwareVersion": "str", - "deviceType": "str", - "edgeProfile": { - "subscription": { - "id": "str", - "locationPlacementId": "str", - "quotaId": "str", - "registeredFeatures": [{"name": "str", "state": "str"}], - "registrationDate": "str", - "registrationId": "str", - "serializedDetails": "str", - "state": "str", - "subscriptionId": "str", - "tenantId": "str", - } - }, "etag": "str", - "friendlyName": "str", "id": "str", "identity": {"principalId": "str", "tenantId": "str", "type": "str"}, "kind": "str", - "modelDescription": "str", "name": "str", - "nodeCount": 0, - "resourceMoveDetails": { - "operationInProgress": "str", - "operationInProgressLockTimeoutInUTC": "2020-02-20 00:00:00", + "properties": { + "configuredRoleTypes": ["str"], + "culture": "str", + "dataBoxEdgeDeviceStatus": "str", + "dataResidency": {"type": "str"}, + "description": "str", + "deviceHcsVersion": "str", + "deviceLocalCapacity": 0, + "deviceModel": "str", + "deviceSoftwareVersion": "str", + "deviceType": "str", + "edgeProfile": { + "subscription": { + "id": "str", + "properties": { + "locationPlacementId": "str", + "quotaId": "str", + "registeredFeatures": [{"name": "str", "state": "str"}], + "serializedDetails": "str", + "tenantId": "str", + }, + "registrationDate": "str", + "registrationId": "str", + "state": "str", + "subscriptionId": "str", + } + }, + "friendlyName": "str", + "kubernetesWorkloadProfile": "str", + "modelDescription": "str", + "nodeCount": 0, + "resourceMoveDetails": { + "operationInProgress": "str", + "operationInProgressLockTimeoutInUTC": "2020-02-20 00:00:00", + }, + "serialNumber": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "timeZone": "str", }, - "serialNumber": "str", "sku": {"name": "str", "tier": "str"}, "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -105,11 +109,25 @@ def test_devices_begin_create_or_update(self, resource_group): "lastModifiedByType": "str", }, "tags": {"str": "str"}, - "timeZone": "str", "type": "str", }, - api_version="2021-02-01-preview", - ).result() # call '.result()' to poll until service return final result + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_devices_update(self, resource_group): + response = self.client.devices.update( + device_name="str", + resource_group_name=resource_group.name, + parameters={ + "identity": {"principalId": "str", "tenantId": "str", "type": "str"}, + "properties": {"edgeProfile": {"subscription": {"id": "str"}}}, + "tags": {"str": "str"}, + }, + ) # please add some check logic here by yourself # ... @@ -120,7 +138,6 @@ def test_devices_begin_delete(self, resource_group): response = self.client.devices.begin_delete( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -128,18 +145,19 @@ def test_devices_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_devices_update(self, resource_group): - response = self.client.devices.update( - device_name="str", + def test_devices_list_by_resource_group(self, resource_group): + response = self.client.devices.list_by_resource_group( resource_group_name=resource_group.name, - parameters={ - "edgeProfile": {"subscription": {"id": "str"}}, - "identity": {"principalId": "str", "tenantId": "str", "type": "str"}, - "tags": {"str": "str"}, - }, - api_version="2021-02-01-preview", ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_devices_list_by_subscription(self, resource_group): + response = self.client.devices.list_by_subscription() + result = [r for r in response] # please add some check logic here by yourself # ... @@ -149,7 +167,6 @@ def test_devices_begin_download_updates(self, resource_group): response = self.client.devices.begin_download_updates( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -161,7 +178,6 @@ def test_devices_generate_certificate(self, resource_group): response = self.client.devices.generate_certificate( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -173,7 +189,6 @@ def test_devices_get_extended_information(self, resource_group): response = self.client.devices.get_extended_information( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -185,31 +200,17 @@ def test_devices_begin_install_updates(self, resource_group): response = self.client.devices.begin_install_updates( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_devices_get_network_settings(self, resource_group): - response = self.client.devices.get_network_settings( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_devices_begin_scan_for_updates(self, resource_group): response = self.client.devices.begin_scan_for_updates( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -222,16 +223,17 @@ def test_devices_begin_create_or_update_security_settings(self, resource_group): device_name="str", resource_group_name=resource_group.name, security_settings={ - "deviceAdminPassword": { - "encryptionAlgorithm": "str", - "value": "str", - "encryptionCertThumbprint": "str", + "properties": { + "deviceAdminPassword": { + "encryptionAlgorithm": "str", + "value": "str", + "encryptionCertThumbprint": "str", + } }, "id": "str", "name": "str", "type": "str", }, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -250,7 +252,6 @@ def test_devices_update_extended_information(self, resource_group): "clientSecretStoreUrl": "str", "syncStatus": "str", }, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -258,11 +259,11 @@ def test_devices_update_extended_information(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_devices_get_update_summary(self, resource_group): - response = self.client.devices.get_update_summary( + def test_devices_upload_certificate(self, resource_group): + response = self.client.devices.upload_certificate( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", + parameters={"properties": {"certificate": "str", "authenticationType": "str"}}, ) # please add some check logic here by yourself @@ -270,12 +271,10 @@ def test_devices_get_update_summary(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_devices_upload_certificate(self, resource_group): - response = self.client.devices.upload_certificate( + def test_devices_get_update_summary(self, resource_group): + response = self.client.devices.get_update_summary( device_name="str", resource_group_name=resource_group.name, - parameters={"certificate": "str", "authenticationType": "str"}, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_devices_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_devices_operations_async.py index f502e1ba424b..ac7adb69a28c 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_devices_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_devices_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,22 +21,12 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_devices_list_by_subscription(self, resource_group): - response = self.client.devices.list_by_subscription( - api_version="2021-02-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_devices_list_by_resource_group(self, resource_group): - response = self.client.devices.list_by_resource_group( + async def test_devices_get_network_settings(self, resource_group): + response = await self.client.devices.get_network_settings( + device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @@ -46,7 +36,6 @@ async def test_devices_get(self, resource_group): response = await self.client.devices.get( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -54,16 +43,22 @@ async def test_devices_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_devices_begin_create_or_update(self, resource_group): - response = await ( - await self.client.devices.begin_create_or_update( - device_name="str", - resource_group_name=resource_group.name, - data_box_edge_device={ - "location": "str", + async def test_devices_create_or_update(self, resource_group): + response = await self.client.devices.create_or_update( + resource_group_name=resource_group.name, + device_name="str", + data_box_edge_device={ + "location": "str", + "etag": "str", + "id": "str", + "identity": {"principalId": "str", "tenantId": "str", "type": "str"}, + "kind": "str", + "name": "str", + "properties": { "configuredRoleTypes": ["str"], "culture": "str", "dataBoxEdgeDeviceStatus": "str", + "dataResidency": {"type": "str"}, "description": "str", "deviceHcsVersion": "str", "deviceLocalCapacity": 0, @@ -73,31 +68,28 @@ async def test_devices_begin_create_or_update(self, resource_group): "edgeProfile": { "subscription": { "id": "str", - "locationPlacementId": "str", - "quotaId": "str", - "registeredFeatures": [{"name": "str", "state": "str"}], + "properties": { + "locationPlacementId": "str", + "quotaId": "str", + "registeredFeatures": [{"name": "str", "state": "str"}], + "serializedDetails": "str", + "tenantId": "str", + }, "registrationDate": "str", "registrationId": "str", - "serializedDetails": "str", "state": "str", "subscriptionId": "str", - "tenantId": "str", } }, - "etag": "str", "friendlyName": "str", - "id": "str", - "identity": {"principalId": "str", "tenantId": "str", "type": "str"}, - "kind": "str", + "kubernetesWorkloadProfile": "str", "modelDescription": "str", - "name": "str", "nodeCount": 0, "resourceMoveDetails": { "operationInProgress": "str", "operationInProgressLockTimeoutInUTC": "2020-02-20 00:00:00", }, "serialNumber": "str", - "sku": {"name": "str", "tier": "str"}, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -106,13 +98,37 @@ async def test_devices_begin_create_or_update(self, resource_group): "lastModifiedBy": "str", "lastModifiedByType": "str", }, - "tags": {"str": "str"}, "timeZone": "str", - "type": "str", }, - api_version="2021-02-01-preview", - ) - ).result() # call '.result()' to poll until service return final result + "sku": {"name": "str", "tier": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_devices_update(self, resource_group): + response = await self.client.devices.update( + device_name="str", + resource_group_name=resource_group.name, + parameters={ + "identity": {"principalId": "str", "tenantId": "str", "type": "str"}, + "properties": {"edgeProfile": {"subscription": {"id": "str"}}}, + "tags": {"str": "str"}, + }, + ) # please add some check logic here by yourself # ... @@ -124,7 +140,6 @@ async def test_devices_begin_delete(self, resource_group): await self.client.devices.begin_delete( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -133,18 +148,19 @@ async def test_devices_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_devices_update(self, resource_group): - response = await self.client.devices.update( - device_name="str", + async def test_devices_list_by_resource_group(self, resource_group): + response = self.client.devices.list_by_resource_group( resource_group_name=resource_group.name, - parameters={ - "edgeProfile": {"subscription": {"id": "str"}}, - "identity": {"principalId": "str", "tenantId": "str", "type": "str"}, - "tags": {"str": "str"}, - }, - api_version="2021-02-01-preview", ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_devices_list_by_subscription(self, resource_group): + response = self.client.devices.list_by_subscription() + result = [r async for r in response] # please add some check logic here by yourself # ... @@ -155,7 +171,6 @@ async def test_devices_begin_download_updates(self, resource_group): await self.client.devices.begin_download_updates( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -168,7 +183,6 @@ async def test_devices_generate_certificate(self, resource_group): response = await self.client.devices.generate_certificate( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -180,7 +194,6 @@ async def test_devices_get_extended_information(self, resource_group): response = await self.client.devices.get_extended_information( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -193,25 +206,12 @@ async def test_devices_begin_install_updates(self, resource_group): await self.client.devices.begin_install_updates( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_devices_get_network_settings(self, resource_group): - response = await self.client.devices.get_network_settings( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_devices_begin_scan_for_updates(self, resource_group): @@ -219,7 +219,6 @@ async def test_devices_begin_scan_for_updates(self, resource_group): await self.client.devices.begin_scan_for_updates( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -234,16 +233,17 @@ async def test_devices_begin_create_or_update_security_settings(self, resource_g device_name="str", resource_group_name=resource_group.name, security_settings={ - "deviceAdminPassword": { - "encryptionAlgorithm": "str", - "value": "str", - "encryptionCertThumbprint": "str", + "properties": { + "deviceAdminPassword": { + "encryptionAlgorithm": "str", + "value": "str", + "encryptionCertThumbprint": "str", + } }, "id": "str", "name": "str", "type": "str", }, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -263,7 +263,6 @@ async def test_devices_update_extended_information(self, resource_group): "clientSecretStoreUrl": "str", "syncStatus": "str", }, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -271,11 +270,11 @@ async def test_devices_update_extended_information(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_devices_get_update_summary(self, resource_group): - response = await self.client.devices.get_update_summary( + async def test_devices_upload_certificate(self, resource_group): + response = await self.client.devices.upload_certificate( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", + parameters={"properties": {"certificate": "str", "authenticationType": "str"}}, ) # please add some check logic here by yourself @@ -283,12 +282,10 @@ async def test_devices_get_update_summary(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_devices_upload_certificate(self, resource_group): - response = await self.client.devices.upload_certificate( + async def test_devices_get_update_summary(self, resource_group): + response = await self.client.devices.get_update_summary( device_name="str", resource_group_name=resource_group.name, - parameters={"certificate": "str", "authenticationType": "str"}, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_diagnostic_settings_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_diagnostic_settings_operations.py new file mode 100644 index 000000000000..a0c61b4e24c5 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_diagnostic_settings_operations.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.databoxedge import DataBoxEdgeManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataBoxEdgeManagementDiagnosticSettingsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(DataBoxEdgeManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_diagnostic_settings_get_diagnostic_proactive_log_collection_settings(self, resource_group): + response = self.client.diagnostic_settings.get_diagnostic_proactive_log_collection_settings( + resource_group_name=resource_group.name, + device_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_diagnostic_settings_begin_update_diagnostic_proactive_log_collection_settings(self, resource_group): + response = self.client.diagnostic_settings.begin_update_diagnostic_proactive_log_collection_settings( + resource_group_name=resource_group.name, + device_name="str", + proactive_log_collection_settings={ + "properties": {"userConsent": "str"}, + "id": "str", + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_diagnostic_settings_get_diagnostic_remote_support_settings(self, resource_group): + response = self.client.diagnostic_settings.get_diagnostic_remote_support_settings( + resource_group_name=resource_group.name, + device_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_diagnostic_settings_begin_update_diagnostic_remote_support_settings(self, resource_group): + response = self.client.diagnostic_settings.begin_update_diagnostic_remote_support_settings( + resource_group_name=resource_group.name, + device_name="str", + diagnostic_remote_support_settings={ + "properties": { + "remoteSupportSettingsList": [ + { + "accessLevel": "str", + "expirationTimeStampInUTC": "2020-02-20 00:00:00", + "remoteApplicationType": "str", + } + ] + }, + "id": "str", + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_diagnostic_settings_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_diagnostic_settings_operations_async.py new file mode 100644 index 000000000000..15752a02e568 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_diagnostic_settings_operations_async.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.databoxedge.aio import DataBoxEdgeManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataBoxEdgeManagementDiagnosticSettingsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(DataBoxEdgeManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_diagnostic_settings_get_diagnostic_proactive_log_collection_settings(self, resource_group): + response = await self.client.diagnostic_settings.get_diagnostic_proactive_log_collection_settings( + resource_group_name=resource_group.name, + device_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_diagnostic_settings_begin_update_diagnostic_proactive_log_collection_settings(self, resource_group): + response = await ( + await self.client.diagnostic_settings.begin_update_diagnostic_proactive_log_collection_settings( + resource_group_name=resource_group.name, + device_name="str", + proactive_log_collection_settings={ + "properties": {"userConsent": "str"}, + "id": "str", + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_diagnostic_settings_get_diagnostic_remote_support_settings(self, resource_group): + response = await self.client.diagnostic_settings.get_diagnostic_remote_support_settings( + resource_group_name=resource_group.name, + device_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_diagnostic_settings_begin_update_diagnostic_remote_support_settings(self, resource_group): + response = await ( + await self.client.diagnostic_settings.begin_update_diagnostic_remote_support_settings( + resource_group_name=resource_group.name, + device_name="str", + diagnostic_remote_support_settings={ + "properties": { + "remoteSupportSettingsList": [ + { + "accessLevel": "str", + "expirationTimeStampInUTC": "2020-02-20 00:00:00", + "remoteApplicationType": "str", + } + ] + }, + "id": "str", + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_jobs_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_jobs_operations.py index 3843feaa0d14..de686de4afea 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_jobs_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_jobs_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_jobs_get(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_jobs_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_jobs_operations_async.py index e4495935b039..ea1c08596f13 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_jobs_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_jobs_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_jobs_get(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_monitoring_config_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_monitoring_config_operations.py index c88e365b7047..a684efbd1ad5 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_monitoring_config_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_monitoring_config_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,19 +18,6 @@ class TestDataBoxEdgeManagementMonitoringConfigOperations(AzureMgmtRecordedTestC def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_monitoring_config_list(self, resource_group): - response = self.client.monitoring_config.list( - device_name="str", - role_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_monitoring_config_get(self, resource_group): @@ -38,7 +25,6 @@ def test_monitoring_config_get(self, resource_group): device_name="str", role_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -52,25 +38,27 @@ def test_monitoring_config_begin_create_or_update(self, resource_group): role_name="str", resource_group_name=resource_group.name, monitoring_metric_configuration={ - "metricConfigurations": [ - { - "counterSets": [ - { - "counters": [ - { - "name": "str", - "additionalDimensions": [{"sourceName": "str", "sourceType": "str"}], - "dimensionFilter": [{"sourceName": "str", "sourceType": "str"}], - "instance": "str", - } - ] - } - ], - "resourceId": "str", - "mdmAccount": "str", - "metricNameSpace": "str", - } - ], + "properties": { + "metricConfigurations": [ + { + "counterSets": [ + { + "counters": [ + { + "name": "str", + "additionalDimensions": [{"sourceName": "str", "sourceType": "str"}], + "dimensionFilter": [{"sourceName": "str", "sourceType": "str"}], + "instance": "str", + } + ] + } + ], + "resourceId": "str", + "mdmAccount": "str", + "metricNameSpace": "str", + } + ] + }, "id": "str", "name": "str", "systemData": { @@ -83,7 +71,6 @@ def test_monitoring_config_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -96,8 +83,19 @@ def test_monitoring_config_begin_delete(self, resource_group): device_name="str", role_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_monitoring_config_list(self, resource_group): + response = self.client.monitoring_config.list( + device_name="str", + role_name="str", + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_monitoring_config_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_monitoring_config_operations_async.py index 56419fa324a3..e06ab85ea89e 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_monitoring_config_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_monitoring_config_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,19 +19,6 @@ class TestDataBoxEdgeManagementMonitoringConfigOperationsAsync(AzureMgmtRecorded def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_monitoring_config_list(self, resource_group): - response = self.client.monitoring_config.list( - device_name="str", - role_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_monitoring_config_get(self, resource_group): @@ -39,7 +26,6 @@ async def test_monitoring_config_get(self, resource_group): device_name="str", role_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -54,25 +40,27 @@ async def test_monitoring_config_begin_create_or_update(self, resource_group): role_name="str", resource_group_name=resource_group.name, monitoring_metric_configuration={ - "metricConfigurations": [ - { - "counterSets": [ - { - "counters": [ - { - "name": "str", - "additionalDimensions": [{"sourceName": "str", "sourceType": "str"}], - "dimensionFilter": [{"sourceName": "str", "sourceType": "str"}], - "instance": "str", - } - ] - } - ], - "resourceId": "str", - "mdmAccount": "str", - "metricNameSpace": "str", - } - ], + "properties": { + "metricConfigurations": [ + { + "counterSets": [ + { + "counters": [ + { + "name": "str", + "additionalDimensions": [{"sourceName": "str", "sourceType": "str"}], + "dimensionFilter": [{"sourceName": "str", "sourceType": "str"}], + "instance": "str", + } + ] + } + ], + "resourceId": "str", + "mdmAccount": "str", + "metricNameSpace": "str", + } + ] + }, "id": "str", "name": "str", "systemData": { @@ -85,7 +73,6 @@ async def test_monitoring_config_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -100,9 +87,20 @@ async def test_monitoring_config_begin_delete(self, resource_group): device_name="str", role_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_monitoring_config_list(self, resource_group): + response = self.client.monitoring_config.list( + device_name="str", + role_name="str", + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_nodes_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_nodes_operations.py index 9d2d1a6c7dda..4997b591ed4d 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_nodes_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_nodes_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_nodes_list_by_data_box_edge_device(self, resource_group): response = self.client.nodes.list_by_data_box_edge_device( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_nodes_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_nodes_operations_async.py index 6248f7ad4705..4fc1d4b62898 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_nodes_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_nodes_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_nodes_list_by_data_box_edge_device(self, resource_group): response = self.client.nodes.list_by_data_box_edge_device( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_operations.py index 58ea9c74001a..4bda18780b64 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,9 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_operations_list(self, resource_group): - response = self.client.operations.list( - api_version="2021-02-01-preview", - ) + response = self.client.operations.list() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_operations_async.py index 4e9907586219..6a6621cfbed4 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -22,9 +22,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_operations_list(self, resource_group): - response = self.client.operations.list( - api_version="2021-02-01-preview", - ) + response = self.client.operations.list() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_operations_status_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_operations_status_operations.py index 439aaca986c1..e44dbe4bdef8 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_operations_status_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_operations_status_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_operations_status_get(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_operations_status_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_operations_status_operations_async.py index 473fe2ed7201..b1a9bbdb5ab4 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_operations_status_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_operations_status_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -26,7 +26,6 @@ async def test_operations_status_get(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_orders_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_orders_operations.py index ddfd9e49571c..9460fd77b100 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_orders_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_orders_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,25 +18,12 @@ class TestDataBoxEdgeManagementOrdersOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_orders_list_by_data_box_edge_device(self, resource_group): - response = self.client.orders.list_by_data_box_edge_device( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_orders_get(self, resource_group): response = self.client.orders.get( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -49,31 +36,17 @@ def test_orders_begin_create_or_update(self, resource_group): device_name="str", resource_group_name=resource_group.name, order={ - "contactInformation": { - "companyName": "str", - "contactPerson": "str", - "emailList": ["str"], - "phone": "str", - }, - "currentStatus": { - "status": "str", - "additionalOrderDetails": {"str": "str"}, - "comments": "str", - "trackingInformation": { - "carrierName": "str", - "serialNumber": "str", - "trackingId": "str", - "trackingUrl": "str", - }, - "updateDateTime": "2020-02-20 00:00:00", - }, - "deliveryTrackingInfo": [ - {"carrierName": "str", "serialNumber": "str", "trackingId": "str", "trackingUrl": "str"} - ], "id": "str", + "kind": "str", "name": "str", - "orderHistory": [ - { + "properties": { + "contactInformation": { + "companyName": "str", + "contactPerson": "str", + "emailList": ["str"], + "phone": "str", + }, + "currentStatus": { "status": "str", "additionalOrderDetails": {"str": "str"}, "comments": "str", @@ -84,21 +57,39 @@ def test_orders_begin_create_or_update(self, resource_group): "trackingUrl": "str", }, "updateDateTime": "2020-02-20 00:00:00", - } - ], - "returnTrackingInfo": [ - {"carrierName": "str", "serialNumber": "str", "trackingId": "str", "trackingUrl": "str"} - ], - "serialNumber": "str", - "shipmentType": "str", - "shippingAddress": { - "country": "str", - "addressLine1": "str", - "addressLine2": "str", - "addressLine3": "str", - "city": "str", - "postalCode": "str", - "state": "str", + }, + "deliveryTrackingInfo": [ + {"carrierName": "str", "serialNumber": "str", "trackingId": "str", "trackingUrl": "str"} + ], + "orderHistory": [ + { + "status": "str", + "additionalOrderDetails": {"str": "str"}, + "comments": "str", + "trackingInformation": { + "carrierName": "str", + "serialNumber": "str", + "trackingId": "str", + "trackingUrl": "str", + }, + "updateDateTime": "2020-02-20 00:00:00", + } + ], + "orderId": "str", + "returnTrackingInfo": [ + {"carrierName": "str", "serialNumber": "str", "trackingId": "str", "trackingUrl": "str"} + ], + "serialNumber": "str", + "shipmentType": "str", + "shippingAddress": { + "country": "str", + "addressLine1": "str", + "addressLine2": "str", + "addressLine3": "str", + "city": "str", + "postalCode": "str", + "state": "str", + }, }, "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -110,7 +101,6 @@ def test_orders_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -122,19 +112,28 @@ def test_orders_begin_delete(self, resource_group): response = self.client.orders.begin_delete( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_orders_list_by_data_box_edge_device(self, resource_group): + response = self.client.orders.list_by_data_box_edge_device( + device_name="str", + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_orders_list_dc_access_code(self, resource_group): response = self.client.orders.list_dc_access_code( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_orders_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_orders_operations_async.py index c9f19785eba5..c47157dbc465 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_orders_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_orders_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,25 +19,12 @@ class TestDataBoxEdgeManagementOrdersOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_orders_list_by_data_box_edge_device(self, resource_group): - response = self.client.orders.list_by_data_box_edge_device( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_orders_get(self, resource_group): response = await self.client.orders.get( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -51,31 +38,17 @@ async def test_orders_begin_create_or_update(self, resource_group): device_name="str", resource_group_name=resource_group.name, order={ - "contactInformation": { - "companyName": "str", - "contactPerson": "str", - "emailList": ["str"], - "phone": "str", - }, - "currentStatus": { - "status": "str", - "additionalOrderDetails": {"str": "str"}, - "comments": "str", - "trackingInformation": { - "carrierName": "str", - "serialNumber": "str", - "trackingId": "str", - "trackingUrl": "str", - }, - "updateDateTime": "2020-02-20 00:00:00", - }, - "deliveryTrackingInfo": [ - {"carrierName": "str", "serialNumber": "str", "trackingId": "str", "trackingUrl": "str"} - ], "id": "str", + "kind": "str", "name": "str", - "orderHistory": [ - { + "properties": { + "contactInformation": { + "companyName": "str", + "contactPerson": "str", + "emailList": ["str"], + "phone": "str", + }, + "currentStatus": { "status": "str", "additionalOrderDetails": {"str": "str"}, "comments": "str", @@ -86,21 +59,39 @@ async def test_orders_begin_create_or_update(self, resource_group): "trackingUrl": "str", }, "updateDateTime": "2020-02-20 00:00:00", - } - ], - "returnTrackingInfo": [ - {"carrierName": "str", "serialNumber": "str", "trackingId": "str", "trackingUrl": "str"} - ], - "serialNumber": "str", - "shipmentType": "str", - "shippingAddress": { - "country": "str", - "addressLine1": "str", - "addressLine2": "str", - "addressLine3": "str", - "city": "str", - "postalCode": "str", - "state": "str", + }, + "deliveryTrackingInfo": [ + {"carrierName": "str", "serialNumber": "str", "trackingId": "str", "trackingUrl": "str"} + ], + "orderHistory": [ + { + "status": "str", + "additionalOrderDetails": {"str": "str"}, + "comments": "str", + "trackingInformation": { + "carrierName": "str", + "serialNumber": "str", + "trackingId": "str", + "trackingUrl": "str", + }, + "updateDateTime": "2020-02-20 00:00:00", + } + ], + "orderId": "str", + "returnTrackingInfo": [ + {"carrierName": "str", "serialNumber": "str", "trackingId": "str", "trackingUrl": "str"} + ], + "serialNumber": "str", + "shipmentType": "str", + "shippingAddress": { + "country": "str", + "addressLine1": "str", + "addressLine2": "str", + "addressLine3": "str", + "city": "str", + "postalCode": "str", + "state": "str", + }, }, "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -112,7 +103,6 @@ async def test_orders_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -126,20 +116,29 @@ async def test_orders_begin_delete(self, resource_group): await self.client.orders.begin_delete( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_orders_list_by_data_box_edge_device(self, resource_group): + response = self.client.orders.list_by_data_box_edge_device( + device_name="str", + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_orders_list_dc_access_code(self, resource_group): response = await self.client.orders.list_dc_access_code( device_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_roles_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_roles_operations.py index bf665dea0679..f0dd949b5dac 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_roles_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_roles_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,18 +18,6 @@ class TestDataBoxEdgeManagementRolesOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_roles_list_by_data_box_edge_device(self, resource_group): - response = self.client.roles.list_by_data_box_edge_device( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_roles_get(self, resource_group): @@ -37,7 +25,6 @@ def test_roles_get(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -52,24 +39,28 @@ def test_roles_begin_create_or_update(self, resource_group): resource_group_name=resource_group.name, role={ "kind": "CloudEdgeManagement", - "edgeProfile": { - "subscription": { - "id": "str", - "locationPlacementId": "str", - "quotaId": "str", - "registeredFeatures": [{"name": "str", "state": "str"}], - "registrationDate": "str", - "registrationId": "str", - "serializedDetails": "str", - "state": "str", - "subscriptionId": "str", - "tenantId": "str", - } - }, "id": "str", - "localManagementStatus": "str", "name": "str", - "roleStatus": "str", + "properties": { + "roleStatus": "str", + "edgeProfile": { + "subscription": { + "id": "str", + "properties": { + "locationPlacementId": "str", + "quotaId": "str", + "registeredFeatures": [{"name": "str", "state": "str"}], + "serializedDetails": "str", + "tenantId": "str", + }, + "registrationDate": "str", + "registrationId": "str", + "state": "str", + "subscriptionId": "str", + } + }, + "localManagementStatus": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -80,7 +71,6 @@ def test_roles_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -93,8 +83,18 @@ def test_roles_begin_delete(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_roles_list_by_data_box_edge_device(self, resource_group): + response = self.client.roles.list_by_data_box_edge_device( + device_name="str", + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_roles_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_roles_operations_async.py index ab6759f031e5..08ddddb09233 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_roles_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_roles_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,18 +19,6 @@ class TestDataBoxEdgeManagementRolesOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_roles_list_by_data_box_edge_device(self, resource_group): - response = self.client.roles.list_by_data_box_edge_device( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_roles_get(self, resource_group): @@ -38,7 +26,6 @@ async def test_roles_get(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -54,24 +41,28 @@ async def test_roles_begin_create_or_update(self, resource_group): resource_group_name=resource_group.name, role={ "kind": "CloudEdgeManagement", - "edgeProfile": { - "subscription": { - "id": "str", - "locationPlacementId": "str", - "quotaId": "str", - "registeredFeatures": [{"name": "str", "state": "str"}], - "registrationDate": "str", - "registrationId": "str", - "serializedDetails": "str", - "state": "str", - "subscriptionId": "str", - "tenantId": "str", - } - }, "id": "str", - "localManagementStatus": "str", "name": "str", - "roleStatus": "str", + "properties": { + "roleStatus": "str", + "edgeProfile": { + "subscription": { + "id": "str", + "properties": { + "locationPlacementId": "str", + "quotaId": "str", + "registeredFeatures": [{"name": "str", "state": "str"}], + "serializedDetails": "str", + "tenantId": "str", + }, + "registrationDate": "str", + "registrationId": "str", + "state": "str", + "subscriptionId": "str", + } + }, + "localManagementStatus": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -82,7 +73,6 @@ async def test_roles_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -97,9 +87,19 @@ async def test_roles_begin_delete(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_roles_list_by_data_box_edge_device(self, resource_group): + response = self.client.roles.list_by_data_box_edge_device( + device_name="str", + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_shares_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_shares_operations.py index b96df3aa3728..c4a98521efbe 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_shares_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_shares_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,18 +18,6 @@ class TestDataBoxEdgeManagementSharesOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_shares_list_by_data_box_edge_device(self, resource_group): - response = self.client.shares.list_by_data_box_edge_device( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_shares_get(self, resource_group): @@ -37,7 +25,6 @@ def test_shares_get(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -51,28 +38,31 @@ def test_shares_begin_create_or_update(self, resource_group): name="str", resource_group_name=resource_group.name, share={ - "accessProtocol": "str", - "monitoringStatus": "str", - "shareStatus": "str", - "azureContainerInfo": { - "containerName": "str", - "dataFormat": "str", - "storageAccountCredentialId": "str", + "properties": { + "accessProtocol": "str", + "monitoringStatus": "str", + "shareStatus": "str", + "azureContainerInfo": { + "containerName": "str", + "dataFormat": "str", + "storageAccountCredentialId": "str", + }, + "clientAccessRights": [{"accessPermission": "str", "client": "str"}], + "dataPolicy": "str", + "description": "str", + "refreshDetails": { + "errorManifestFile": "str", + "inProgressRefreshJobId": "str", + "lastCompletedRefreshJobTimeInUTC": "2020-02-20 00:00:00", + "lastJob": "str", + }, + "shareMappings": [ + {"shareId": "str", "mountPoint": "str", "mountType": "str", "roleId": "str", "roleType": "str"} + ], + "userAccessRights": [{"accessType": "str", "userId": "str"}], }, - "clientAccessRights": [{"accessPermission": "str", "client": "str"}], - "dataPolicy": "str", - "description": "str", "id": "str", "name": "str", - "refreshDetails": { - "errorManifestFile": "str", - "inProgressRefreshJobId": "str", - "lastCompletedRefreshJobTimeInUTC": "2020-02-20 00:00:00", - "lastJob": "str", - }, - "shareMappings": [ - {"shareId": "str", "mountPoint": "str", "mountType": "str", "roleId": "str", "roleType": "str"} - ], "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -82,9 +72,7 @@ def test_shares_begin_create_or_update(self, resource_group): "lastModifiedByType": "str", }, "type": "str", - "userAccessRights": [{"accessType": "str", "userId": "str"}], }, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -97,12 +85,22 @@ def test_shares_begin_delete(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_shares_list_by_data_box_edge_device(self, resource_group): + response = self.client.shares.list_by_data_box_edge_device( + device_name="str", + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_shares_begin_refresh(self, resource_group): @@ -110,7 +108,6 @@ def test_shares_begin_refresh(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_shares_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_shares_operations_async.py index 34e2b5bfdcc0..03a447cf21c3 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_shares_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_shares_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,18 +19,6 @@ class TestDataBoxEdgeManagementSharesOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_shares_list_by_data_box_edge_device(self, resource_group): - response = self.client.shares.list_by_data_box_edge_device( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_shares_get(self, resource_group): @@ -38,7 +26,6 @@ async def test_shares_get(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -53,28 +40,37 @@ async def test_shares_begin_create_or_update(self, resource_group): name="str", resource_group_name=resource_group.name, share={ - "accessProtocol": "str", - "monitoringStatus": "str", - "shareStatus": "str", - "azureContainerInfo": { - "containerName": "str", - "dataFormat": "str", - "storageAccountCredentialId": "str", + "properties": { + "accessProtocol": "str", + "monitoringStatus": "str", + "shareStatus": "str", + "azureContainerInfo": { + "containerName": "str", + "dataFormat": "str", + "storageAccountCredentialId": "str", + }, + "clientAccessRights": [{"accessPermission": "str", "client": "str"}], + "dataPolicy": "str", + "description": "str", + "refreshDetails": { + "errorManifestFile": "str", + "inProgressRefreshJobId": "str", + "lastCompletedRefreshJobTimeInUTC": "2020-02-20 00:00:00", + "lastJob": "str", + }, + "shareMappings": [ + { + "shareId": "str", + "mountPoint": "str", + "mountType": "str", + "roleId": "str", + "roleType": "str", + } + ], + "userAccessRights": [{"accessType": "str", "userId": "str"}], }, - "clientAccessRights": [{"accessPermission": "str", "client": "str"}], - "dataPolicy": "str", - "description": "str", "id": "str", "name": "str", - "refreshDetails": { - "errorManifestFile": "str", - "inProgressRefreshJobId": "str", - "lastCompletedRefreshJobTimeInUTC": "2020-02-20 00:00:00", - "lastJob": "str", - }, - "shareMappings": [ - {"shareId": "str", "mountPoint": "str", "mountType": "str", "roleId": "str", "roleType": "str"} - ], "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -84,9 +80,7 @@ async def test_shares_begin_create_or_update(self, resource_group): "lastModifiedByType": "str", }, "type": "str", - "userAccessRights": [{"accessType": "str", "userId": "str"}], }, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -101,13 +95,23 @@ async def test_shares_begin_delete(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_shares_list_by_data_box_edge_device(self, resource_group): + response = self.client.shares.list_by_data_box_edge_device( + device_name="str", + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_shares_begin_refresh(self, resource_group): @@ -116,7 +120,6 @@ async def test_shares_begin_refresh(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_storage_account_credentials_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_storage_account_credentials_operations.py index dec4916f98c8..7399a856cc1d 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_storage_account_credentials_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_storage_account_credentials_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,18 +18,6 @@ class TestDataBoxEdgeManagementStorageAccountCredentialsOperations(AzureMgmtReco def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_storage_account_credentials_list_by_data_box_edge_device(self, resource_group): - response = self.client.storage_account_credentials.list_by_data_box_edge_device( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_storage_account_credentials_get(self, resource_group): @@ -37,7 +25,6 @@ def test_storage_account_credentials_get(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -51,15 +38,18 @@ def test_storage_account_credentials_begin_create_or_update(self, resource_group name="str", resource_group_name=resource_group.name, storage_account_credential={ - "accountType": "str", - "alias": "str", - "sslStatus": "str", - "accountKey": {"encryptionAlgorithm": "str", "value": "str", "encryptionCertThumbprint": "str"}, - "blobDomainName": "str", - "connectionString": "str", + "properties": { + "accountType": "str", + "alias": "str", + "sslStatus": "str", + "accountKey": {"encryptionAlgorithm": "str", "value": "str", "encryptionCertThumbprint": "str"}, + "blobDomainName": "str", + "connectionString": "str", + "storageAccountId": "str", + "userName": "str", + }, "id": "str", "name": "str", - "storageAccountId": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -69,9 +59,7 @@ def test_storage_account_credentials_begin_create_or_update(self, resource_group "lastModifiedByType": "str", }, "type": "str", - "userName": "str", }, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -84,8 +72,18 @@ def test_storage_account_credentials_begin_delete(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_storage_account_credentials_list_by_data_box_edge_device(self, resource_group): + response = self.client.storage_account_credentials.list_by_data_box_edge_device( + device_name="str", + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_storage_account_credentials_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_storage_account_credentials_operations_async.py index 70510d72e2f4..0647e1f80d37 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_storage_account_credentials_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_storage_account_credentials_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,18 +19,6 @@ class TestDataBoxEdgeManagementStorageAccountCredentialsOperationsAsync(AzureMgm def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_storage_account_credentials_list_by_data_box_edge_device(self, resource_group): - response = self.client.storage_account_credentials.list_by_data_box_edge_device( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_storage_account_credentials_get(self, resource_group): @@ -38,7 +26,6 @@ async def test_storage_account_credentials_get(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -53,15 +40,18 @@ async def test_storage_account_credentials_begin_create_or_update(self, resource name="str", resource_group_name=resource_group.name, storage_account_credential={ - "accountType": "str", - "alias": "str", - "sslStatus": "str", - "accountKey": {"encryptionAlgorithm": "str", "value": "str", "encryptionCertThumbprint": "str"}, - "blobDomainName": "str", - "connectionString": "str", + "properties": { + "accountType": "str", + "alias": "str", + "sslStatus": "str", + "accountKey": {"encryptionAlgorithm": "str", "value": "str", "encryptionCertThumbprint": "str"}, + "blobDomainName": "str", + "connectionString": "str", + "storageAccountId": "str", + "userName": "str", + }, "id": "str", "name": "str", - "storageAccountId": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -71,9 +61,7 @@ async def test_storage_account_credentials_begin_create_or_update(self, resource "lastModifiedByType": "str", }, "type": "str", - "userName": "str", }, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -88,9 +76,19 @@ async def test_storage_account_credentials_begin_delete(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_storage_account_credentials_list_by_data_box_edge_device(self, resource_group): + response = self.client.storage_account_credentials.list_by_data_box_edge_device( + device_name="str", + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_storage_accounts_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_storage_accounts_operations.py index b14cc6fee774..b9a33ebfd287 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_storage_accounts_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_storage_accounts_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,18 +18,6 @@ class TestDataBoxEdgeManagementStorageAccountsOperations(AzureMgmtRecordedTestCa def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_storage_accounts_list_by_data_box_edge_device(self, resource_group): - response = self.client.storage_accounts.list_by_data_box_edge_device( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_storage_accounts_get(self, resource_group): @@ -37,7 +25,6 @@ def test_storage_accounts_get(self, resource_group): device_name="str", storage_account_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -51,14 +38,16 @@ def test_storage_accounts_begin_create_or_update(self, resource_group): storage_account_name="str", resource_group_name=resource_group.name, storage_account={ - "dataPolicy": "str", - "blobEndpoint": "str", - "containerCount": 0, - "description": "str", + "properties": { + "dataPolicy": "str", + "blobEndpoint": "str", + "containerCount": 0, + "description": "str", + "storageAccountCredentialId": "str", + "storageAccountStatus": "str", + }, "id": "str", "name": "str", - "storageAccountCredentialId": "str", - "storageAccountStatus": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -69,7 +58,6 @@ def test_storage_accounts_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -82,8 +70,18 @@ def test_storage_accounts_begin_delete(self, resource_group): device_name="str", storage_account_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_storage_accounts_list_by_data_box_edge_device(self, resource_group): + response = self.client.storage_accounts.list_by_data_box_edge_device( + device_name="str", + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_storage_accounts_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_storage_accounts_operations_async.py index 0dece12dced9..63478ec8cf1c 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_storage_accounts_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_storage_accounts_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,18 +19,6 @@ class TestDataBoxEdgeManagementStorageAccountsOperationsAsync(AzureMgmtRecordedT def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_storage_accounts_list_by_data_box_edge_device(self, resource_group): - response = self.client.storage_accounts.list_by_data_box_edge_device( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_storage_accounts_get(self, resource_group): @@ -38,7 +26,6 @@ async def test_storage_accounts_get(self, resource_group): device_name="str", storage_account_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -53,14 +40,16 @@ async def test_storage_accounts_begin_create_or_update(self, resource_group): storage_account_name="str", resource_group_name=resource_group.name, storage_account={ - "dataPolicy": "str", - "blobEndpoint": "str", - "containerCount": 0, - "description": "str", + "properties": { + "dataPolicy": "str", + "blobEndpoint": "str", + "containerCount": 0, + "description": "str", + "storageAccountCredentialId": "str", + "storageAccountStatus": "str", + }, "id": "str", "name": "str", - "storageAccountCredentialId": "str", - "storageAccountStatus": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -71,7 +60,6 @@ async def test_storage_accounts_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -86,9 +74,19 @@ async def test_storage_accounts_begin_delete(self, resource_group): device_name="str", storage_account_name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_storage_accounts_list_by_data_box_edge_device(self, resource_group): + response = self.client.storage_accounts.list_by_data_box_edge_device( + device_name="str", + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_support_packages_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_support_packages_operations.py new file mode 100644 index 000000000000..27adbcb5e7d1 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_support_packages_operations.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.databoxedge import DataBoxEdgeManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataBoxEdgeManagementSupportPackagesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(DataBoxEdgeManagementClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_support_packages_begin_trigger_support_package(self, resource_group): + response = self.client.support_packages.begin_trigger_support_package( + resource_group_name=resource_group.name, + device_name="str", + trigger_support_package_request={ + "properties": { + "include": "str", + "maximumTimeStamp": "2020-02-20 00:00:00", + "minimumTimeStamp": "2020-02-20 00:00:00", + }, + "id": "str", + "name": "str", + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_support_packages_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_support_packages_operations_async.py new file mode 100644 index 000000000000..7fe661c3f1fd --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_support_packages_operations_async.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.databoxedge.aio import DataBoxEdgeManagementClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDataBoxEdgeManagementSupportPackagesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(DataBoxEdgeManagementClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_support_packages_begin_trigger_support_package(self, resource_group): + response = await ( + await self.client.support_packages.begin_trigger_support_package( + resource_group_name=resource_group.name, + device_name="str", + trigger_support_package_request={ + "properties": { + "include": "str", + "maximumTimeStamp": "2020-02-20 00:00:00", + "minimumTimeStamp": "2020-02-20 00:00:00", + }, + "id": "str", + "name": "str", + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_triggers_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_triggers_operations.py index 03dbe80460c4..81951eddd2cc 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_triggers_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_triggers_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,18 +18,6 @@ class TestDataBoxEdgeManagementTriggersOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_triggers_list_by_data_box_edge_device(self, resource_group): - response = self.client.triggers.list_by_data_box_edge_device( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_triggers_get(self, resource_group): @@ -37,7 +25,6 @@ def test_triggers_get(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -52,9 +39,11 @@ def test_triggers_begin_create_or_update(self, resource_group): resource_group_name=resource_group.name, trigger={ "kind": "FileEvent", - "sinkInfo": {"roleId": "str"}, - "sourceInfo": {"shareId": "str"}, - "customContextTag": "str", + "properties": { + "sinkInfo": {"roleId": "str"}, + "sourceInfo": {"shareId": "str"}, + "customContextTag": "str", + }, "id": "str", "name": "str", "systemData": { @@ -67,7 +56,6 @@ def test_triggers_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -80,8 +68,18 @@ def test_triggers_begin_delete(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_triggers_list_by_data_box_edge_device(self, resource_group): + response = self.client.triggers.list_by_data_box_edge_device( + device_name="str", + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_triggers_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_triggers_operations_async.py index b235518075a5..0b24167369f9 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_triggers_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_triggers_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,18 +19,6 @@ class TestDataBoxEdgeManagementTriggersOperationsAsync(AzureMgmtRecordedTestCase def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_triggers_list_by_data_box_edge_device(self, resource_group): - response = self.client.triggers.list_by_data_box_edge_device( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_triggers_get(self, resource_group): @@ -38,7 +26,6 @@ async def test_triggers_get(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -54,9 +41,11 @@ async def test_triggers_begin_create_or_update(self, resource_group): resource_group_name=resource_group.name, trigger={ "kind": "FileEvent", - "sinkInfo": {"roleId": "str"}, - "sourceInfo": {"shareId": "str"}, - "customContextTag": "str", + "properties": { + "sinkInfo": {"roleId": "str"}, + "sourceInfo": {"shareId": "str"}, + "customContextTag": "str", + }, "id": "str", "name": "str", "systemData": { @@ -69,7 +58,6 @@ async def test_triggers_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -84,9 +72,19 @@ async def test_triggers_begin_delete(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_triggers_list_by_data_box_edge_device(self, resource_group): + response = self.client.triggers.list_by_data_box_edge_device( + device_name="str", + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_users_operations.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_users_operations.py index 5197d2978916..d7d921d0237f 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_users_operations.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_users_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,18 +18,6 @@ class TestDataBoxEdgeManagementUsersOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_users_list_by_data_box_edge_device(self, resource_group): - response = self.client.users.list_by_data_box_edge_device( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_users_get(self, resource_group): @@ -37,7 +25,6 @@ def test_users_get(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -51,10 +38,17 @@ def test_users_begin_create_or_update(self, resource_group): name="str", resource_group_name=resource_group.name, user={ - "encryptedPassword": {"encryptionAlgorithm": "str", "value": "str", "encryptionCertThumbprint": "str"}, + "properties": { + "userType": "str", + "encryptedPassword": { + "encryptionAlgorithm": "str", + "value": "str", + "encryptionCertThumbprint": "str", + }, + "shareAccessRights": [{"accessType": "str", "shareId": "str"}], + }, "id": "str", "name": "str", - "shareAccessRights": [{"accessType": "str", "shareId": "str"}], "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -64,9 +58,7 @@ def test_users_begin_create_or_update(self, resource_group): "lastModifiedByType": "str", }, "type": "str", - "userType": "str", }, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -79,8 +71,18 @@ def test_users_begin_delete(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_users_list_by_data_box_edge_device(self, resource_group): + response = self.client.users.list_by_data_box_edge_device( + device_name="str", + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_users_operations_async.py b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_users_operations_async.py index a1b381481de2..027794522e9a 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_users_operations_async.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/generated_tests/test_data_box_edge_management_users_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,18 +19,6 @@ class TestDataBoxEdgeManagementUsersOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(DataBoxEdgeManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_users_list_by_data_box_edge_device(self, resource_group): - response = self.client.users.list_by_data_box_edge_device( - device_name="str", - resource_group_name=resource_group.name, - api_version="2021-02-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_users_get(self, resource_group): @@ -38,7 +26,6 @@ async def test_users_get(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) # please add some check logic here by yourself @@ -53,14 +40,17 @@ async def test_users_begin_create_or_update(self, resource_group): name="str", resource_group_name=resource_group.name, user={ - "encryptedPassword": { - "encryptionAlgorithm": "str", - "value": "str", - "encryptionCertThumbprint": "str", + "properties": { + "userType": "str", + "encryptedPassword": { + "encryptionAlgorithm": "str", + "value": "str", + "encryptionCertThumbprint": "str", + }, + "shareAccessRights": [{"accessType": "str", "shareId": "str"}], }, "id": "str", "name": "str", - "shareAccessRights": [{"accessType": "str", "shareId": "str"}], "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -70,9 +60,7 @@ async def test_users_begin_create_or_update(self, resource_group): "lastModifiedByType": "str", }, "type": "str", - "userType": "str", }, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -87,9 +75,19 @@ async def test_users_begin_delete(self, resource_group): device_name="str", name="str", resource_group_name=resource_group.name, - api_version="2021-02-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_users_list_by_data_box_edge_device(self, resource_group): + response = self.client.users.list_by_data_box_edge_device( + device_name="str", + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/pyproject.toml b/sdk/databoxedge/azure-mgmt-databoxedge/pyproject.toml index f3fa71522a06..7d05f8799979 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/pyproject.toml +++ b/sdk/databoxedge/azure-mgmt-databoxedge/pyproject.toml @@ -1,3 +1,65 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=77.0.3", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-mgmt-databoxedge" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Azure Databoxedge Management Client Library for Python" +license = "MIT" +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-mgmt-core>=1.6.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python" + +[tool.setuptools.dynamic] +version = {attr = "azure.mgmt.databoxedge._version.VERSION"} +readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "generated_tests*", + "samples*", + "generated_samples*", + "doc*", + "azure", + "azure.mgmt", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] + [tool.azure-sdk-build] breaking = false mypy = false @@ -10,6 +72,10 @@ package_name = "azure-mgmt-databoxedge" package_nspkg = "azure-mgmt-nspkg" package_pprint_name = "Data Box Edge Management" package_doc_id = "" -is_stable = false +is_stable = true is_arm = true title = "DataBoxEdgeManagementClient" +need_msrestazure = false +need_azuremgmtcore = true +sample_link = "" +exclude_folders = "" diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/setup.py b/sdk/databoxedge/azure-mgmt-databoxedge/setup.py deleted file mode 100644 index 50e31be7d90c..000000000000 --- a/sdk/databoxedge/azure-mgmt-databoxedge/setup.py +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env python - -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-databoxedge" -PACKAGE_PPRINT_NAME = "Data Box Edge Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace("-", ".") - -# Version extraction inspired from 'requests' -with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), - "r", -) as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - -with open("README.md", encoding="utf-8") as f: - readme = f.read() -with open("CHANGELOG.md", encoding="utf-8") as f: - changelog = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=readme + "\n\n" + changelog, - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python", - keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.mgmt", - ] - ), - include_package_data=True, - package_data={ - "pytyped": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "typing-extensions>=4.6.0", - "azure-common>=1.1", - "azure-mgmt-core>=1.6.0", - ], - python_requires=">=3.9", -) diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/tests/disable_test_cli_mgmt_databoxedge.py b/sdk/databoxedge/azure-mgmt-databoxedge/tests/disable_test_cli_mgmt_databoxedge.py index 3367f3687041..b43282d3cbaa 100644 --- a/sdk/databoxedge/azure-mgmt-databoxedge/tests/disable_test_cli_mgmt_databoxedge.py +++ b/sdk/databoxedge/azure-mgmt-databoxedge/tests/disable_test_cli_mgmt_databoxedge.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding: utf-8 # ------------------------------------------------------------------------- diff --git a/sdk/databoxedge/azure-mgmt-databoxedge/tsp-location.yaml b/sdk/databoxedge/azure-mgmt-databoxedge/tsp-location.yaml new file mode 100644 index 000000000000..0eb8aeba59e3 --- /dev/null +++ b/sdk/databoxedge/azure-mgmt-databoxedge/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/databoxedge/DataBoxEdge.Management +commit: 2dbf656ef28bb514578b56b14d6e9f2c7ca16959 +repo: Azure/azure-rest-api-specs +additionalDirectories: