# Path: tenable_io/api/base.py
# class BaseApi(object):
# 
#     def __init__(self, client):
#         self._client = client
# 
# Path: tenable_io/api/models.py
# class Session(BaseModel):
# 
#     def __init__(
#             self,
#             id=None,
#             username=None,
#             email=None,
#             name=None,
#             type=None,
#             permissions=None,
#             lastlogin=None,
#             container_id=None,
#             groups=None,
#     ):
#         self.id = id
#         self.username = username
#         self.email = email
#         self.name = name
#         self.type = type
#         self.permissions = permissions
#         self.lastlogin = lastlogin
#         self.container_id = container_id
#         self.groups = groups


from tenable_io.api.base import BaseApi
from tenable_io.api.models import Session


class SessionApi(BaseApi):

    def get(self):
        """Return the user session data.

        :raise TenableIOApiException:  When API error is encountered.
        :return: An instance of :class:`tenable_io.api.models.Session`.
        """
        response = self._client.get('session')

# Path: tenable_io/api/base.py
# class BaseApi(object):
# 
#     def __init__(self, client):
#         self._client = client
# 
# Path: tenable_io/api/models.py
# class Session(BaseModel):
# 
#     def __init__(
#             self,
#             id=None,
#             username=None,
#             email=None,
#             name=None,
#             type=None,
#             permissions=None,
#             lastlogin=None,
#             container_id=None,
#             groups=None,
#     ):
#         self.id = id
#         self.username = username
#         self.email = email
#         self.name = name
#         self.type = type
#         self.permissions = permissions
#         self.lastlogin = lastlogin
#         self.container_id = container_id
#         self.groups = groups


# Path: tenable_io/api/session.py
from tenable_io.api.base import BaseApi
from tenable_io.api.models import Session



class SessionApi(BaseApi):

    def get(self):
        """Return the user session data.

        :raise TenableIOApiException:  When API error is encountered.
        :return: An instance of :class:`tenable_io.api.models.Session`.
        """
        response = self._client.get('session')

        return Session.from_json(response.text)