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

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 TestWebSiteManagement(AzureMgmtRecordedTestCase):
    def setup_method(self, method):
        self.client = self.create_mgmt_client(WebSiteManagementClient)

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_validate_move(self, resource_group):
        response = self.client.validate_move(
            resource_group_name=resource_group.name,
            move_resource_envelope={"resources": ["str"], "targetResourceGroup": "str"},
        )

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_validate(self, resource_group):
        response = self.client.validate(
            resource_group_name=resource_group.name,
            validate_request={
                "location": "str",
                "name": "str",
                "properties": {
                    "appServiceEnvironment": {
                        "virtualNetwork": {"id": "str", "name": "str", "subnet": "str", "type": "str"},
                        "clusterSettings": [{"name": "str", "value": "str"}],
                        "customDnsSuffixConfiguration": {
                            "id": "str",
                            "kind": "str",
                            "name": "str",
                            "properties": {
                                "certificateUrl": "str",
                                "dnsSuffix": "str",
                                "keyVaultReferenceIdentity": "str",
                                "provisioningDetails": "str",
                                "provisioningState": "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",
                        },
                        "dedicatedHostCount": 0,
                        "dnsSuffix": "str",
                        "frontEndScaleFactor": 0,
                        "hasLinuxWorkers": bool,
                        "internalLoadBalancingMode": "str",
                        "ipsslAddressCount": 0,
                        "maximumNumberOfMachines": 0,
                        "multiRoleCount": 0,
                        "multiSize": "str",
                        "networkingConfiguration": {
                            "id": "str",
                            "kind": "str",
                            "name": "str",
                            "properties": {
                                "allowNewPrivateEndpointConnections": bool,
                                "externalInboundIpAddresses": ["str"],
                                "ftpEnabled": bool,
                                "inboundIpAddressOverride": "str",
                                "internalInboundIpAddresses": ["str"],
                                "linuxOutboundIpAddresses": ["str"],
                                "remoteDebugEnabled": bool,
                                "windowsOutboundIpAddresses": ["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",
                        },
                        "provisioningState": "str",
                        "status": "str",
                        "suspended": bool,
                        "upgradeAvailability": "str",
                        "upgradePreference": "str",
                        "userWhitelistedIpRanges": ["str"],
                        "zoneRedundant": bool,
                    },
                    "capacity": 0,
                    "containerImagePlatform": "str",
                    "containerImageRepository": "str",
                    "containerImageTag": "str",
                    "containerRegistryBaseUrl": "str",
                    "containerRegistryPassword": "str",
                    "containerRegistryUsername": "str",
                    "hostingEnvironment": "str",
                    "isSpot": bool,
                    "isXenon": bool,
                    "needLinuxWorkers": bool,
                    "serverFarmId": "str",
                    "skuName": "str",
                },
                "type": "str",
            },
        )

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_get_subscription_deployment_locations(self, resource_group):
        response = self.client.get_subscription_deployment_locations()

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_list_ase_regions(self, resource_group):
        response = self.client.list_ase_regions()
        result = [r for r in response]
        # please add some check logic here by yourself
        # ...

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_list_billing_meters(self, resource_group):
        response = self.client.list_billing_meters()
        result = [r for r in response]
        # please add some check logic here by yourself
        # ...

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_check_name_availability(self, resource_group):
        response = self.client.check_name_availability(
            request={"name": "str", "type": "str", "environmentId": "str", "isFqdn": bool},
        )

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_list_custom_host_name_sites(self, resource_group):
        response = self.client.list_custom_host_name_sites()
        result = [r for r in response]
        # please add some check logic here by yourself
        # ...

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_list_geo_regions(self, resource_group):
        response = self.client.list_geo_regions()
        result = [r for r in response]
        # please add some check logic here by yourself
        # ...

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_list_site_identifiers_assigned_to_host_name(self, resource_group):
        response = self.client.list_site_identifiers_assigned_to_host_name(
            name_identifier={"name": "str"},
        )
        result = [r for r in response]
        # please add some check logic here by yourself
        # ...

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_regional_check_name_availability(self, resource_group):
        response = self.client.regional_check_name_availability(
            location="str",
            request={
                "name": "str",
                "type": "str",
                "autoGeneratedDomainNameLabelScope": "str",
                "resourceGroupName": "str",
            },
        )

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_list_premier_add_on_offers(self, resource_group):
        response = self.client.list_premier_add_on_offers()
        result = [r for r in response]
        # please add some check logic here by yourself
        # ...

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_list_skus(self, resource_group):
        response = self.client.list_skus()

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_verify_hosting_environment_vnet(self, resource_group):
        response = self.client.verify_hosting_environment_vnet(
            parameters={
                "id": "str",
                "kind": "str",
                "name": "str",
                "properties": {
                    "subnetResourceId": "str",
                    "vnetName": "str",
                    "vnetResourceGroup": "str",
                    "vnetSubnetName": "str",
                },
                "type": "str",
            },
        )

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_move(self, resource_group):
        response = self.client.move(
            resource_group_name=resource_group.name,
            move_resource_envelope={"resources": ["str"], "targetResourceGroup": "str"},
        )

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_get_publishing_user(self, resource_group):
        response = self.client.get_publishing_user()

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_update_publishing_user(self, resource_group):
        response = self.client.update_publishing_user(
            user_details={
                "id": "str",
                "kind": "str",
                "name": "str",
                "properties": {
                    "publishingUserName": "str",
                    "publishingPassword": "str",
                    "publishingPasswordHash": "str",
                    "publishingPasswordHashSalt": "str",
                    "scmUri": "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",
            },
        )

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_get_source_control(self, resource_group):
        response = self.client.get_source_control(
            source_control_type="str",
        )

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_update_source_control(self, resource_group):
        response = self.client.update_source_control(
            source_control_type="str",
            request_message={
                "id": "str",
                "kind": "str",
                "name": "str",
                "properties": {
                    "expirationTime": "2020-02-20 00:00:00",
                    "refreshToken": "str",
                    "token": "str",
                    "tokenSecret": "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",
            },
        )

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_list_source_controls(self, resource_group):
        response = self.client.list_source_controls()
        result = [r for r in response]
        # please add some check logic here by yourself
        # ...
