# -*- coding: utf-8 -*-

"""
mdnotes

This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
"""

from mdnotes.decorators import lazy_property
from mdnotes.configuration import Configuration
from mdnotes.configuration import Environment
from mdnotes.controllers.service_controller import ServiceController
from mdnotes.controllers.user_controller import UserController


class MdnotesClient(object):

    @lazy_property
    def service(self):
        return ServiceController(self.config)

    @lazy_property
    def user(self):
        return UserController(self.config)

    def __init__(self, timeout=60, max_retries=3, backoff_factor=0,
                 environment=Environment.PRODUCTION,
                 o_auth_client_id='TODO: Replace',
                 o_auth_redirect_uri='TODO: Replace', config=None):
        if config is None:
            self.config = Configuration(timeout=timeout,
                                        max_retries=max_retries,
                                        backoff_factor=backoff_factor,
                                        environment=environment,
                                        o_auth_client_id=o_auth_client_id,
                                        o_auth_redirect_uri=o_auth_redirect_uri)
        else:
            self.config = config
