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

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_exports_get(self, resource_group):
        response = self.client.exports.get(
            scope="str",
            export_name="str",
        )

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_exports_create_or_update(self, resource_group):
        response = self.client.exports.create_or_update(
            scope="str",
            export_name="str",
            parameters={
                "eTag": "str",
                "id": "str",
                "identity": {"type": "str", "principalId": "str", "tenantId": "str"},
                "location": "str",
                "name": "str",
                "properties": {
                    "definition": {
                        "timeframe": "str",
                        "type": "str",
                        "dataSet": {
                            "configuration": {
                                "columns": ["str"],
                                "dataVersion": "str",
                                "filters": [{"name": "str", "value": "str"}],
                            },
                            "granularity": "str",
                        },
                        "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"},
                    },
                    "deliveryInfo": {
                        "destination": {
                            "container": "str",
                            "resourceId": "str",
                            "rootFolderPath": "str",
                            "sasToken": "str",
                            "storageAccount": "str",
                            "type": "str",
                        }
                    },
                    "compressionMode": "str",
                    "dataOverwriteBehavior": "str",
                    "exportDescription": "str",
                    "format": "str",
                    "nextRunTimeEstimate": "2020-02-20 00:00:00",
                    "partitionData": bool,
                    "runHistory": {
                        "value": [
                            {
                                "eTag": "str",
                                "id": "str",
                                "name": "str",
                                "properties": {
                                    "endDate": "2020-02-20 00:00:00",
                                    "error": {"code": "str", "message": "str"},
                                    "executionType": "str",
                                    "fileName": "str",
                                    "manifestFile": "str",
                                    "processingEndTime": "2020-02-20 00:00:00",
                                    "processingStartTime": "2020-02-20 00:00:00",
                                    "runSettings": {
                                        "definition": {
                                            "timeframe": "str",
                                            "type": "str",
                                            "dataSet": {
                                                "configuration": {
                                                    "columns": ["str"],
                                                    "dataVersion": "str",
                                                    "filters": [{"name": "str", "value": "str"}],
                                                },
                                                "granularity": "str",
                                            },
                                            "timePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"},
                                        },
                                        "deliveryInfo": {
                                            "destination": {
                                                "container": "str",
                                                "resourceId": "str",
                                                "rootFolderPath": "str",
                                                "sasToken": "str",
                                                "storageAccount": "str",
                                                "type": "str",
                                            }
                                        },
                                        "compressionMode": "str",
                                        "dataOverwriteBehavior": "str",
                                        "exportDescription": "str",
                                        "format": "str",
                                        "nextRunTimeEstimate": "2020-02-20 00:00:00",
                                        "partitionData": bool,
                                        "runHistory": ...,
                                        "systemSuspensionContext": {
                                            "suspensionCode": "str",
                                            "suspensionReason": "str",
                                            "suspensionTime": "2020-02-20 00:00:00",
                                        },
                                    },
                                    "startDate": "2020-02-20 00:00:00",
                                    "status": "str",
                                    "submittedBy": "str",
                                    "submittedTime": "2020-02-20 00:00:00",
                                },
                                "type": "str",
                            }
                        ]
                    },
                    "schedule": {
                        "recurrence": "str",
                        "recurrencePeriod": {"from": "2020-02-20 00:00:00", "to": "2020-02-20 00:00:00"},
                        "status": "str",
                    },
                    "systemSuspensionContext": {
                        "suspensionCode": "str",
                        "suspensionReason": "str",
                        "suspensionTime": "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",
            },
        )

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_exports_delete(self, resource_group):
        response = self.client.exports.delete(
            scope="str",
            export_name="str",
        )

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_exports_list(self, resource_group):
        response = self.client.exports.list(
            scope="str",
        )

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_exports_execute(self, resource_group):
        response = self.client.exports.execute(
            scope="str",
            export_name="str",
        )

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

    @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
    @recorded_by_proxy
    def test_exports_get_execution_history(self, resource_group):
        response = self.client.exports.get_execution_history(
            scope="str",
            export_name="str",
        )

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