r"""
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Sample/reference Twilio API.
    This is the reference API for the rest-proxy server.

    NOTE: This class is auto generated by OpenAPI Generator.
    https://openapi-generator.tech
    Do not edit the class manually.
"""

from typing import Optional
from twilio.base.version import Version
from twilio.base.domain import Domain
from twilio.rest.insights.v2.inbound import InboundList
from twilio.rest.insights.v2.outbound import OutboundList
from twilio.rest.insights.v2.report import ReportList


class V2(Version):

    def __init__(self, domain: Domain):
        """
        Initialize the V2 version of Insights

        :param domain: The Twilio.insights domain
        """
        super().__init__(domain, "v2")
        self._inbound: Optional[InboundList] = None
        self._outbound: Optional[OutboundList] = None
        self._reports: Optional[ReportList] = None

    @property
    def inbound(self) -> InboundList:
        if self._inbound is None:
            self._inbound = InboundList(self)
        return self._inbound

    @property
    def outbound(self) -> OutboundList:
        if self._outbound is None:
            self._outbound = OutboundList(self)
        return self._outbound

    @property
    def reports(self) -> ReportList:
        if self._reports is None:
            self._reports = ReportList(self)
        return self._reports

    def __repr__(self) -> str:
        """
        Provide a friendly representation
        :returns: Machine friendly representation
        """
        return "<Twilio.Insights.V2>"
