# coding: utf-8

"""
    Aron API

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

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from openapi_client.configuration import Configuration


class OrmAutoscalerConfig(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 = {
        'average_utilization': 'int',
        'max_replicas': 'int',
        'min_replicas': 'int',
        'resource_target': 'str'
    }

    attribute_map = {
        'average_utilization': 'average_utilization',
        'max_replicas': 'max_replicas',
        'min_replicas': 'min_replicas',
        'resource_target': 'resource_target'
    }

    def __init__(self, average_utilization=None, max_replicas=None, min_replicas=None, resource_target=None, local_vars_configuration=None):  # noqa: E501
        """OrmAutoscalerConfig - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._average_utilization = None
        self._max_replicas = None
        self._min_replicas = None
        self._resource_target = None
        self.discriminator = None

        if average_utilization is not None:
            self.average_utilization = average_utilization
        if max_replicas is not None:
            self.max_replicas = max_replicas
        if min_replicas is not None:
            self.min_replicas = min_replicas
        if resource_target is not None:
            self.resource_target = resource_target

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


        :return: The average_utilization of this OrmAutoscalerConfig.  # noqa: E501
        :rtype: int
        """
        return self._average_utilization

    @average_utilization.setter
    def average_utilization(self, average_utilization):
        """Sets the average_utilization of this OrmAutoscalerConfig.


        :param average_utilization: The average_utilization of this OrmAutoscalerConfig.  # noqa: E501
        :type average_utilization: int
        """

        self._average_utilization = average_utilization

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


        :return: The max_replicas of this OrmAutoscalerConfig.  # noqa: E501
        :rtype: int
        """
        return self._max_replicas

    @max_replicas.setter
    def max_replicas(self, max_replicas):
        """Sets the max_replicas of this OrmAutoscalerConfig.


        :param max_replicas: The max_replicas of this OrmAutoscalerConfig.  # noqa: E501
        :type max_replicas: int
        """

        self._max_replicas = max_replicas

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


        :return: The min_replicas of this OrmAutoscalerConfig.  # noqa: E501
        :rtype: int
        """
        return self._min_replicas

    @min_replicas.setter
    def min_replicas(self, min_replicas):
        """Sets the min_replicas of this OrmAutoscalerConfig.


        :param min_replicas: The min_replicas of this OrmAutoscalerConfig.  # noqa: E501
        :type min_replicas: int
        """

        self._min_replicas = min_replicas

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


        :return: The resource_target of this OrmAutoscalerConfig.  # noqa: E501
        :rtype: str
        """
        return self._resource_target

    @resource_target.setter
    def resource_target(self, resource_target):
        """Sets the resource_target of this OrmAutoscalerConfig.


        :param resource_target: The resource_target of this OrmAutoscalerConfig.  # noqa: E501
        :type resource_target: str
        """

        self._resource_target = resource_target

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, OrmAutoscalerConfig):
            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, OrmAutoscalerConfig):
            return True

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