# coding: utf-8

"""
    Dashboards API

    Manage ThousandEyes Dashboards.

    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import json
import unittest
import thousandeyes_sdk.dashboards.models

from .test_utils import assert_constructed_model_matches_example_json
from thousandeyes_sdk.dashboards.api.dashboard_snapshots_api import DashboardSnapshotsApi


class TestDashboardSnapshotsApi(unittest.TestCase):
    """DashboardSnapshotsApi unit test stubs"""

    def setUp(self) -> None:
        self.api = DashboardSnapshotsApi()

    def tearDown(self) -> None:
        pass

    def test_create_dashboard_snapshot_models_validation(self) -> None:
        """Test case for create_dashboard_snapshot request and response models"""
        request_body_json = """
                {
                  "endDate" : "2023-05-16T10:14:28Z",
                  "dashboardId" : "646f4d2ce3c99b0536c3821e",
                  "displayName" : "snapshot from API",
                  "anonymizeData" : true,
                  "timezone" : "PST",
                  "startDate" : "2023-05-16T10:14:28Z",
                  "expirationDate" : "2023-05-16T10:14:28Z"
                }"""

        request_loaded_json = json.loads(request_body_json)
        request_from_json = thousandeyes_sdk.dashboards.models.GenerateDashboardSnapshotRequest.from_json(request_body_json)
        assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)

        response_body_json = """
                {
                  "snapshotId" : "d28bb71f-5a47-4783-8f12-d4b115e61b0c",
                  "_links" : {
                    "self" : {
                      "hreflang" : "hreflang",
                      "templated" : true,
                      "profile" : "profile",
                      "name" : "name",
                      "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                      "type" : "type",
                      "deprecation" : "deprecation",
                      "title" : "title"
                    }
                  }
                }"""

        response_loaded_json = json.loads(response_body_json)
        response_from_json = thousandeyes_sdk.dashboards.models.DashboardSnapshotResponse.from_json(response_body_json)
        assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)

    def test_delete_dashboard_snapshot_models_validation(self) -> None:
        """Test case for delete_dashboard_snapshot request and response models"""


    def test_get_dashboard_snapshot_models_validation(self) -> None:
        """Test case for get_dashboard_snapshot request and response models"""

        response_body_json = """
                {
                  "snapshotId" : "d28bb71f-5a47-4783-8f12-d4b115e61b0c",
                  "_links" : {
                    "appLink" : {
                      "hreflang" : "hreflang",
                      "templated" : true,
                      "profile" : "profile",
                      "name" : "name",
                      "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                      "type" : "type",
                      "deprecation" : "deprecation",
                      "title" : "title"
                    },
                    "self" : {
                      "hreflang" : "hreflang",
                      "templated" : true,
                      "profile" : "profile",
                      "name" : "name",
                      "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                      "type" : "type",
                      "deprecation" : "deprecation",
                      "title" : "title"
                    }
                  },
                  "apiLinks" : [ {
                    "key" : ""
                  }, {
                    "key" : ""
                  } ],
                  "snapshotExpirationDate" : "2023-05-16T10:14:28Z",
                  "isScheduled" : true,
                  "widgets" : [ {
                    "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f",
                    "shouldExcludeAlertSuppressionWindows" : true,
                    "_links" : {
                      "self" : {
                        "hreflang" : "hreflang",
                        "templated" : true,
                        "profile" : "profile",
                        "name" : "name",
                        "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                        "type" : "type",
                        "deprecation" : "deprecation",
                        "title" : "title"
                      }
                    },
                    "visualMode" : "Full",
                    "filters" : {
                      "TEST" : [ 5187, 5227 ],
                      "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ]
                    },
                    "title" : "Widget Title",
                    "type" : "Agent Status",
                    "metricGroup" : "BGP",
                    "measure" : {
                      "percentileValue" : 95.0,
                      "type" : "MEAN"
                    },
                    "apiLink" : "apiLink",
                    "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT",
                    "isEmbedded" : true,
                    "id" : "1234",
                    "fixedTimespan" : {
                      "unit" : "Days",
                      "value" : 10
                    },
                    "dataSource" : "ENDPOINT_AGENTS",
                    "direction" : "FROM_TARGET"
                  }, {
                    "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f",
                    "shouldExcludeAlertSuppressionWindows" : true,
                    "_links" : {
                      "self" : {
                        "hreflang" : "hreflang",
                        "templated" : true,
                        "profile" : "profile",
                        "name" : "name",
                        "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                        "type" : "type",
                        "deprecation" : "deprecation",
                        "title" : "title"
                      }
                    },
                    "visualMode" : "Full",
                    "filters" : {
                      "TEST" : [ 5187, 5227 ],
                      "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ]
                    },
                    "title" : "Widget Title",
                    "type" : "Agent Status",
                    "metricGroup" : "BGP",
                    "measure" : {
                      "percentileValue" : 95.0,
                      "type" : "MEAN"
                    },
                    "apiLink" : "apiLink",
                    "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT",
                    "isEmbedded" : true,
                    "id" : "1234",
                    "fixedTimespan" : {
                      "unit" : "Days",
                      "value" : 10
                    },
                    "dataSource" : "ENDPOINT_AGENTS",
                    "direction" : "FROM_TARGET"
                  } ],
                  "accountId" : 1234,
                  "createdDate" : "2023-05-16 10:14:28",
                  "snapshotName" : "HTTP Server Dashboard Snapshot",
                  "timeSpan" : {
                    "duration" : 60,
                    "start" : "2023-05-16T10:14:28Z",
                    "startDate" : "2023-05-16 10:14:28"
                  },
                  "permalink" : "https://app.thousandeyes.com/dashboard/?snapshotId=d28bb71f-5a47-4783-8f12-d4b115e61b0c",
                  "aid" : "1234",
                  "snapshotCreatedDate" : "2023-05-16T10:14:28Z",
                  "isShared" : true,
                  "dashboard" : {
                    "isMigratedReport" : false,
                    "dashboardCreatedBy" : "1",
                    "_links" : {
                      "snapshots" : {
                        "hreflang" : "hreflang",
                        "templated" : true,
                        "profile" : "profile",
                        "name" : "name",
                        "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                        "type" : "type",
                        "deprecation" : "deprecation",
                        "title" : "title"
                      },
                      "self" : {
                        "hreflang" : "hreflang",
                        "templated" : true,
                        "profile" : "profile",
                        "name" : "name",
                        "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                        "type" : "type",
                        "deprecation" : "deprecation",
                        "title" : "title"
                      }
                    },
                    "dashboardModifiedBy" : "1",
                    "migratedReport" : false,
                    "isDefaultForAccount" : false,
                    "isDefaultForUser" : true,
                    "description" : "HTTP Server Widgets",
                    "isPrivate" : true,
                    "title" : "HTTP Server Widgets",
                    "isBuiltIn" : true,
                    "widgets" : [ {
                      "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f",
                      "shouldExcludeAlertSuppressionWindows" : true,
                      "_links" : {
                        "self" : {
                          "hreflang" : "hreflang",
                          "templated" : true,
                          "profile" : "profile",
                          "name" : "name",
                          "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                          "type" : "type",
                          "deprecation" : "deprecation",
                          "title" : "title"
                        }
                      },
                      "visualMode" : "Full",
                      "filters" : {
                        "TEST" : [ 5187, 5227 ],
                        "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ]
                      },
                      "title" : "Widget Title",
                      "type" : "Agent Status",
                      "metricGroup" : "BGP",
                      "measure" : {
                        "percentileValue" : 95.0,
                        "type" : "MEAN"
                      },
                      "apiLink" : "apiLink",
                      "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT",
                      "isEmbedded" : true,
                      "id" : "1234",
                      "fixedTimespan" : {
                        "unit" : "Days",
                        "value" : 10
                      },
                      "dataSource" : "ENDPOINT_AGENTS",
                      "direction" : "FROM_TARGET"
                    }, {
                      "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f",
                      "shouldExcludeAlertSuppressionWindows" : true,
                      "_links" : {
                        "self" : {
                          "hreflang" : "hreflang",
                          "templated" : true,
                          "profile" : "profile",
                          "name" : "name",
                          "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                          "type" : "type",
                          "deprecation" : "deprecation",
                          "title" : "title"
                        }
                      },
                      "visualMode" : "Full",
                      "filters" : {
                        "TEST" : [ 5187, 5227 ],
                        "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ]
                      },
                      "title" : "Widget Title",
                      "type" : "Agent Status",
                      "metricGroup" : "BGP",
                      "measure" : {
                        "percentileValue" : 95.0,
                        "type" : "MEAN"
                      },
                      "apiLink" : "apiLink",
                      "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT",
                      "isEmbedded" : true,
                      "id" : "1234",
                      "fixedTimespan" : {
                        "unit" : "Days",
                        "value" : 10
                      },
                      "dataSource" : "ENDPOINT_AGENTS",
                      "direction" : "FROM_TARGET"
                    } ],
                    "defaultTimespan" : {
                      "duration" : 7200,
                      "timespanDuration" : 7200,
                      "start" : "2023-05-16T10:14:28Z",
                      "end" : "2023-05-16T11:14:28Z",
                      "timespanStart" : "2023-05-16 10:14:28",
                      "timespanEnd" : "2023-05-16 11:14:28"
                    },
                    "globalFilterId" : "65babd9bb90bf55b17c96c8d",
                    "accountId" : 1234,
                    "apiLink" : [ {
                      "key" : ""
                    }, {
                      "key" : ""
                    } ],
                    "dashboardId" : "5e1f7a99143ae6004fdc3bb4",
                    "createdBy" : 1,
                    "globalOverride" : true,
                    "modifiedDate" : "2023-05-16 10:14:28",
                    "modifiedBy" : 1,
                    "isGlobalOverride" : true,
                    "aid" : "1234",
                    "dashboardModifiedDate" : "2023-05-16T10:14:28Z"
                  },
                  "expirationDate" : "2023-05-16 10:14:28"
                }"""

        response_loaded_json = json.loads(response_body_json)
        response_from_json = thousandeyes_sdk.dashboards.models.ApiDashboardSnapshot.from_json(response_body_json)
        assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)

    def test_get_dashboard_snapshot_widget_data_models_validation(self) -> None:
        """Test case for get_dashboard_snapshot_widget_data request and response models"""

        response_body_json = """
                {
                  "groupLabels" : [ {
                    "groupProperty" : "AGENT",
                    "groupLabels" : [ {
                      "groupId" : "2565",
                      "groupLabel" : "San Francisco, CA"
                    }, {
                      "groupId" : "2565",
                      "groupLabel" : "San Francisco, CA"
                    } ]
                  }, {
                    "groupProperty" : "AGENT",
                    "groupLabels" : [ {
                      "groupId" : "2565",
                      "groupLabel" : "San Francisco, CA"
                    }, {
                      "groupId" : "2565",
                      "groupLabel" : "San Francisco, CA"
                    } ]
                  } ],
                  "data" : {
                    "alerts" : [ {
                      "alertType" : "network-end-to-end-server",
                      "durationInSeconds" : 25,
                      "alertSource" : "Http Test",
                      "active" : true,
                      "testId" : "56512",
                      "startTime" : "2023-06-02T08:54:00Z",
                      "alertId" : "2004945",
                      "ruleId" : "281724",
                      "alertRule" : "Http Test Rule"
                    }, {
                      "alertType" : "network-end-to-end-server",
                      "durationInSeconds" : 25,
                      "alertSource" : "Http Test",
                      "active" : true,
                      "testId" : "56512",
                      "startTime" : "2023-06-02T08:54:00Z",
                      "alertId" : "2004945",
                      "ruleId" : "281724",
                      "alertRule" : "Http Test Rule"
                    } ],
                    "summary" : {
                      "offline" : 2,
                      "online" : 10,
                      "disabled" : 3
                    },
                    "totalAlerts" : 500,
                    "cards" : [ {
                      "numberOfDataPoints" : 24192,
                      "endDate" : "2023-05-16T10:14:28Z",
                      "cardId" : "lrxxr",
                      "alertSuppressionWindows" : [ {
                        "testIds" : [ "281474976710661" ],
                        "repeatUnit" : "week",
                        "durationInSeconds" : 7200,
                        "repeat" : "custom",
                        "name" : "Test dashboards",
                        "repeatEvery" : 5,
                        "id" : "281474976710662",
                        "startTimes" : [ "2023-05-16T10:14:28Z" ]
                      }, {
                        "testIds" : [ "281474976710661" ],
                        "repeatUnit" : "week",
                        "durationInSeconds" : 7200,
                        "repeat" : "custom",
                        "name" : "Test dashboards",
                        "repeatEvery" : 5,
                        "id" : "281474976710662",
                        "startTimes" : [ "2023-05-16T10:14:28Z" ]
                      } ],
                      "binSize" : 3600,
                      "previousValue" : 500.0,
                      "value" : 100.0,
                      "startDate" : "2023-05-16T10:14:28Z",
                      "timestamp" : 1567620000,
                      "status" : "No data"
                    }, {
                      "numberOfDataPoints" : 24192,
                      "endDate" : "2023-05-16T10:14:28Z",
                      "cardId" : "lrxxr",
                      "alertSuppressionWindows" : [ {
                        "testIds" : [ "281474976710661" ],
                        "repeatUnit" : "week",
                        "durationInSeconds" : 7200,
                        "repeat" : "custom",
                        "name" : "Test dashboards",
                        "repeatEvery" : 5,
                        "id" : "281474976710662",
                        "startTimes" : [ "2023-05-16T10:14:28Z" ]
                      }, {
                        "testIds" : [ "281474976710661" ],
                        "repeatUnit" : "week",
                        "durationInSeconds" : 7200,
                        "repeat" : "custom",
                        "name" : "Test dashboards",
                        "repeatEvery" : 5,
                        "id" : "281474976710662",
                        "startTimes" : [ "2023-05-16T10:14:28Z" ]
                      } ],
                      "binSize" : 3600,
                      "previousValue" : 500.0,
                      "value" : 100.0,
                      "startDate" : "2023-05-16T10:14:28Z",
                      "timestamp" : 1567620000,
                      "status" : "No data"
                    } ],
                    "tests" : [ {
                      "graphlets" : [ {
                        "metric" : "Availability",
                        "testId" : "68257",
                        "points" : [ {
                          "x" : 1580403900,
                          "y" : 128.249
                        }, {
                          "x" : 1580403900,
                          "y" : 128.249
                        } ]
                      }, {
                        "metric" : "Availability",
                        "testId" : "68257",
                        "points" : [ {
                          "x" : 1580403900,
                          "y" : 128.249
                        }, {
                          "x" : 1580403900,
                          "y" : 128.249
                        } ]
                      } ],
                      "alertCount" : 398,
                      "testType" : "Web - HTTP Server",
                      "testId" : "68256",
                      "isShared" : true,
                      "testName" : "Http Test Name",
                      "target" : "www.google.com"
                    }, {
                      "graphlets" : [ {
                        "metric" : "Availability",
                        "testId" : "68257",
                        "points" : [ {
                          "x" : 1580403900,
                          "y" : 128.249
                        }, {
                          "x" : 1580403900,
                          "y" : 128.249
                        } ]
                      }, {
                        "metric" : "Availability",
                        "testId" : "68257",
                        "points" : [ {
                          "x" : 1580403900,
                          "y" : 128.249
                        }, {
                          "x" : 1580403900,
                          "y" : 128.249
                        } ]
                      } ],
                      "alertCount" : 398,
                      "testType" : "Web - HTTP Server",
                      "testId" : "68256",
                      "isShared" : true,
                      "testName" : "Http Test Name",
                      "target" : "www.google.com"
                    } ],
                    "columns" : [ {
                      "columnId" : "938to",
                      "alertSuppressionWindows" : [ {
                        "testIds" : [ "281474976710661" ],
                        "repeatUnit" : "week",
                        "durationInSeconds" : 7200,
                        "repeat" : "custom",
                        "name" : "Test dashboards",
                        "repeatEvery" : 5,
                        "id" : "281474976710662",
                        "startTimes" : [ "2023-05-16T10:14:28Z" ]
                      }, {
                        "testIds" : [ "281474976710661" ],
                        "repeatUnit" : "week",
                        "durationInSeconds" : 7200,
                        "repeat" : "custom",
                        "name" : "Test dashboards",
                        "repeatEvery" : 5,
                        "id" : "281474976710662",
                        "startTimes" : [ "2023-05-16T10:14:28Z" ]
                      } ],
                      "binSize" : 3600,
                      "points" : [ {
                        "numberOfDataPoints" : 23304,
                        "groups" : [ {
                          "groupProperty" : "COUNTRY",
                          "groupValue" : "US"
                        }, {
                          "groupProperty" : "COUNTRY",
                          "groupValue" : "US"
                        } ],
                        "value" : 100.0,
                        "timestamp" : 1567620000
                      }, {
                        "numberOfDataPoints" : 23304,
                        "groups" : [ {
                          "groupProperty" : "COUNTRY",
                          "groupValue" : "US"
                        }, {
                          "groupProperty" : "COUNTRY",
                          "groupValue" : "US"
                        } ],
                        "value" : 100.0,
                        "timestamp" : 1567620000
                      } ],
                      "status" : "No data"
                    }, {
                      "columnId" : "938to",
                      "alertSuppressionWindows" : [ {
                        "testIds" : [ "281474976710661" ],
                        "repeatUnit" : "week",
                        "durationInSeconds" : 7200,
                        "repeat" : "custom",
                        "name" : "Test dashboards",
                        "repeatEvery" : 5,
                        "id" : "281474976710662",
                        "startTimes" : [ "2023-05-16T10:14:28Z" ]
                      }, {
                        "testIds" : [ "281474976710661" ],
                        "repeatUnit" : "week",
                        "durationInSeconds" : 7200,
                        "repeat" : "custom",
                        "name" : "Test dashboards",
                        "repeatEvery" : 5,
                        "id" : "281474976710662",
                        "startTimes" : [ "2023-05-16T10:14:28Z" ]
                      } ],
                      "binSize" : 3600,
                      "points" : [ {
                        "numberOfDataPoints" : 23304,
                        "groups" : [ {
                          "groupProperty" : "COUNTRY",
                          "groupValue" : "US"
                        }, {
                          "groupProperty" : "COUNTRY",
                          "groupValue" : "US"
                        } ],
                        "value" : 100.0,
                        "timestamp" : 1567620000
                      }, {
                        "numberOfDataPoints" : 23304,
                        "groups" : [ {
                          "groupProperty" : "COUNTRY",
                          "groupValue" : "US"
                        }, {
                          "groupProperty" : "COUNTRY",
                          "groupValue" : "US"
                        } ],
                        "value" : 100.0,
                        "timestamp" : 1567620000
                      } ],
                      "status" : "No data"
                    } ],
                    "alertSuppressionWindows" : [ {
                      "testIds" : [ "281474976710661" ],
                      "repeatUnit" : "week",
                      "durationInSeconds" : 7200,
                      "repeat" : "custom",
                      "name" : "Test dashboards",
                      "repeatEvery" : 5,
                      "id" : "281474976710662",
                      "startTimes" : [ "2023-05-16T10:14:28Z" ]
                    }, {
                      "testIds" : [ "281474976710661" ],
                      "repeatUnit" : "week",
                      "durationInSeconds" : 7200,
                      "repeat" : "custom",
                      "name" : "Test dashboards",
                      "repeatEvery" : 5,
                      "id" : "281474976710662",
                      "startTimes" : [ "2023-05-16T10:14:28Z" ]
                    } ],
                    "activeAlerts" : 483,
                    "startRound" : 1384309800,
                    "points" : [ {
                      "numberOfDataPoints" : 23304,
                      "groups" : [ {
                        "groupProperty" : "COUNTRY",
                        "groupValue" : "US"
                      }, {
                        "groupProperty" : "COUNTRY",
                        "groupValue" : "US"
                      } ],
                      "value" : 100.0,
                      "timestamp" : 1567620000
                    }, {
                      "numberOfDataPoints" : 23304,
                      "groups" : [ {
                        "groupProperty" : "COUNTRY",
                        "groupValue" : "US"
                      }, {
                        "groupProperty" : "COUNTRY",
                        "groupValue" : "US"
                      } ],
                      "value" : 100.0,
                      "timestamp" : 1567620000
                    } ],
                    "agents" : [ {
                      "agentId" : "6522",
                      "agentName" : "0c3898000117",
                      "location" : {
                        "locationName" : "San Francisco, California, US",
                        "latitude" : 37.77493,
                        "longitude" : -122.41942
                      },
                      "ipInfo" : {
                        "ipv6" : "ipv6",
                        "privateIp" : "172.58.92.31",
                        "operativeSystemVersion" : "operativeSystemVersion",
                        "publicIp" : "172.58.92.31"
                      },
                      "status" : "online"
                    }, {
                      "agentId" : "6522",
                      "agentName" : "0c3898000117",
                      "location" : {
                        "locationName" : "San Francisco, California, US",
                        "latitude" : 37.77493,
                        "longitude" : -122.41942
                      },
                      "ipInfo" : {
                        "ipv6" : "ipv6",
                        "privateIp" : "172.58.92.31",
                        "operativeSystemVersion" : "operativeSystemVersion",
                        "publicIp" : "172.58.92.31"
                      },
                      "status" : "online"
                    } ],
                    "status" : "No data"
                  },
                  "endDate" : "2022-07-18T22:00:54Z",
                  "_links" : {
                    "self" : {
                      "hreflang" : "hreflang",
                      "templated" : true,
                      "profile" : "profile",
                      "name" : "name",
                      "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                      "type" : "type",
                      "deprecation" : "deprecation",
                      "title" : "title"
                    }
                  },
                  "binSize" : 3600,
                  "startDate" : "2022-07-17T22:00:54Z"
                }"""

        response_loaded_json = json.loads(response_body_json)
        response_from_json = thousandeyes_sdk.dashboards.models.ApiWidgetDataSnapshotResponse.from_json(response_body_json)
        assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)

    def test_get_dashboard_snapshots_models_validation(self) -> None:
        """Test case for get_dashboard_snapshots request and response models"""

        response_body_json = """
                {
                  "pages" : {
                    "key" : ""
                  },
                  "_links" : {
                    "next" : {
                      "hreflang" : "hreflang",
                      "templated" : true,
                      "profile" : "profile",
                      "name" : "name",
                      "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                      "type" : "type",
                      "deprecation" : "deprecation",
                      "title" : "title"
                    },
                    "previous" : {
                      "hreflang" : "hreflang",
                      "templated" : true,
                      "profile" : "profile",
                      "name" : "name",
                      "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                      "type" : "type",
                      "deprecation" : "deprecation",
                      "title" : "title"
                    },
                    "self" : {
                      "hreflang" : "hreflang",
                      "templated" : true,
                      "profile" : "profile",
                      "name" : "name",
                      "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                      "type" : "type",
                      "deprecation" : "deprecation",
                      "title" : "title"
                    }
                  },
                  "dashboardSnapshots" : [ {
                    "snapshotId" : "d28bb71f-5a47-4783-8f12-d4b115e61b0c",
                    "_links" : {
                      "appLink" : {
                        "hreflang" : "hreflang",
                        "templated" : true,
                        "profile" : "profile",
                        "name" : "name",
                        "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                        "type" : "type",
                        "deprecation" : "deprecation",
                        "title" : "title"
                      },
                      "self" : {
                        "hreflang" : "hreflang",
                        "templated" : true,
                        "profile" : "profile",
                        "name" : "name",
                        "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                        "type" : "type",
                        "deprecation" : "deprecation",
                        "title" : "title"
                      }
                    },
                    "apiLinks" : [ {
                      "key" : ""
                    }, {
                      "key" : ""
                    } ],
                    "snapshotExpirationDate" : "2023-05-16T10:14:28Z",
                    "isScheduled" : true,
                    "widgets" : [ {
                      "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f",
                      "shouldExcludeAlertSuppressionWindows" : true,
                      "_links" : {
                        "self" : {
                          "hreflang" : "hreflang",
                          "templated" : true,
                          "profile" : "profile",
                          "name" : "name",
                          "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                          "type" : "type",
                          "deprecation" : "deprecation",
                          "title" : "title"
                        }
                      },
                      "visualMode" : "Full",
                      "filters" : {
                        "TEST" : [ 5187, 5227 ],
                        "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ]
                      },
                      "title" : "Widget Title",
                      "type" : "Agent Status",
                      "metricGroup" : "BGP",
                      "measure" : {
                        "percentileValue" : 95.0,
                        "type" : "MEAN"
                      },
                      "apiLink" : "apiLink",
                      "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT",
                      "isEmbedded" : true,
                      "id" : "1234",
                      "fixedTimespan" : {
                        "unit" : "Days",
                        "value" : 10
                      },
                      "dataSource" : "ENDPOINT_AGENTS",
                      "direction" : "FROM_TARGET"
                    }, {
                      "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f",
                      "shouldExcludeAlertSuppressionWindows" : true,
                      "_links" : {
                        "self" : {
                          "hreflang" : "hreflang",
                          "templated" : true,
                          "profile" : "profile",
                          "name" : "name",
                          "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                          "type" : "type",
                          "deprecation" : "deprecation",
                          "title" : "title"
                        }
                      },
                      "visualMode" : "Full",
                      "filters" : {
                        "TEST" : [ 5187, 5227 ],
                        "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ]
                      },
                      "title" : "Widget Title",
                      "type" : "Agent Status",
                      "metricGroup" : "BGP",
                      "measure" : {
                        "percentileValue" : 95.0,
                        "type" : "MEAN"
                      },
                      "apiLink" : "apiLink",
                      "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT",
                      "isEmbedded" : true,
                      "id" : "1234",
                      "fixedTimespan" : {
                        "unit" : "Days",
                        "value" : 10
                      },
                      "dataSource" : "ENDPOINT_AGENTS",
                      "direction" : "FROM_TARGET"
                    } ],
                    "accountId" : 1234,
                    "createdDate" : "2023-05-16 10:14:28",
                    "snapshotName" : "HTTP Server Dashboard Snapshot",
                    "timeSpan" : {
                      "duration" : 60,
                      "start" : "2023-05-16T10:14:28Z",
                      "startDate" : "2023-05-16 10:14:28"
                    },
                    "permalink" : "https://app.thousandeyes.com/dashboard/?snapshotId=d28bb71f-5a47-4783-8f12-d4b115e61b0c",
                    "aid" : "1234",
                    "snapshotCreatedDate" : "2023-05-16T10:14:28Z",
                    "isShared" : true,
                    "dashboard" : {
                      "isMigratedReport" : false,
                      "dashboardCreatedBy" : "1",
                      "_links" : {
                        "snapshots" : {
                          "hreflang" : "hreflang",
                          "templated" : true,
                          "profile" : "profile",
                          "name" : "name",
                          "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                          "type" : "type",
                          "deprecation" : "deprecation",
                          "title" : "title"
                        },
                        "self" : {
                          "hreflang" : "hreflang",
                          "templated" : true,
                          "profile" : "profile",
                          "name" : "name",
                          "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                          "type" : "type",
                          "deprecation" : "deprecation",
                          "title" : "title"
                        }
                      },
                      "dashboardModifiedBy" : "1",
                      "migratedReport" : false,
                      "isDefaultForAccount" : false,
                      "isDefaultForUser" : true,
                      "description" : "HTTP Server Widgets",
                      "isPrivate" : true,
                      "title" : "HTTP Server Widgets",
                      "isBuiltIn" : true,
                      "widgets" : [ {
                        "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f",
                        "shouldExcludeAlertSuppressionWindows" : true,
                        "_links" : {
                          "self" : {
                            "hreflang" : "hreflang",
                            "templated" : true,
                            "profile" : "profile",
                            "name" : "name",
                            "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                            "type" : "type",
                            "deprecation" : "deprecation",
                            "title" : "title"
                          }
                        },
                        "visualMode" : "Full",
                        "filters" : {
                          "TEST" : [ 5187, 5227 ],
                          "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ]
                        },
                        "title" : "Widget Title",
                        "type" : "Agent Status",
                        "metricGroup" : "BGP",
                        "measure" : {
                          "percentileValue" : 95.0,
                          "type" : "MEAN"
                        },
                        "apiLink" : "apiLink",
                        "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT",
                        "isEmbedded" : true,
                        "id" : "1234",
                        "fixedTimespan" : {
                          "unit" : "Days",
                          "value" : 10
                        },
                        "dataSource" : "ENDPOINT_AGENTS",
                        "direction" : "FROM_TARGET"
                      }, {
                        "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f",
                        "shouldExcludeAlertSuppressionWindows" : true,
                        "_links" : {
                          "self" : {
                            "hreflang" : "hreflang",
                            "templated" : true,
                            "profile" : "profile",
                            "name" : "name",
                            "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                            "type" : "type",
                            "deprecation" : "deprecation",
                            "title" : "title"
                          }
                        },
                        "visualMode" : "Full",
                        "filters" : {
                          "TEST" : [ 5187, 5227 ],
                          "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ]
                        },
                        "title" : "Widget Title",
                        "type" : "Agent Status",
                        "metricGroup" : "BGP",
                        "measure" : {
                          "percentileValue" : 95.0,
                          "type" : "MEAN"
                        },
                        "apiLink" : "apiLink",
                        "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT",
                        "isEmbedded" : true,
                        "id" : "1234",
                        "fixedTimespan" : {
                          "unit" : "Days",
                          "value" : 10
                        },
                        "dataSource" : "ENDPOINT_AGENTS",
                        "direction" : "FROM_TARGET"
                      } ],
                      "defaultTimespan" : {
                        "duration" : 7200,
                        "timespanDuration" : 7200,
                        "start" : "2023-05-16T10:14:28Z",
                        "end" : "2023-05-16T11:14:28Z",
                        "timespanStart" : "2023-05-16 10:14:28",
                        "timespanEnd" : "2023-05-16 11:14:28"
                      },
                      "globalFilterId" : "65babd9bb90bf55b17c96c8d",
                      "accountId" : 1234,
                      "apiLink" : [ {
                        "key" : ""
                      }, {
                        "key" : ""
                      } ],
                      "dashboardId" : "5e1f7a99143ae6004fdc3bb4",
                      "createdBy" : 1,
                      "globalOverride" : true,
                      "modifiedDate" : "2023-05-16 10:14:28",
                      "modifiedBy" : 1,
                      "isGlobalOverride" : true,
                      "aid" : "1234",
                      "dashboardModifiedDate" : "2023-05-16T10:14:28Z"
                    },
                    "expirationDate" : "2023-05-16 10:14:28"
                  }, {
                    "snapshotId" : "d28bb71f-5a47-4783-8f12-d4b115e61b0c",
                    "_links" : {
                      "appLink" : {
                        "hreflang" : "hreflang",
                        "templated" : true,
                        "profile" : "profile",
                        "name" : "name",
                        "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                        "type" : "type",
                        "deprecation" : "deprecation",
                        "title" : "title"
                      },
                      "self" : {
                        "hreflang" : "hreflang",
                        "templated" : true,
                        "profile" : "profile",
                        "name" : "name",
                        "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                        "type" : "type",
                        "deprecation" : "deprecation",
                        "title" : "title"
                      }
                    },
                    "apiLinks" : [ {
                      "key" : ""
                    }, {
                      "key" : ""
                    } ],
                    "snapshotExpirationDate" : "2023-05-16T10:14:28Z",
                    "isScheduled" : true,
                    "widgets" : [ {
                      "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f",
                      "shouldExcludeAlertSuppressionWindows" : true,
                      "_links" : {
                        "self" : {
                          "hreflang" : "hreflang",
                          "templated" : true,
                          "profile" : "profile",
                          "name" : "name",
                          "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                          "type" : "type",
                          "deprecation" : "deprecation",
                          "title" : "title"
                        }
                      },
                      "visualMode" : "Full",
                      "filters" : {
                        "TEST" : [ 5187, 5227 ],
                        "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ]
                      },
                      "title" : "Widget Title",
                      "type" : "Agent Status",
                      "metricGroup" : "BGP",
                      "measure" : {
                        "percentileValue" : 95.0,
                        "type" : "MEAN"
                      },
                      "apiLink" : "apiLink",
                      "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT",
                      "isEmbedded" : true,
                      "id" : "1234",
                      "fixedTimespan" : {
                        "unit" : "Days",
                        "value" : 10
                      },
                      "dataSource" : "ENDPOINT_AGENTS",
                      "direction" : "FROM_TARGET"
                    }, {
                      "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f",
                      "shouldExcludeAlertSuppressionWindows" : true,
                      "_links" : {
                        "self" : {
                          "hreflang" : "hreflang",
                          "templated" : true,
                          "profile" : "profile",
                          "name" : "name",
                          "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                          "type" : "type",
                          "deprecation" : "deprecation",
                          "title" : "title"
                        }
                      },
                      "visualMode" : "Full",
                      "filters" : {
                        "TEST" : [ 5187, 5227 ],
                        "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ]
                      },
                      "title" : "Widget Title",
                      "type" : "Agent Status",
                      "metricGroup" : "BGP",
                      "measure" : {
                        "percentileValue" : 95.0,
                        "type" : "MEAN"
                      },
                      "apiLink" : "apiLink",
                      "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT",
                      "isEmbedded" : true,
                      "id" : "1234",
                      "fixedTimespan" : {
                        "unit" : "Days",
                        "value" : 10
                      },
                      "dataSource" : "ENDPOINT_AGENTS",
                      "direction" : "FROM_TARGET"
                    } ],
                    "accountId" : 1234,
                    "createdDate" : "2023-05-16 10:14:28",
                    "snapshotName" : "HTTP Server Dashboard Snapshot",
                    "timeSpan" : {
                      "duration" : 60,
                      "start" : "2023-05-16T10:14:28Z",
                      "startDate" : "2023-05-16 10:14:28"
                    },
                    "permalink" : "https://app.thousandeyes.com/dashboard/?snapshotId=d28bb71f-5a47-4783-8f12-d4b115e61b0c",
                    "aid" : "1234",
                    "snapshotCreatedDate" : "2023-05-16T10:14:28Z",
                    "isShared" : true,
                    "dashboard" : {
                      "isMigratedReport" : false,
                      "dashboardCreatedBy" : "1",
                      "_links" : {
                        "snapshots" : {
                          "hreflang" : "hreflang",
                          "templated" : true,
                          "profile" : "profile",
                          "name" : "name",
                          "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                          "type" : "type",
                          "deprecation" : "deprecation",
                          "title" : "title"
                        },
                        "self" : {
                          "hreflang" : "hreflang",
                          "templated" : true,
                          "profile" : "profile",
                          "name" : "name",
                          "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                          "type" : "type",
                          "deprecation" : "deprecation",
                          "title" : "title"
                        }
                      },
                      "dashboardModifiedBy" : "1",
                      "migratedReport" : false,
                      "isDefaultForAccount" : false,
                      "isDefaultForUser" : true,
                      "description" : "HTTP Server Widgets",
                      "isPrivate" : true,
                      "title" : "HTTP Server Widgets",
                      "isBuiltIn" : true,
                      "widgets" : [ {
                        "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f",
                        "shouldExcludeAlertSuppressionWindows" : true,
                        "_links" : {
                          "self" : {
                            "hreflang" : "hreflang",
                            "templated" : true,
                            "profile" : "profile",
                            "name" : "name",
                            "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                            "type" : "type",
                            "deprecation" : "deprecation",
                            "title" : "title"
                          }
                        },
                        "visualMode" : "Full",
                        "filters" : {
                          "TEST" : [ 5187, 5227 ],
                          "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ]
                        },
                        "title" : "Widget Title",
                        "type" : "Agent Status",
                        "metricGroup" : "BGP",
                        "measure" : {
                          "percentileValue" : 95.0,
                          "type" : "MEAN"
                        },
                        "apiLink" : "apiLink",
                        "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT",
                        "isEmbedded" : true,
                        "id" : "1234",
                        "fixedTimespan" : {
                          "unit" : "Days",
                          "value" : 10
                        },
                        "dataSource" : "ENDPOINT_AGENTS",
                        "direction" : "FROM_TARGET"
                      }, {
                        "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f",
                        "shouldExcludeAlertSuppressionWindows" : true,
                        "_links" : {
                          "self" : {
                            "hreflang" : "hreflang",
                            "templated" : true,
                            "profile" : "profile",
                            "name" : "name",
                            "href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
                            "type" : "type",
                            "deprecation" : "deprecation",
                            "title" : "title"
                          }
                        },
                        "visualMode" : "Full",
                        "filters" : {
                          "TEST" : [ 5187, 5227 ],
                          "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ]
                        },
                        "title" : "Widget Title",
                        "type" : "Agent Status",
                        "metricGroup" : "BGP",
                        "measure" : {
                          "percentileValue" : 95.0,
                          "type" : "MEAN"
                        },
                        "apiLink" : "apiLink",
                        "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT",
                        "isEmbedded" : true,
                        "id" : "1234",
                        "fixedTimespan" : {
                          "unit" : "Days",
                          "value" : 10
                        },
                        "dataSource" : "ENDPOINT_AGENTS",
                        "direction" : "FROM_TARGET"
                      } ],
                      "defaultTimespan" : {
                        "duration" : 7200,
                        "timespanDuration" : 7200,
                        "start" : "2023-05-16T10:14:28Z",
                        "end" : "2023-05-16T11:14:28Z",
                        "timespanStart" : "2023-05-16 10:14:28",
                        "timespanEnd" : "2023-05-16 11:14:28"
                      },
                      "globalFilterId" : "65babd9bb90bf55b17c96c8d",
                      "accountId" : 1234,
                      "apiLink" : [ {
                        "key" : ""
                      }, {
                        "key" : ""
                      } ],
                      "dashboardId" : "5e1f7a99143ae6004fdc3bb4",
                      "createdBy" : 1,
                      "globalOverride" : true,
                      "modifiedDate" : "2023-05-16 10:14:28",
                      "modifiedBy" : 1,
                      "isGlobalOverride" : true,
                      "aid" : "1234",
                      "dashboardModifiedDate" : "2023-05-16T10:14:28Z"
                    },
                    "expirationDate" : "2023-05-16 10:14:28"
                  } ]
                }"""

        response_loaded_json = json.loads(response_body_json)
        response_from_json = thousandeyes_sdk.dashboards.models.DashboardSnapshotsPage.from_json(response_body_json)
        assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)

    def test_update_dashboard_snapshot_expiration_date_models_validation(self) -> None:
        """Test case for update_dashboard_snapshot_expiration_date request and response models"""
        request_body_json = """
                {
                  "snapshotExpirationDate" : "2023-05-16T10:14:28Z",
                  "expirationDate" : "2023-05-16 10:14:28"
                }"""

        request_loaded_json = json.loads(request_body_json)
        request_from_json = thousandeyes_sdk.dashboards.models.UpdateSnapshotExpirationDateApiRequest.from_json(request_body_json)
        assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)



if __name__ == '__main__':
    unittest.main()
