# coding: utf-8

"""
    Vidispine API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 5.x
    Contact: info@vidispine.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six
from . import *

class ConnectionPoolType(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'min_size': 'int',
        'max_size': 'int',
        'eviction_interval': 'int',
        'min_idle_time': 'int'
    }

    attribute_map = {
        'min_size': 'minSize',
        'max_size': 'maxSize',
        'eviction_interval': 'evictionInterval',
        'min_idle_time': 'minIdleTime'
    }

    def __init__(self, min_size=None, max_size=None, eviction_interval=None, min_idle_time=None):  # noqa: E501
        """ConnectionPoolType - a model defined in OpenAPI"""  # noqa: E501

        self._min_size = None
        self._max_size = None
        self._eviction_interval = None
        self._min_idle_time = None
        self.discriminator = None

        self.min_size = min_size
        if max_size is not None:
            self.max_size = max_size
        if eviction_interval is not None:
            self.eviction_interval = eviction_interval
        if min_idle_time is not None:
            self.min_idle_time = min_idle_time

    @property
    def min_size(self):
        """Gets the min_size of this ConnectionPoolType.  # noqa: E501


        :return: The min_size of this ConnectionPoolType.  # noqa: E501
        :rtype: int
        """
        return self._min_size

    @min_size.setter
    def min_size(self, min_size):
        """Sets the min_size of this ConnectionPoolType.


        :param min_size: The min_size of this ConnectionPoolType.  # noqa: E501
        :type: int
        """
        if min_size is None:
            raise ValueError("Invalid value for `min_size`, must not be `None`")  # noqa: E501

        self._min_size = min_size

    @property
    def max_size(self):
        """Gets the max_size of this ConnectionPoolType.  # noqa: E501


        :return: The max_size of this ConnectionPoolType.  # noqa: E501
        :rtype: int
        """
        return self._max_size

    @max_size.setter
    def max_size(self, max_size):
        """Sets the max_size of this ConnectionPoolType.


        :param max_size: The max_size of this ConnectionPoolType.  # noqa: E501
        :type: int
        """

        self._max_size = max_size

    @property
    def eviction_interval(self):
        """Gets the eviction_interval of this ConnectionPoolType.  # noqa: E501


        :return: The eviction_interval of this ConnectionPoolType.  # noqa: E501
        :rtype: int
        """
        return self._eviction_interval

    @eviction_interval.setter
    def eviction_interval(self, eviction_interval):
        """Sets the eviction_interval of this ConnectionPoolType.


        :param eviction_interval: The eviction_interval of this ConnectionPoolType.  # noqa: E501
        :type: int
        """

        self._eviction_interval = eviction_interval

    @property
    def min_idle_time(self):
        """Gets the min_idle_time of this ConnectionPoolType.  # noqa: E501


        :return: The min_idle_time of this ConnectionPoolType.  # noqa: E501
        :rtype: int
        """
        return self._min_idle_time

    @min_idle_time.setter
    def min_idle_time(self, min_idle_time):
        """Sets the min_idle_time of this ConnectionPoolType.


        :param min_idle_time: The min_idle_time of this ConnectionPoolType.  # noqa: E501
        :type: int
        """

        self._min_idle_time = min_idle_time

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, ConnectionPoolType):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
