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

"""
apimaticcalculator

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

from apimaticcalculator.decorators import lazy_property
from apimaticcalculator.configuration import Configuration
from apimaticcalculator.configuration import Environment
from apimaticcalculator.controllers.simple_calculator_controller\
    import SimpleCalculatorController


class ApimaticcalculatorClient(object):

    @lazy_property
    def simple_calculator(self):
        return SimpleCalculatorController(self.config)

    def __init__(self, timeout=60, max_retries=0, backoff_factor=2,
                 retry_statuses=[408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
                 retry_methods=['GET', 'PUT'],
                 environment=Environment.PRODUCTION, config=None):
        if config is None:
            self.config = Configuration(timeout=timeout,
                                        max_retries=max_retries,
                                        backoff_factor=backoff_factor,
                                        retry_statuses=retry_statuses,
                                        retry_methods=retry_methods,
                                        environment=environment)
        else:
            self.config = config
