# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft 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.compute.aio import ComputeManagementClient

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 TestComputeManagementRestorePointsOperationsAsync(AzureMgmtRecordedTestCase):
    def setup_method(self, method):
        self.client = self.create_mgmt_client(ComputeManagementClient, is_async=True)

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy_async
    async def test_restore_points_get(self, resource_group):
        response = await self.client.restore_points.get(
            resource_group_name=resource_group.name,
            restore_point_collection_name="str",
            restore_point_name="str",
            api_version="2025-11-01",
        )

        # please add some check logic here by yourself
        # ...

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy_async
    async def test_restore_points_begin_create(self, resource_group):
        response = await (
            await self.client.restore_points.begin_create(
                resource_group_name=resource_group.name,
                restore_point_collection_name="str",
                restore_point_name="str",
                parameters={
                    "id": "str",
                    "name": "str",
                    "properties": {
                        "consistencyMode": "str",
                        "excludeDisks": [{"id": "str"}],
                        "instanceView": {
                            "diskRestorePoints": [
                                {
                                    "id": "str",
                                    "replicationStatus": {
                                        "completionPercent": 0,
                                        "status": {
                                            "code": "str",
                                            "displayStatus": "str",
                                            "level": "str",
                                            "message": "str",
                                            "time": "2020-02-20 00:00:00",
                                        },
                                    },
                                    "snapshotAccessState": "str",
                                }
                            ],
                            "statuses": [
                                {
                                    "code": "str",
                                    "displayStatus": "str",
                                    "level": "str",
                                    "message": "str",
                                    "time": "2020-02-20 00:00:00",
                                }
                            ],
                        },
                        "instantAccessDurationMinutes": 0,
                        "provisioningState": "str",
                        "sourceMetadata": {
                            "diagnosticsProfile": {"bootDiagnostics": {"enabled": bool, "storageUri": "str"}},
                            "hardwareProfile": {
                                "vmSize": "str",
                                "vmSizeProperties": {"vCPUsAvailable": 0, "vCPUsPerCore": 0},
                            },
                            "hyperVGeneration": "str",
                            "licenseType": "str",
                            "location": "str",
                            "osProfile": {
                                "adminPassword": "str",
                                "adminUsername": "str",
                                "allowExtensionOperations": bool,
                                "computerName": "str",
                                "customData": "str",
                                "linuxConfiguration": {
                                    "disablePasswordAuthentication": bool,
                                    "enableVMAgentPlatformUpdates": bool,
                                    "patchSettings": {
                                        "assessmentMode": "str",
                                        "automaticByPlatformSettings": {
                                            "bypassPlatformSafetyChecksOnUserSchedule": bool,
                                            "rebootSetting": "str",
                                        },
                                        "patchMode": "str",
                                    },
                                    "provisionVMAgent": bool,
                                    "ssh": {"publicKeys": [{"keyData": "str", "path": "str"}]},
                                },
                                "requireGuestProvisionSignal": bool,
                                "secrets": [
                                    {
                                        "sourceVault": {"id": "str"},
                                        "vaultCertificates": [{"certificateStore": "str", "certificateUrl": "str"}],
                                    }
                                ],
                                "windowsConfiguration": {
                                    "additionalUnattendContent": [
                                        {
                                            "componentName": "str",
                                            "content": "str",
                                            "passName": "str",
                                            "settingName": "str",
                                        }
                                    ],
                                    "enableAutomaticUpdates": bool,
                                    "enableVMAgentPlatformUpdates": bool,
                                    "patchSettings": {
                                        "assessmentMode": "str",
                                        "automaticByPlatformSettings": {
                                            "bypassPlatformSafetyChecksOnUserSchedule": bool,
                                            "rebootSetting": "str",
                                        },
                                        "enableHotpatching": bool,
                                        "patchMode": "str",
                                    },
                                    "provisionVMAgent": bool,
                                    "timeZone": "str",
                                    "winRM": {"listeners": [{"certificateUrl": "str", "protocol": "str"}]},
                                },
                            },
                            "securityProfile": {
                                "encryptionAtHost": bool,
                                "encryptionIdentity": {"userAssignedIdentityResourceId": "str"},
                                "proxyAgentSettings": {
                                    "addProxyAgentExtension": bool,
                                    "enabled": bool,
                                    "imds": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"},
                                    "keyIncarnationId": 0,
                                    "mode": "str",
                                    "wireServer": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"},
                                },
                                "securityType": "str",
                                "uefiSettings": {"secureBootEnabled": bool, "vTpmEnabled": bool},
                            },
                            "storageProfile": {
                                "dataDisks": [
                                    {
                                        "caching": "str",
                                        "diskRestorePoint": {
                                            "encryption": {"diskEncryptionSet": {"id": "str"}, "type": "str"},
                                            "id": "str",
                                            "sourceDiskRestorePoint": {"id": "str"},
                                        },
                                        "diskSizeGB": 0,
                                        "lun": 0,
                                        "managedDisk": {
                                            "diskEncryptionSet": {"id": "str"},
                                            "id": "str",
                                            "securityProfile": {
                                                "diskEncryptionSet": {"id": "str"},
                                                "securityEncryptionType": "str",
                                            },
                                            "storageAccountType": "str",
                                        },
                                        "name": "str",
                                        "writeAcceleratorEnabled": bool,
                                    }
                                ],
                                "diskControllerType": "str",
                                "osDisk": {
                                    "caching": "str",
                                    "diskRestorePoint": {
                                        "encryption": {"diskEncryptionSet": {"id": "str"}, "type": "str"},
                                        "id": "str",
                                        "sourceDiskRestorePoint": {"id": "str"},
                                    },
                                    "diskSizeGB": 0,
                                    "encryptionSettings": {
                                        "diskEncryptionKey": {"secretUrl": "str", "sourceVault": {"id": "str"}},
                                        "enabled": bool,
                                        "keyEncryptionKey": {"keyUrl": "str", "sourceVault": {"id": "str"}},
                                    },
                                    "managedDisk": {
                                        "diskEncryptionSet": {"id": "str"},
                                        "id": "str",
                                        "securityProfile": {
                                            "diskEncryptionSet": {"id": "str"},
                                            "securityEncryptionType": "str",
                                        },
                                        "storageAccountType": "str",
                                    },
                                    "name": "str",
                                    "osType": "str",
                                    "writeAcceleratorEnabled": bool,
                                },
                            },
                            "userData": "str",
                            "vmId": "str",
                        },
                        "sourceRestorePoint": {"id": "str"},
                        "timeCreated": "2020-02-20 00:00:00",
                    },
                    "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",
                },
                api_version="2025-11-01",
            )
        ).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_restore_points_begin_delete(self, resource_group):
        response = await (
            await self.client.restore_points.begin_delete(
                resource_group_name=resource_group.name,
                restore_point_collection_name="str",
                restore_point_name="str",
                api_version="2025-11-01",
            )
        ).result()  # call '.result()' to poll until service return final result

        # please add some check logic here by yourself
        # ...
