# 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_agent_log_items_api import EndpointAgentLogItemsApi


class TestEndpointAgentLogItemsApi(unittest.TestCase):
    """EndpointAgentLogItemsApi unit test stubs"""

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

    def tearDown(self) -> None:
        pass

    def test_get_endpoint_agent_log_items_models_validation(self) -> None:
        """Test case for get_endpoint_agent_log_items 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"
                    }
                  },
                  "logs" : [ {
                    "wifiLogItem" : {
                      "bssidFrom" : "00:11:22:33:44:54",
                      "bssid" : "00:11:22:33:44:55",
                      "failure" : {
                        "code" : 4,
                        "context" : "WPA authentication failed",
                        "type" : "auth"
                      },
                      "logItemType" : "wifi-connect",
                      "channel" : "36",
                      "physicalMode" : "802.11ac",
                      "physicalModeFrom" : "802.11n",
                      "ssid" : "CorpWiFi",
                      "channelFrom" : "11"
                    },
                    "agentLogItemType" : "wifi",
                    "onlineOfflineLogItem" : {
                      "logItemType" : "online"
                    },
                    "id" : "8d23f1b7-74ef-4e0c-925c-58601fc0662d",
                    "vpnLogItem" : {
                      "logItemType" : "vpn-connect",
                      "vpnServerName" : "vpn-us-west",
                      "vpnType" : "cisco-anyconnect",
                      "vpnServerAddress" : "192.0.2.10"
                    },
                    "stateChangesLogItem" : {
                      "logItemType" : "enabled"
                    },
                    "timestampMs" : 1709240000000
                  }, {
                    "wifiLogItem" : {
                      "bssidFrom" : "00:11:22:33:44:54",
                      "bssid" : "00:11:22:33:44:55",
                      "failure" : {
                        "code" : 4,
                        "context" : "WPA authentication failed",
                        "type" : "auth"
                      },
                      "logItemType" : "wifi-connect",
                      "channel" : "36",
                      "physicalMode" : "802.11ac",
                      "physicalModeFrom" : "802.11n",
                      "ssid" : "CorpWiFi",
                      "channelFrom" : "11"
                    },
                    "agentLogItemType" : "wifi",
                    "onlineOfflineLogItem" : {
                      "logItemType" : "online"
                    },
                    "id" : "8d23f1b7-74ef-4e0c-925c-58601fc0662d",
                    "vpnLogItem" : {
                      "logItemType" : "vpn-connect",
                      "vpnServerName" : "vpn-us-west",
                      "vpnType" : "cisco-anyconnect",
                      "vpnServerAddress" : "192.0.2.10"
                    },
                    "stateChangesLogItem" : {
                      "logItemType" : "enabled"
                    },
                    "timestampMs" : 1709240000000
                  } ]
                }"""

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


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