# coding: utf-8

"""
    apig

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: common-version
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from volcenginesdkcore.configuration import Configuration


class ConnectionPoolSettingsForUpdateUpstreamInput(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'enable': 'bool',
        'http1_max_pending_requests': 'int',
        'idle_timeout': 'int',
        'max_connections': 'int'
    }

    attribute_map = {
        'enable': 'Enable',
        'http1_max_pending_requests': 'Http1MaxPendingRequests',
        'idle_timeout': 'IdleTimeout',
        'max_connections': 'MaxConnections'
    }

    def __init__(self, enable=None, http1_max_pending_requests=None, idle_timeout=None, max_connections=None, _configuration=None):  # noqa: E501
        """ConnectionPoolSettingsForUpdateUpstreamInput - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._enable = None
        self._http1_max_pending_requests = None
        self._idle_timeout = None
        self._max_connections = None
        self.discriminator = None

        if enable is not None:
            self.enable = enable
        if http1_max_pending_requests is not None:
            self.http1_max_pending_requests = http1_max_pending_requests
        if idle_timeout is not None:
            self.idle_timeout = idle_timeout
        if max_connections is not None:
            self.max_connections = max_connections

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


        :return: The enable of this ConnectionPoolSettingsForUpdateUpstreamInput.  # noqa: E501
        :rtype: bool
        """
        return self._enable

    @enable.setter
    def enable(self, enable):
        """Sets the enable of this ConnectionPoolSettingsForUpdateUpstreamInput.


        :param enable: The enable of this ConnectionPoolSettingsForUpdateUpstreamInput.  # noqa: E501
        :type: bool
        """

        self._enable = enable

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


        :return: The http1_max_pending_requests of this ConnectionPoolSettingsForUpdateUpstreamInput.  # noqa: E501
        :rtype: int
        """
        return self._http1_max_pending_requests

    @http1_max_pending_requests.setter
    def http1_max_pending_requests(self, http1_max_pending_requests):
        """Sets the http1_max_pending_requests of this ConnectionPoolSettingsForUpdateUpstreamInput.


        :param http1_max_pending_requests: The http1_max_pending_requests of this ConnectionPoolSettingsForUpdateUpstreamInput.  # noqa: E501
        :type: int
        """

        self._http1_max_pending_requests = http1_max_pending_requests

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


        :return: The idle_timeout of this ConnectionPoolSettingsForUpdateUpstreamInput.  # noqa: E501
        :rtype: int
        """
        return self._idle_timeout

    @idle_timeout.setter
    def idle_timeout(self, idle_timeout):
        """Sets the idle_timeout of this ConnectionPoolSettingsForUpdateUpstreamInput.


        :param idle_timeout: The idle_timeout of this ConnectionPoolSettingsForUpdateUpstreamInput.  # noqa: E501
        :type: int
        """

        self._idle_timeout = idle_timeout

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


        :return: The max_connections of this ConnectionPoolSettingsForUpdateUpstreamInput.  # noqa: E501
        :rtype: int
        """
        return self._max_connections

    @max_connections.setter
    def max_connections(self, max_connections):
        """Sets the max_connections of this ConnectionPoolSettingsForUpdateUpstreamInput.


        :param max_connections: The max_connections of this ConnectionPoolSettingsForUpdateUpstreamInput.  # noqa: E501
        :type: int
        """

        self._max_connections = max_connections

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

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(ConnectionPoolSettingsForUpdateUpstreamInput, dict):
            for key, value in self.items():
                result[key] = 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, ConnectionPoolSettingsForUpdateUpstreamInput):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
