# coding: utf-8

"""
    Merlin

    API Guide for accessing Merlin's model management, deployment, and serving functionalities  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class GPUToleration(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 = {
        'key': 'str',
        'operator': 'str',
        'value': 'str',
        'effect': 'str',
        'toleration_seconds': 'int'
    }

    attribute_map = {
        'key': 'key',
        'operator': 'operator',
        'value': 'value',
        'effect': 'effect',
        'toleration_seconds': 'toleration_seconds'
    }

    def __init__(self, key=None, operator=None, value=None, effect=None, toleration_seconds=None):  # noqa: E501
        """GPUToleration - a model defined in Swagger"""  # noqa: E501
        self._key = None
        self._operator = None
        self._value = None
        self._effect = None
        self._toleration_seconds = None
        self.discriminator = None
        if key is not None:
            self.key = key
        if operator is not None:
            self.operator = operator
        if value is not None:
            self.value = value
        if effect is not None:
            self.effect = effect
        if toleration_seconds is not None:
            self.toleration_seconds = toleration_seconds

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


        :return: The key of this GPUToleration.  # noqa: E501
        :rtype: str
        """
        return self._key

    @key.setter
    def key(self, key):
        """Sets the key of this GPUToleration.


        :param key: The key of this GPUToleration.  # noqa: E501
        :type: str
        """

        self._key = key

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


        :return: The operator of this GPUToleration.  # noqa: E501
        :rtype: str
        """
        return self._operator

    @operator.setter
    def operator(self, operator):
        """Sets the operator of this GPUToleration.


        :param operator: The operator of this GPUToleration.  # noqa: E501
        :type: str
        """

        self._operator = operator

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


        :return: The value of this GPUToleration.  # noqa: E501
        :rtype: str
        """
        return self._value

    @value.setter
    def value(self, value):
        """Sets the value of this GPUToleration.


        :param value: The value of this GPUToleration.  # noqa: E501
        :type: str
        """

        self._value = value

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


        :return: The effect of this GPUToleration.  # noqa: E501
        :rtype: str
        """
        return self._effect

    @effect.setter
    def effect(self, effect):
        """Sets the effect of this GPUToleration.


        :param effect: The effect of this GPUToleration.  # noqa: E501
        :type: str
        """

        self._effect = effect

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


        :return: The toleration_seconds of this GPUToleration.  # noqa: E501
        :rtype: int
        """
        return self._toleration_seconds

    @toleration_seconds.setter
    def toleration_seconds(self, toleration_seconds):
        """Sets the toleration_seconds of this GPUToleration.


        :param toleration_seconds: The toleration_seconds of this GPUToleration.  # noqa: E501
        :type: int
        """

        self._toleration_seconds = toleration_seconds

    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(GPUToleration, 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, GPUToleration):
            return False

        return self.__dict__ == other.__dict__

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