# coding: utf-8

"""
    Endpoint Agents API

    **Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance.  Manage ThousandEyes Endpoint Agents using this API.   For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).

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

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


import json
import unittest
import thousandeyes_sdk.endpoint_agents.models

from .test_utils import assert_constructed_model_matches_example_json
from thousandeyes_sdk.endpoint_agents.api.endpoint_agents_api import EndpointAgentsApi


class TestEndpointAgentsApi(unittest.TestCase):
    """EndpointAgentsApi unit test stubs"""

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

    def tearDown(self) -> None:
        pass

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


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

        response_body_json = """
                {
                  "npcapVersion" : "npcapVersion",
                  "asnDetails" : {
                    "asName" : "Virgin Media Limited",
                    "asNumber" : 5089
                  },
                  "clients" : [ {
                    "browserExtensions" : [ {
                      "browser" : "edge",
                      "profile" : "Profile 1",
                      "active" : true,
                      "error" : "",
                      "version" : "0.123.0",
                      "enabled" : true
                    }, {
                      "browser" : "edge",
                      "profile" : "Profile 1",
                      "active" : true,
                      "error" : "",
                      "version" : "0.123.0",
                      "enabled" : true
                    } ],
                    "userProfile" : {
                      "userName" : "joeblogs32",
                      "userPrincipalName" : "joeblogs32@c.com"
                    }
                  }, {
                    "browserExtensions" : [ {
                      "browser" : "edge",
                      "profile" : "Profile 1",
                      "active" : true,
                      "error" : "",
                      "version" : "0.123.0",
                      "enabled" : true
                    }, {
                      "browser" : "edge",
                      "profile" : "Profile 1",
                      "active" : true,
                      "error" : "",
                      "version" : "0.123.0",
                      "enabled" : true
                    } ],
                    "userProfile" : {
                      "userName" : "joeblogs32",
                      "userPrincipalName" : "joeblogs32@c.com"
                    }
                  } ],
                  "agentType" : "endpoint",
                  "_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"
                    }
                  },
                  "batteryMetrics" : {
                    "batteryHealthNormalizedPercent" : 0.92,
                    "batteryLevel" : "medium",
                    "batteryLevelNormalizedPercent" : 0.3
                  },
                  "publicIP" : "88.45.2.123",
                  "tcpDriverAvailable" : true,
                  "platform" : "mac",
                  "manufacturer" : "Apple, Inc.",
                  "targetVersion" : "0.123.4",
                  "cellularProfile" : {
                    "rssi" : -10,
                    "advertisedNetworkSubtype" : "LTE/HSPA",
                    "carrierName" : "T-Mobile",
                    "rsrq" : -30,
                    "rsrp" : -30,
                    "advertisedNetworkGen" : "2g, 3g, 4g, 5g",
                    "rscp" : -30,
                    "networkGen" : "2g, 3g, 4g, 5g",
                    "networkSubtype" : "LTE/HSPA",
                    "sinr" : 20
                  },
                  "nicModel" : "Intel(R) Wi-Fi 6 AX200 160MHz",
                  "createdAt" : "2022-05-26T23:37:16Z",
                  "numberOfClients" : 3,
                  "licenseType" : "essentials",
                  "osVersion" : "Version 10.15.2 (Build 19C57)",
                  "computerName" : "DESKJET-123",
                  "freeDiskSpaceNormalized" : 0.41,
                  "model" : "MacBookAir7,2",
                  "id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
                  "nicDriverVersion" : "22.250.0.9",
                  "serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
                  "externalMetadata" : [ {
                    "key" : "anyConnectDeviceId",
                    "value" : "DF434343D"
                  }, {
                    "key" : "anyConnectDeviceId",
                    "value" : "DF434343D"
                  } ],
                  "version" : "0.123.4",
                  "vpnProfiles" : [ {
                    "vpnClientNetworkRange" : [ "10.100.0.0/22" ],
                    "vpnGatewayAddress" : "vpnGatewayAddress",
                    "vpnType" : "cisco-anyconnect",
                    "interfaceName" : "interfaceName",
                    "vpnClientAddresses" : [ "10.100.0.10" ]
                  }, {
                    "vpnClientNetworkRange" : [ "10.100.0.0/22" ],
                    "vpnGatewayAddress" : "vpnGatewayAddress",
                    "vpnType" : "cisco-anyconnect",
                    "interfaceName" : "interfaceName",
                    "vpnClientAddresses" : [ "10.100.0.10" ]
                  } ],
                  "lastSeen" : "2022-05-26T23:37:16Z",
                  "deleted" : true,
                  "totalMemory" : "16384 MB",
                  "kernelVersion" : "Darwin 19.2.0",
                  "name" : "Office Printer",
                  "location" : {
                    "locationName" : "London",
                    "latitude" : 51.51279,
                    "longitude" : -0.09184
                  },
                  "aid" : "",
                  "status" : "enabled",
                  "networkInterfaceProfiles" : [ {
                    "ethernetProfile" : {
                      "linkSpeed" : 0
                    },
                    "hardwareType" : "wireless",
                    "interfaceName" : "en0",
                    "addressProfiles" : [ {
                      "prefixLength" : 24,
                      "addressType" : "unique-local",
                      "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                      "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                      "gateway" : "192.168.0.254"
                    }, {
                      "prefixLength" : 24,
                      "addressType" : "unique-local",
                      "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                      "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                      "gateway" : "192.168.0.254"
                    } ],
                    "wirelessProfile" : {
                      "rssi" : -36,
                      "bssid" : "00:11:22:aa:bb:cc",
                      "channel" : 48,
                      "phyMode" : "802.11ac",
                      "ssid" : "GuestWiFi"
                    }
                  }, {
                    "ethernetProfile" : {
                      "linkSpeed" : 0
                    },
                    "hardwareType" : "wireless",
                    "interfaceName" : "en0",
                    "addressProfiles" : [ {
                      "prefixLength" : 24,
                      "addressType" : "unique-local",
                      "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                      "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                      "gateway" : "192.168.0.254"
                    }, {
                      "prefixLength" : 24,
                      "addressType" : "unique-local",
                      "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                      "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                      "gateway" : "192.168.0.254"
                    } ],
                    "wirelessProfile" : {
                      "rssi" : -36,
                      "bssid" : "00:11:22:aa:bb:cc",
                      "channel" : 48,
                      "phyMode" : "802.11ac",
                      "ssid" : "GuestWiFi"
                    }
                  } ]
                }"""

        response_loaded_json = json.loads(response_body_json)
        response_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgent.from_json(response_body_json)
        assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)

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

        response_body_json = """
                {
                  "npcapVersion" : "npcapVersion",
                  "asnDetails" : {
                    "asName" : "Virgin Media Limited",
                    "asNumber" : 5089
                  },
                  "clients" : [ {
                    "browserExtensions" : [ {
                      "browser" : "edge",
                      "profile" : "Profile 1",
                      "active" : true,
                      "error" : "",
                      "version" : "0.123.0",
                      "enabled" : true
                    }, {
                      "browser" : "edge",
                      "profile" : "Profile 1",
                      "active" : true,
                      "error" : "",
                      "version" : "0.123.0",
                      "enabled" : true
                    } ],
                    "userProfile" : {
                      "userName" : "joeblogs32",
                      "userPrincipalName" : "joeblogs32@c.com"
                    }
                  }, {
                    "browserExtensions" : [ {
                      "browser" : "edge",
                      "profile" : "Profile 1",
                      "active" : true,
                      "error" : "",
                      "version" : "0.123.0",
                      "enabled" : true
                    }, {
                      "browser" : "edge",
                      "profile" : "Profile 1",
                      "active" : true,
                      "error" : "",
                      "version" : "0.123.0",
                      "enabled" : true
                    } ],
                    "userProfile" : {
                      "userName" : "joeblogs32",
                      "userPrincipalName" : "joeblogs32@c.com"
                    }
                  } ],
                  "agentType" : "endpoint",
                  "_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"
                    }
                  },
                  "batteryMetrics" : {
                    "batteryHealthNormalizedPercent" : 0.92,
                    "batteryLevel" : "medium",
                    "batteryLevelNormalizedPercent" : 0.3
                  },
                  "publicIP" : "88.45.2.123",
                  "tcpDriverAvailable" : true,
                  "platform" : "mac",
                  "manufacturer" : "Apple, Inc.",
                  "targetVersion" : "0.123.4",
                  "cellularProfile" : {
                    "rssi" : -10,
                    "advertisedNetworkSubtype" : "LTE/HSPA",
                    "carrierName" : "T-Mobile",
                    "rsrq" : -30,
                    "rsrp" : -30,
                    "advertisedNetworkGen" : "2g, 3g, 4g, 5g",
                    "rscp" : -30,
                    "networkGen" : "2g, 3g, 4g, 5g",
                    "networkSubtype" : "LTE/HSPA",
                    "sinr" : 20
                  },
                  "nicModel" : "Intel(R) Wi-Fi 6 AX200 160MHz",
                  "createdAt" : "2022-05-26T23:37:16Z",
                  "numberOfClients" : 3,
                  "licenseType" : "essentials",
                  "osVersion" : "Version 10.15.2 (Build 19C57)",
                  "computerName" : "DESKJET-123",
                  "freeDiskSpaceNormalized" : 0.41,
                  "model" : "MacBookAir7,2",
                  "id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
                  "nicDriverVersion" : "22.250.0.9",
                  "serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
                  "externalMetadata" : [ {
                    "key" : "anyConnectDeviceId",
                    "value" : "DF434343D"
                  }, {
                    "key" : "anyConnectDeviceId",
                    "value" : "DF434343D"
                  } ],
                  "version" : "0.123.4",
                  "vpnProfiles" : [ {
                    "vpnClientNetworkRange" : [ "10.100.0.0/22" ],
                    "vpnGatewayAddress" : "vpnGatewayAddress",
                    "vpnType" : "cisco-anyconnect",
                    "interfaceName" : "interfaceName",
                    "vpnClientAddresses" : [ "10.100.0.10" ]
                  }, {
                    "vpnClientNetworkRange" : [ "10.100.0.0/22" ],
                    "vpnGatewayAddress" : "vpnGatewayAddress",
                    "vpnType" : "cisco-anyconnect",
                    "interfaceName" : "interfaceName",
                    "vpnClientAddresses" : [ "10.100.0.10" ]
                  } ],
                  "lastSeen" : "2022-05-26T23:37:16Z",
                  "deleted" : true,
                  "totalMemory" : "16384 MB",
                  "kernelVersion" : "Darwin 19.2.0",
                  "name" : "Office Printer",
                  "location" : {
                    "locationName" : "London",
                    "latitude" : 51.51279,
                    "longitude" : -0.09184
                  },
                  "aid" : "",
                  "status" : "enabled",
                  "networkInterfaceProfiles" : [ {
                    "ethernetProfile" : {
                      "linkSpeed" : 0
                    },
                    "hardwareType" : "wireless",
                    "interfaceName" : "en0",
                    "addressProfiles" : [ {
                      "prefixLength" : 24,
                      "addressType" : "unique-local",
                      "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                      "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                      "gateway" : "192.168.0.254"
                    }, {
                      "prefixLength" : 24,
                      "addressType" : "unique-local",
                      "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                      "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                      "gateway" : "192.168.0.254"
                    } ],
                    "wirelessProfile" : {
                      "rssi" : -36,
                      "bssid" : "00:11:22:aa:bb:cc",
                      "channel" : 48,
                      "phyMode" : "802.11ac",
                      "ssid" : "GuestWiFi"
                    }
                  }, {
                    "ethernetProfile" : {
                      "linkSpeed" : 0
                    },
                    "hardwareType" : "wireless",
                    "interfaceName" : "en0",
                    "addressProfiles" : [ {
                      "prefixLength" : 24,
                      "addressType" : "unique-local",
                      "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                      "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                      "gateway" : "192.168.0.254"
                    }, {
                      "prefixLength" : 24,
                      "addressType" : "unique-local",
                      "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                      "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                      "gateway" : "192.168.0.254"
                    } ],
                    "wirelessProfile" : {
                      "rssi" : -36,
                      "bssid" : "00:11:22:aa:bb:cc",
                      "channel" : 48,
                      "phyMode" : "802.11ac",
                      "ssid" : "GuestWiFi"
                    }
                  } ]
                }"""

        response_loaded_json = json.loads(response_body_json)
        response_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgent.from_json(response_body_json)
        assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)

    def test_filter_endpoint_agents_models_validation(self) -> None:
        """Test case for filter_endpoint_agents request and response models"""
        request_body_json = """
                {
                  "searchSort" : [ {
                    "sort" : "platform",
                    "order" : "desc"
                  }, {
                    "sort" : "platform",
                    "order" : "desc"
                  } ],
                  "searchFilters" : {
                    "serialNumber" : [ "xaab2ba4-d40f-4e80-9363-7e4826556055", "xaab2ba4-d40f-4e80-9363-7e4826556055", "xaab2ba4-d40f-4e80-9363-7e4826556055", "xaab2ba4-d40f-4e80-9363-7e4826556055", "xaab2ba4-d40f-4e80-9363-7e4826556055" ],
                    "anyConnectDeviceId" : [ "JDLKSLFEIJER004334F" ],
                    "agentName" : [ "myagent-1234", "myagent-1234" ],
                    "locationSubdivision1Code" : [ "ENG", "ENG" ],
                    "platform" : [ "mac", "mac" ],
                    "licenseType" : [ "essentials", "essentials" ],
                    "osVersion" : [ "Version 10.15.2", "Version 10.15.2" ],
                    "computerName" : [ "DESKTOP-45AE8", "DESKTOP-45AE8" ],
                    "locationCountryISO" : [ "FR", "FR" ],
                    "id" : [ "861b7557-cd57-4bbb-b648-00bddf88ef49", "861b7557-cd57-4bbb-b648-00bddf88ef49" ],
                    "userPrincipalName" : [ "picard@c.com" ],
                    "locationCity" : [ "Paris", "Paris" ],
                    "username" : [ "picard" ]
                  },
                  "thresholdFilter" : {
                    "conditionalOperator" : "and",
                    "filters" : [ {
                      "name" : "last-seen-ms",
                      "value" : 0.8008281904610115,
                      "operator" : "gte"
                    }, {
                      "name" : "last-seen-ms",
                      "value" : 0.8008281904610115,
                      "operator" : "gte"
                    } ]
                  }
                }
                """

        request_loaded_json = json.loads(request_body_json)
        request_from_json = thousandeyes_sdk.endpoint_agents.models.AgentSearchRequest.from_json(request_body_json)
        assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)

        response_body_json = """
                {
                  "_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"
                    }
                  },
                  "totalAgents" : 1,
                  "agents" : [ {
                    "npcapVersion" : "npcapVersion",
                    "asnDetails" : {
                      "asName" : "Virgin Media Limited",
                      "asNumber" : 5089
                    },
                    "clients" : [ {
                      "browserExtensions" : [ {
                        "browser" : "edge",
                        "profile" : "Profile 1",
                        "active" : true,
                        "error" : "",
                        "version" : "0.123.0",
                        "enabled" : true
                      }, {
                        "browser" : "edge",
                        "profile" : "Profile 1",
                        "active" : true,
                        "error" : "",
                        "version" : "0.123.0",
                        "enabled" : true
                      } ],
                      "userProfile" : {
                        "userName" : "joeblogs32",
                        "userPrincipalName" : "joeblogs32@c.com"
                      }
                    }, {
                      "browserExtensions" : [ {
                        "browser" : "edge",
                        "profile" : "Profile 1",
                        "active" : true,
                        "error" : "",
                        "version" : "0.123.0",
                        "enabled" : true
                      }, {
                        "browser" : "edge",
                        "profile" : "Profile 1",
                        "active" : true,
                        "error" : "",
                        "version" : "0.123.0",
                        "enabled" : true
                      } ],
                      "userProfile" : {
                        "userName" : "joeblogs32",
                        "userPrincipalName" : "joeblogs32@c.com"
                      }
                    } ],
                    "agentType" : "endpoint",
                    "_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"
                      }
                    },
                    "batteryMetrics" : {
                      "batteryHealthNormalizedPercent" : 0.92,
                      "batteryLevel" : "medium",
                      "batteryLevelNormalizedPercent" : 0.3
                    },
                    "publicIP" : "88.45.2.123",
                    "tcpDriverAvailable" : true,
                    "platform" : "mac",
                    "manufacturer" : "Apple, Inc.",
                    "targetVersion" : "0.123.4",
                    "cellularProfile" : {
                      "rssi" : -10,
                      "advertisedNetworkSubtype" : "LTE/HSPA",
                      "carrierName" : "T-Mobile",
                      "rsrq" : -30,
                      "rsrp" : -30,
                      "advertisedNetworkGen" : "2g, 3g, 4g, 5g",
                      "rscp" : -30,
                      "networkGen" : "2g, 3g, 4g, 5g",
                      "networkSubtype" : "LTE/HSPA",
                      "sinr" : 20
                    },
                    "nicModel" : "Intel(R) Wi-Fi 6 AX200 160MHz",
                    "createdAt" : "2022-05-26T23:37:16Z",
                    "numberOfClients" : 3,
                    "licenseType" : "essentials",
                    "osVersion" : "Version 10.15.2 (Build 19C57)",
                    "computerName" : "DESKJET-123",
                    "freeDiskSpaceNormalized" : 0.41,
                    "model" : "MacBookAir7,2",
                    "id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
                    "nicDriverVersion" : "22.250.0.9",
                    "serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
                    "externalMetadata" : [ {
                      "key" : "anyConnectDeviceId",
                      "value" : "DF434343D"
                    }, {
                      "key" : "anyConnectDeviceId",
                      "value" : "DF434343D"
                    } ],
                    "version" : "0.123.4",
                    "vpnProfiles" : [ {
                      "vpnClientNetworkRange" : [ "10.100.0.0/22" ],
                      "vpnGatewayAddress" : "vpnGatewayAddress",
                      "vpnType" : "cisco-anyconnect",
                      "interfaceName" : "interfaceName",
                      "vpnClientAddresses" : [ "10.100.0.10" ]
                    }, {
                      "vpnClientNetworkRange" : [ "10.100.0.0/22" ],
                      "vpnGatewayAddress" : "vpnGatewayAddress",
                      "vpnType" : "cisco-anyconnect",
                      "interfaceName" : "interfaceName",
                      "vpnClientAddresses" : [ "10.100.0.10" ]
                    } ],
                    "lastSeen" : "2022-05-26T23:37:16Z",
                    "deleted" : true,
                    "totalMemory" : "16384 MB",
                    "kernelVersion" : "Darwin 19.2.0",
                    "name" : "Office Printer",
                    "location" : {
                      "locationName" : "London",
                      "latitude" : 51.51279,
                      "longitude" : -0.09184
                    },
                    "aid" : "",
                    "status" : "enabled",
                    "networkInterfaceProfiles" : [ {
                      "ethernetProfile" : {
                        "linkSpeed" : 0
                      },
                      "hardwareType" : "wireless",
                      "interfaceName" : "en0",
                      "addressProfiles" : [ {
                        "prefixLength" : 24,
                        "addressType" : "unique-local",
                        "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                        "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                        "gateway" : "192.168.0.254"
                      }, {
                        "prefixLength" : 24,
                        "addressType" : "unique-local",
                        "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                        "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                        "gateway" : "192.168.0.254"
                      } ],
                      "wirelessProfile" : {
                        "rssi" : -36,
                        "bssid" : "00:11:22:aa:bb:cc",
                        "channel" : 48,
                        "phyMode" : "802.11ac",
                        "ssid" : "GuestWiFi"
                      }
                    }, {
                      "ethernetProfile" : {
                        "linkSpeed" : 0
                      },
                      "hardwareType" : "wireless",
                      "interfaceName" : "en0",
                      "addressProfiles" : [ {
                        "prefixLength" : 24,
                        "addressType" : "unique-local",
                        "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                        "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                        "gateway" : "192.168.0.254"
                      }, {
                        "prefixLength" : 24,
                        "addressType" : "unique-local",
                        "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                        "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                        "gateway" : "192.168.0.254"
                      } ],
                      "wirelessProfile" : {
                        "rssi" : -36,
                        "bssid" : "00:11:22:aa:bb:cc",
                        "channel" : 48,
                        "phyMode" : "802.11ac",
                        "ssid" : "GuestWiFi"
                      }
                    } ]
                  }, {
                    "npcapVersion" : "npcapVersion",
                    "asnDetails" : {
                      "asName" : "Virgin Media Limited",
                      "asNumber" : 5089
                    },
                    "clients" : [ {
                      "browserExtensions" : [ {
                        "browser" : "edge",
                        "profile" : "Profile 1",
                        "active" : true,
                        "error" : "",
                        "version" : "0.123.0",
                        "enabled" : true
                      }, {
                        "browser" : "edge",
                        "profile" : "Profile 1",
                        "active" : true,
                        "error" : "",
                        "version" : "0.123.0",
                        "enabled" : true
                      } ],
                      "userProfile" : {
                        "userName" : "joeblogs32",
                        "userPrincipalName" : "joeblogs32@c.com"
                      }
                    }, {
                      "browserExtensions" : [ {
                        "browser" : "edge",
                        "profile" : "Profile 1",
                        "active" : true,
                        "error" : "",
                        "version" : "0.123.0",
                        "enabled" : true
                      }, {
                        "browser" : "edge",
                        "profile" : "Profile 1",
                        "active" : true,
                        "error" : "",
                        "version" : "0.123.0",
                        "enabled" : true
                      } ],
                      "userProfile" : {
                        "userName" : "joeblogs32",
                        "userPrincipalName" : "joeblogs32@c.com"
                      }
                    } ],
                    "agentType" : "endpoint",
                    "_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"
                      }
                    },
                    "batteryMetrics" : {
                      "batteryHealthNormalizedPercent" : 0.92,
                      "batteryLevel" : "medium",
                      "batteryLevelNormalizedPercent" : 0.3
                    },
                    "publicIP" : "88.45.2.123",
                    "tcpDriverAvailable" : true,
                    "platform" : "mac",
                    "manufacturer" : "Apple, Inc.",
                    "targetVersion" : "0.123.4",
                    "cellularProfile" : {
                      "rssi" : -10,
                      "advertisedNetworkSubtype" : "LTE/HSPA",
                      "carrierName" : "T-Mobile",
                      "rsrq" : -30,
                      "rsrp" : -30,
                      "advertisedNetworkGen" : "2g, 3g, 4g, 5g",
                      "rscp" : -30,
                      "networkGen" : "2g, 3g, 4g, 5g",
                      "networkSubtype" : "LTE/HSPA",
                      "sinr" : 20
                    },
                    "nicModel" : "Intel(R) Wi-Fi 6 AX200 160MHz",
                    "createdAt" : "2022-05-26T23:37:16Z",
                    "numberOfClients" : 3,
                    "licenseType" : "essentials",
                    "osVersion" : "Version 10.15.2 (Build 19C57)",
                    "computerName" : "DESKJET-123",
                    "freeDiskSpaceNormalized" : 0.41,
                    "model" : "MacBookAir7,2",
                    "id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
                    "nicDriverVersion" : "22.250.0.9",
                    "serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
                    "externalMetadata" : [ {
                      "key" : "anyConnectDeviceId",
                      "value" : "DF434343D"
                    }, {
                      "key" : "anyConnectDeviceId",
                      "value" : "DF434343D"
                    } ],
                    "version" : "0.123.4",
                    "vpnProfiles" : [ {
                      "vpnClientNetworkRange" : [ "10.100.0.0/22" ],
                      "vpnGatewayAddress" : "vpnGatewayAddress",
                      "vpnType" : "cisco-anyconnect",
                      "interfaceName" : "interfaceName",
                      "vpnClientAddresses" : [ "10.100.0.10" ]
                    }, {
                      "vpnClientNetworkRange" : [ "10.100.0.0/22" ],
                      "vpnGatewayAddress" : "vpnGatewayAddress",
                      "vpnType" : "cisco-anyconnect",
                      "interfaceName" : "interfaceName",
                      "vpnClientAddresses" : [ "10.100.0.10" ]
                    } ],
                    "lastSeen" : "2022-05-26T23:37:16Z",
                    "deleted" : true,
                    "totalMemory" : "16384 MB",
                    "kernelVersion" : "Darwin 19.2.0",
                    "name" : "Office Printer",
                    "location" : {
                      "locationName" : "London",
                      "latitude" : 51.51279,
                      "longitude" : -0.09184
                    },
                    "aid" : "",
                    "status" : "enabled",
                    "networkInterfaceProfiles" : [ {
                      "ethernetProfile" : {
                        "linkSpeed" : 0
                      },
                      "hardwareType" : "wireless",
                      "interfaceName" : "en0",
                      "addressProfiles" : [ {
                        "prefixLength" : 24,
                        "addressType" : "unique-local",
                        "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                        "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                        "gateway" : "192.168.0.254"
                      }, {
                        "prefixLength" : 24,
                        "addressType" : "unique-local",
                        "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                        "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                        "gateway" : "192.168.0.254"
                      } ],
                      "wirelessProfile" : {
                        "rssi" : -36,
                        "bssid" : "00:11:22:aa:bb:cc",
                        "channel" : 48,
                        "phyMode" : "802.11ac",
                        "ssid" : "GuestWiFi"
                      }
                    }, {
                      "ethernetProfile" : {
                        "linkSpeed" : 0
                      },
                      "hardwareType" : "wireless",
                      "interfaceName" : "en0",
                      "addressProfiles" : [ {
                        "prefixLength" : 24,
                        "addressType" : "unique-local",
                        "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                        "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                        "gateway" : "192.168.0.254"
                      }, {
                        "prefixLength" : 24,
                        "addressType" : "unique-local",
                        "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                        "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                        "gateway" : "192.168.0.254"
                      } ],
                      "wirelessProfile" : {
                        "rssi" : -36,
                        "bssid" : "00:11:22:aa:bb:cc",
                        "channel" : 48,
                        "phyMode" : "802.11ac",
                        "ssid" : "GuestWiFi"
                      }
                    } ]
                  } ]
                }"""

        response_loaded_json = json.loads(response_body_json)
        response_from_json = thousandeyes_sdk.endpoint_agents.models.FilterEndpointAgentsResponse.from_json(response_body_json)
        assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)

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

        response_body_json = """
                {
                  "npcapVersion" : "npcapVersion",
                  "asnDetails" : {
                    "asName" : "Virgin Media Limited",
                    "asNumber" : 5089
                  },
                  "clients" : [ {
                    "browserExtensions" : [ {
                      "browser" : "edge",
                      "profile" : "Profile 1",
                      "active" : true,
                      "error" : "",
                      "version" : "0.123.0",
                      "enabled" : true
                    }, {
                      "browser" : "edge",
                      "profile" : "Profile 1",
                      "active" : true,
                      "error" : "",
                      "version" : "0.123.0",
                      "enabled" : true
                    } ],
                    "userProfile" : {
                      "userName" : "joeblogs32",
                      "userPrincipalName" : "joeblogs32@c.com"
                    }
                  }, {
                    "browserExtensions" : [ {
                      "browser" : "edge",
                      "profile" : "Profile 1",
                      "active" : true,
                      "error" : "",
                      "version" : "0.123.0",
                      "enabled" : true
                    }, {
                      "browser" : "edge",
                      "profile" : "Profile 1",
                      "active" : true,
                      "error" : "",
                      "version" : "0.123.0",
                      "enabled" : true
                    } ],
                    "userProfile" : {
                      "userName" : "joeblogs32",
                      "userPrincipalName" : "joeblogs32@c.com"
                    }
                  } ],
                  "agentType" : "endpoint",
                  "_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"
                    }
                  },
                  "batteryMetrics" : {
                    "batteryHealthNormalizedPercent" : 0.92,
                    "batteryLevel" : "medium",
                    "batteryLevelNormalizedPercent" : 0.3
                  },
                  "publicIP" : "88.45.2.123",
                  "tcpDriverAvailable" : true,
                  "platform" : "mac",
                  "manufacturer" : "Apple, Inc.",
                  "targetVersion" : "0.123.4",
                  "cellularProfile" : {
                    "rssi" : -10,
                    "advertisedNetworkSubtype" : "LTE/HSPA",
                    "carrierName" : "T-Mobile",
                    "rsrq" : -30,
                    "rsrp" : -30,
                    "advertisedNetworkGen" : "2g, 3g, 4g, 5g",
                    "rscp" : -30,
                    "networkGen" : "2g, 3g, 4g, 5g",
                    "networkSubtype" : "LTE/HSPA",
                    "sinr" : 20
                  },
                  "nicModel" : "Intel(R) Wi-Fi 6 AX200 160MHz",
                  "createdAt" : "2022-05-26T23:37:16Z",
                  "numberOfClients" : 3,
                  "licenseType" : "essentials",
                  "osVersion" : "Version 10.15.2 (Build 19C57)",
                  "computerName" : "DESKJET-123",
                  "freeDiskSpaceNormalized" : 0.41,
                  "model" : "MacBookAir7,2",
                  "id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
                  "nicDriverVersion" : "22.250.0.9",
                  "serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
                  "externalMetadata" : [ {
                    "key" : "anyConnectDeviceId",
                    "value" : "DF434343D"
                  }, {
                    "key" : "anyConnectDeviceId",
                    "value" : "DF434343D"
                  } ],
                  "version" : "0.123.4",
                  "vpnProfiles" : [ {
                    "vpnClientNetworkRange" : [ "10.100.0.0/22" ],
                    "vpnGatewayAddress" : "vpnGatewayAddress",
                    "vpnType" : "cisco-anyconnect",
                    "interfaceName" : "interfaceName",
                    "vpnClientAddresses" : [ "10.100.0.10" ]
                  }, {
                    "vpnClientNetworkRange" : [ "10.100.0.0/22" ],
                    "vpnGatewayAddress" : "vpnGatewayAddress",
                    "vpnType" : "cisco-anyconnect",
                    "interfaceName" : "interfaceName",
                    "vpnClientAddresses" : [ "10.100.0.10" ]
                  } ],
                  "lastSeen" : "2022-05-26T23:37:16Z",
                  "deleted" : true,
                  "totalMemory" : "16384 MB",
                  "kernelVersion" : "Darwin 19.2.0",
                  "name" : "Office Printer",
                  "location" : {
                    "locationName" : "London",
                    "latitude" : 51.51279,
                    "longitude" : -0.09184
                  },
                  "aid" : "",
                  "status" : "enabled",
                  "networkInterfaceProfiles" : [ {
                    "ethernetProfile" : {
                      "linkSpeed" : 0
                    },
                    "hardwareType" : "wireless",
                    "interfaceName" : "en0",
                    "addressProfiles" : [ {
                      "prefixLength" : 24,
                      "addressType" : "unique-local",
                      "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                      "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                      "gateway" : "192.168.0.254"
                    }, {
                      "prefixLength" : 24,
                      "addressType" : "unique-local",
                      "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                      "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                      "gateway" : "192.168.0.254"
                    } ],
                    "wirelessProfile" : {
                      "rssi" : -36,
                      "bssid" : "00:11:22:aa:bb:cc",
                      "channel" : 48,
                      "phyMode" : "802.11ac",
                      "ssid" : "GuestWiFi"
                    }
                  }, {
                    "ethernetProfile" : {
                      "linkSpeed" : 0
                    },
                    "hardwareType" : "wireless",
                    "interfaceName" : "en0",
                    "addressProfiles" : [ {
                      "prefixLength" : 24,
                      "addressType" : "unique-local",
                      "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                      "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                      "gateway" : "192.168.0.254"
                    }, {
                      "prefixLength" : 24,
                      "addressType" : "unique-local",
                      "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                      "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                      "gateway" : "192.168.0.254"
                    } ],
                    "wirelessProfile" : {
                      "rssi" : -36,
                      "bssid" : "00:11:22:aa:bb:cc",
                      "channel" : 48,
                      "phyMode" : "802.11ac",
                      "ssid" : "GuestWiFi"
                    }
                  } ]
                }"""

        response_loaded_json = json.loads(response_body_json)
        response_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgent.from_json(response_body_json)
        assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)

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

        response_body_json = """
                {
                  "_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"
                    },
                    "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"
                    }
                  },
                  "totalAgents" : 1,
                  "agents" : [ {
                    "npcapVersion" : "npcapVersion",
                    "asnDetails" : {
                      "asName" : "Virgin Media Limited",
                      "asNumber" : 5089
                    },
                    "clients" : [ {
                      "browserExtensions" : [ {
                        "browser" : "edge",
                        "profile" : "Profile 1",
                        "active" : true,
                        "error" : "",
                        "version" : "0.123.0",
                        "enabled" : true
                      }, {
                        "browser" : "edge",
                        "profile" : "Profile 1",
                        "active" : true,
                        "error" : "",
                        "version" : "0.123.0",
                        "enabled" : true
                      } ],
                      "userProfile" : {
                        "userName" : "joeblogs32",
                        "userPrincipalName" : "joeblogs32@c.com"
                      }
                    }, {
                      "browserExtensions" : [ {
                        "browser" : "edge",
                        "profile" : "Profile 1",
                        "active" : true,
                        "error" : "",
                        "version" : "0.123.0",
                        "enabled" : true
                      }, {
                        "browser" : "edge",
                        "profile" : "Profile 1",
                        "active" : true,
                        "error" : "",
                        "version" : "0.123.0",
                        "enabled" : true
                      } ],
                      "userProfile" : {
                        "userName" : "joeblogs32",
                        "userPrincipalName" : "joeblogs32@c.com"
                      }
                    } ],
                    "agentType" : "endpoint",
                    "_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"
                      }
                    },
                    "batteryMetrics" : {
                      "batteryHealthNormalizedPercent" : 0.92,
                      "batteryLevel" : "medium",
                      "batteryLevelNormalizedPercent" : 0.3
                    },
                    "publicIP" : "88.45.2.123",
                    "tcpDriverAvailable" : true,
                    "platform" : "mac",
                    "manufacturer" : "Apple, Inc.",
                    "targetVersion" : "0.123.4",
                    "cellularProfile" : {
                      "rssi" : -10,
                      "advertisedNetworkSubtype" : "LTE/HSPA",
                      "carrierName" : "T-Mobile",
                      "rsrq" : -30,
                      "rsrp" : -30,
                      "advertisedNetworkGen" : "2g, 3g, 4g, 5g",
                      "rscp" : -30,
                      "networkGen" : "2g, 3g, 4g, 5g",
                      "networkSubtype" : "LTE/HSPA",
                      "sinr" : 20
                    },
                    "nicModel" : "Intel(R) Wi-Fi 6 AX200 160MHz",
                    "createdAt" : "2022-05-26T23:37:16Z",
                    "numberOfClients" : 3,
                    "licenseType" : "essentials",
                    "osVersion" : "Version 10.15.2 (Build 19C57)",
                    "computerName" : "DESKJET-123",
                    "freeDiskSpaceNormalized" : 0.41,
                    "model" : "MacBookAir7,2",
                    "id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
                    "nicDriverVersion" : "22.250.0.9",
                    "serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
                    "externalMetadata" : [ {
                      "key" : "anyConnectDeviceId",
                      "value" : "DF434343D"
                    }, {
                      "key" : "anyConnectDeviceId",
                      "value" : "DF434343D"
                    } ],
                    "version" : "0.123.4",
                    "vpnProfiles" : [ {
                      "vpnClientNetworkRange" : [ "10.100.0.0/22" ],
                      "vpnGatewayAddress" : "vpnGatewayAddress",
                      "vpnType" : "cisco-anyconnect",
                      "interfaceName" : "interfaceName",
                      "vpnClientAddresses" : [ "10.100.0.10" ]
                    }, {
                      "vpnClientNetworkRange" : [ "10.100.0.0/22" ],
                      "vpnGatewayAddress" : "vpnGatewayAddress",
                      "vpnType" : "cisco-anyconnect",
                      "interfaceName" : "interfaceName",
                      "vpnClientAddresses" : [ "10.100.0.10" ]
                    } ],
                    "lastSeen" : "2022-05-26T23:37:16Z",
                    "deleted" : true,
                    "totalMemory" : "16384 MB",
                    "kernelVersion" : "Darwin 19.2.0",
                    "name" : "Office Printer",
                    "location" : {
                      "locationName" : "London",
                      "latitude" : 51.51279,
                      "longitude" : -0.09184
                    },
                    "aid" : "",
                    "status" : "enabled",
                    "networkInterfaceProfiles" : [ {
                      "ethernetProfile" : {
                        "linkSpeed" : 0
                      },
                      "hardwareType" : "wireless",
                      "interfaceName" : "en0",
                      "addressProfiles" : [ {
                        "prefixLength" : 24,
                        "addressType" : "unique-local",
                        "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                        "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                        "gateway" : "192.168.0.254"
                      }, {
                        "prefixLength" : 24,
                        "addressType" : "unique-local",
                        "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                        "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                        "gateway" : "192.168.0.254"
                      } ],
                      "wirelessProfile" : {
                        "rssi" : -36,
                        "bssid" : "00:11:22:aa:bb:cc",
                        "channel" : 48,
                        "phyMode" : "802.11ac",
                        "ssid" : "GuestWiFi"
                      }
                    }, {
                      "ethernetProfile" : {
                        "linkSpeed" : 0
                      },
                      "hardwareType" : "wireless",
                      "interfaceName" : "en0",
                      "addressProfiles" : [ {
                        "prefixLength" : 24,
                        "addressType" : "unique-local",
                        "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                        "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                        "gateway" : "192.168.0.254"
                      }, {
                        "prefixLength" : 24,
                        "addressType" : "unique-local",
                        "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                        "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                        "gateway" : "192.168.0.254"
                      } ],
                      "wirelessProfile" : {
                        "rssi" : -36,
                        "bssid" : "00:11:22:aa:bb:cc",
                        "channel" : 48,
                        "phyMode" : "802.11ac",
                        "ssid" : "GuestWiFi"
                      }
                    } ]
                  }, {
                    "npcapVersion" : "npcapVersion",
                    "asnDetails" : {
                      "asName" : "Virgin Media Limited",
                      "asNumber" : 5089
                    },
                    "clients" : [ {
                      "browserExtensions" : [ {
                        "browser" : "edge",
                        "profile" : "Profile 1",
                        "active" : true,
                        "error" : "",
                        "version" : "0.123.0",
                        "enabled" : true
                      }, {
                        "browser" : "edge",
                        "profile" : "Profile 1",
                        "active" : true,
                        "error" : "",
                        "version" : "0.123.0",
                        "enabled" : true
                      } ],
                      "userProfile" : {
                        "userName" : "joeblogs32",
                        "userPrincipalName" : "joeblogs32@c.com"
                      }
                    }, {
                      "browserExtensions" : [ {
                        "browser" : "edge",
                        "profile" : "Profile 1",
                        "active" : true,
                        "error" : "",
                        "version" : "0.123.0",
                        "enabled" : true
                      }, {
                        "browser" : "edge",
                        "profile" : "Profile 1",
                        "active" : true,
                        "error" : "",
                        "version" : "0.123.0",
                        "enabled" : true
                      } ],
                      "userProfile" : {
                        "userName" : "joeblogs32",
                        "userPrincipalName" : "joeblogs32@c.com"
                      }
                    } ],
                    "agentType" : "endpoint",
                    "_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"
                      }
                    },
                    "batteryMetrics" : {
                      "batteryHealthNormalizedPercent" : 0.92,
                      "batteryLevel" : "medium",
                      "batteryLevelNormalizedPercent" : 0.3
                    },
                    "publicIP" : "88.45.2.123",
                    "tcpDriverAvailable" : true,
                    "platform" : "mac",
                    "manufacturer" : "Apple, Inc.",
                    "targetVersion" : "0.123.4",
                    "cellularProfile" : {
                      "rssi" : -10,
                      "advertisedNetworkSubtype" : "LTE/HSPA",
                      "carrierName" : "T-Mobile",
                      "rsrq" : -30,
                      "rsrp" : -30,
                      "advertisedNetworkGen" : "2g, 3g, 4g, 5g",
                      "rscp" : -30,
                      "networkGen" : "2g, 3g, 4g, 5g",
                      "networkSubtype" : "LTE/HSPA",
                      "sinr" : 20
                    },
                    "nicModel" : "Intel(R) Wi-Fi 6 AX200 160MHz",
                    "createdAt" : "2022-05-26T23:37:16Z",
                    "numberOfClients" : 3,
                    "licenseType" : "essentials",
                    "osVersion" : "Version 10.15.2 (Build 19C57)",
                    "computerName" : "DESKJET-123",
                    "freeDiskSpaceNormalized" : 0.41,
                    "model" : "MacBookAir7,2",
                    "id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
                    "nicDriverVersion" : "22.250.0.9",
                    "serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
                    "externalMetadata" : [ {
                      "key" : "anyConnectDeviceId",
                      "value" : "DF434343D"
                    }, {
                      "key" : "anyConnectDeviceId",
                      "value" : "DF434343D"
                    } ],
                    "version" : "0.123.4",
                    "vpnProfiles" : [ {
                      "vpnClientNetworkRange" : [ "10.100.0.0/22" ],
                      "vpnGatewayAddress" : "vpnGatewayAddress",
                      "vpnType" : "cisco-anyconnect",
                      "interfaceName" : "interfaceName",
                      "vpnClientAddresses" : [ "10.100.0.10" ]
                    }, {
                      "vpnClientNetworkRange" : [ "10.100.0.0/22" ],
                      "vpnGatewayAddress" : "vpnGatewayAddress",
                      "vpnType" : "cisco-anyconnect",
                      "interfaceName" : "interfaceName",
                      "vpnClientAddresses" : [ "10.100.0.10" ]
                    } ],
                    "lastSeen" : "2022-05-26T23:37:16Z",
                    "deleted" : true,
                    "totalMemory" : "16384 MB",
                    "kernelVersion" : "Darwin 19.2.0",
                    "name" : "Office Printer",
                    "location" : {
                      "locationName" : "London",
                      "latitude" : 51.51279,
                      "longitude" : -0.09184
                    },
                    "aid" : "",
                    "status" : "enabled",
                    "networkInterfaceProfiles" : [ {
                      "ethernetProfile" : {
                        "linkSpeed" : 0
                      },
                      "hardwareType" : "wireless",
                      "interfaceName" : "en0",
                      "addressProfiles" : [ {
                        "prefixLength" : 24,
                        "addressType" : "unique-local",
                        "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                        "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                        "gateway" : "192.168.0.254"
                      }, {
                        "prefixLength" : 24,
                        "addressType" : "unique-local",
                        "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                        "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                        "gateway" : "192.168.0.254"
                      } ],
                      "wirelessProfile" : {
                        "rssi" : -36,
                        "bssid" : "00:11:22:aa:bb:cc",
                        "channel" : 48,
                        "phyMode" : "802.11ac",
                        "ssid" : "GuestWiFi"
                      }
                    }, {
                      "ethernetProfile" : {
                        "linkSpeed" : 0
                      },
                      "hardwareType" : "wireless",
                      "interfaceName" : "en0",
                      "addressProfiles" : [ {
                        "prefixLength" : 24,
                        "addressType" : "unique-local",
                        "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                        "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                        "gateway" : "192.168.0.254"
                      }, {
                        "prefixLength" : 24,
                        "addressType" : "unique-local",
                        "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                        "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                        "gateway" : "192.168.0.254"
                      } ],
                      "wirelessProfile" : {
                        "rssi" : -36,
                        "bssid" : "00:11:22:aa:bb:cc",
                        "channel" : 48,
                        "phyMode" : "802.11ac",
                        "ssid" : "GuestWiFi"
                      }
                    } ]
                  } ]
                }"""

        response_loaded_json = json.loads(response_body_json)
        response_from_json = thousandeyes_sdk.endpoint_agents.models.ListEndpointAgentsResponse.from_json(response_body_json)
        assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)

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

        response_body_json = """
                {
                  "connectionString" : "D2xZSLlqo64Xe2EnYisklA==",
                  "_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.endpoint_agents.models.ConnectionString.from_json(response_body_json)
        assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)

    def test_update_endpoint_agent_models_validation(self) -> None:
        """Test case for update_endpoint_agent request and response models"""
        request_body_json = """
                {
                  "licenseType" : "essentials",
                  "name" : "Office Printer"
                }
                """

        request_loaded_json = json.loads(request_body_json)
        request_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgentUpdate.from_json(request_body_json)
        assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)

        response_body_json = """
                {
                  "npcapVersion" : "npcapVersion",
                  "asnDetails" : {
                    "asName" : "Virgin Media Limited",
                    "asNumber" : 5089
                  },
                  "clients" : [ {
                    "browserExtensions" : [ {
                      "browser" : "edge",
                      "profile" : "Profile 1",
                      "active" : true,
                      "error" : "",
                      "version" : "0.123.0",
                      "enabled" : true
                    }, {
                      "browser" : "edge",
                      "profile" : "Profile 1",
                      "active" : true,
                      "error" : "",
                      "version" : "0.123.0",
                      "enabled" : true
                    } ],
                    "userProfile" : {
                      "userName" : "joeblogs32",
                      "userPrincipalName" : "joeblogs32@c.com"
                    }
                  }, {
                    "browserExtensions" : [ {
                      "browser" : "edge",
                      "profile" : "Profile 1",
                      "active" : true,
                      "error" : "",
                      "version" : "0.123.0",
                      "enabled" : true
                    }, {
                      "browser" : "edge",
                      "profile" : "Profile 1",
                      "active" : true,
                      "error" : "",
                      "version" : "0.123.0",
                      "enabled" : true
                    } ],
                    "userProfile" : {
                      "userName" : "joeblogs32",
                      "userPrincipalName" : "joeblogs32@c.com"
                    }
                  } ],
                  "agentType" : "endpoint",
                  "_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"
                    }
                  },
                  "batteryMetrics" : {
                    "batteryHealthNormalizedPercent" : 0.92,
                    "batteryLevel" : "medium",
                    "batteryLevelNormalizedPercent" : 0.3
                  },
                  "publicIP" : "88.45.2.123",
                  "tcpDriverAvailable" : true,
                  "platform" : "mac",
                  "manufacturer" : "Apple, Inc.",
                  "targetVersion" : "0.123.4",
                  "cellularProfile" : {
                    "rssi" : -10,
                    "advertisedNetworkSubtype" : "LTE/HSPA",
                    "carrierName" : "T-Mobile",
                    "rsrq" : -30,
                    "rsrp" : -30,
                    "advertisedNetworkGen" : "2g, 3g, 4g, 5g",
                    "rscp" : -30,
                    "networkGen" : "2g, 3g, 4g, 5g",
                    "networkSubtype" : "LTE/HSPA",
                    "sinr" : 20
                  },
                  "nicModel" : "Intel(R) Wi-Fi 6 AX200 160MHz",
                  "createdAt" : "2022-05-26T23:37:16Z",
                  "numberOfClients" : 3,
                  "licenseType" : "essentials",
                  "osVersion" : "Version 10.15.2 (Build 19C57)",
                  "computerName" : "DESKJET-123",
                  "freeDiskSpaceNormalized" : 0.41,
                  "model" : "MacBookAir7,2",
                  "id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
                  "nicDriverVersion" : "22.250.0.9",
                  "serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
                  "externalMetadata" : [ {
                    "key" : "anyConnectDeviceId",
                    "value" : "DF434343D"
                  }, {
                    "key" : "anyConnectDeviceId",
                    "value" : "DF434343D"
                  } ],
                  "version" : "0.123.4",
                  "vpnProfiles" : [ {
                    "vpnClientNetworkRange" : [ "10.100.0.0/22" ],
                    "vpnGatewayAddress" : "vpnGatewayAddress",
                    "vpnType" : "cisco-anyconnect",
                    "interfaceName" : "interfaceName",
                    "vpnClientAddresses" : [ "10.100.0.10" ]
                  }, {
                    "vpnClientNetworkRange" : [ "10.100.0.0/22" ],
                    "vpnGatewayAddress" : "vpnGatewayAddress",
                    "vpnType" : "cisco-anyconnect",
                    "interfaceName" : "interfaceName",
                    "vpnClientAddresses" : [ "10.100.0.10" ]
                  } ],
                  "lastSeen" : "2022-05-26T23:37:16Z",
                  "deleted" : true,
                  "totalMemory" : "16384 MB",
                  "kernelVersion" : "Darwin 19.2.0",
                  "name" : "Office Printer",
                  "location" : {
                    "locationName" : "London",
                    "latitude" : 51.51279,
                    "longitude" : -0.09184
                  },
                  "aid" : "",
                  "status" : "enabled",
                  "networkInterfaceProfiles" : [ {
                    "ethernetProfile" : {
                      "linkSpeed" : 0
                    },
                    "hardwareType" : "wireless",
                    "interfaceName" : "en0",
                    "addressProfiles" : [ {
                      "prefixLength" : 24,
                      "addressType" : "unique-local",
                      "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                      "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                      "gateway" : "192.168.0.254"
                    }, {
                      "prefixLength" : 24,
                      "addressType" : "unique-local",
                      "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                      "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                      "gateway" : "192.168.0.254"
                    } ],
                    "wirelessProfile" : {
                      "rssi" : -36,
                      "bssid" : "00:11:22:aa:bb:cc",
                      "channel" : 48,
                      "phyMode" : "802.11ac",
                      "ssid" : "GuestWiFi"
                    }
                  }, {
                    "ethernetProfile" : {
                      "linkSpeed" : 0
                    },
                    "hardwareType" : "wireless",
                    "interfaceName" : "en0",
                    "addressProfiles" : [ {
                      "prefixLength" : 24,
                      "addressType" : "unique-local",
                      "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                      "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                      "gateway" : "192.168.0.254"
                    }, {
                      "prefixLength" : 24,
                      "addressType" : "unique-local",
                      "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
                      "routerHardwareAddress" : "5c:b1:3e:46:1c:84",
                      "gateway" : "192.168.0.254"
                    } ],
                    "wirelessProfile" : {
                      "rssi" : -36,
                      "bssid" : "00:11:22:aa:bb:cc",
                      "channel" : 48,
                      "phyMode" : "802.11ac",
                      "ssid" : "GuestWiFi"
                    }
                  } ]
                }"""

        response_loaded_json = json.loads(response_body_json)
        response_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgent.from_json(response_body_json)
        assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)


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