# coding: utf-8

"""
    GoPlus Security API Document

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

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

import pprint
import re  # noqa: F401

import six

class NewAllowance(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 = {
        'owner': 'str',
        'post_amount': 'str',
        'allowance_change': 'str',
        'spender': 'str',
        'risky_spender': 'int',
        'pre_amount': 'str'
    }

    attribute_map = {
        'owner': 'owner',
        'post_amount': 'post_amount',
        'allowance_change': 'allowance_change',
        'spender': 'spender',
        'risky_spender': 'risky_spender',
        'pre_amount': 'pre_amount'
    }

    def __init__(self, owner=None, post_amount=None, allowance_change=None, spender=None, risky_spender=None, pre_amount=None):  # noqa: E501
        """NewAllowance - a model defined in Swagger"""  # noqa: E501
        self._owner = None
        self._post_amount = None
        self._allowance_change = None
        self._spender = None
        self._risky_spender = None
        self._pre_amount = None
        self.discriminator = None
        if owner is not None:
            self.owner = owner
        if post_amount is not None:
            self.post_amount = post_amount
        if allowance_change is not None:
            self.allowance_change = allowance_change
        if spender is not None:
            self.spender = spender
        if risky_spender is not None:
            self.risky_spender = risky_spender
        if pre_amount is not None:
            self.pre_amount = pre_amount

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


        :return: The owner of this NewAllowance.  # noqa: E501
        :rtype: str
        """
        return self._owner

    @owner.setter
    def owner(self, owner):
        """Sets the owner of this NewAllowance.


        :param owner: The owner of this NewAllowance.  # noqa: E501
        :type: str
        """

        self._owner = owner

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


        :return: The post_amount of this NewAllowance.  # noqa: E501
        :rtype: str
        """
        return self._post_amount

    @post_amount.setter
    def post_amount(self, post_amount):
        """Sets the post_amount of this NewAllowance.


        :param post_amount: The post_amount of this NewAllowance.  # noqa: E501
        :type: str
        """

        self._post_amount = post_amount

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


        :return: The allowance_change of this NewAllowance.  # noqa: E501
        :rtype: str
        """
        return self._allowance_change

    @allowance_change.setter
    def allowance_change(self, allowance_change):
        """Sets the allowance_change of this NewAllowance.


        :param allowance_change: The allowance_change of this NewAllowance.  # noqa: E501
        :type: str
        """

        self._allowance_change = allowance_change

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


        :return: The spender of this NewAllowance.  # noqa: E501
        :rtype: str
        """
        return self._spender

    @spender.setter
    def spender(self, spender):
        """Sets the spender of this NewAllowance.


        :param spender: The spender of this NewAllowance.  # noqa: E501
        :type: str
        """

        self._spender = spender

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


        :return: The risky_spender of this NewAllowance.  # noqa: E501
        :rtype: int
        """
        return self._risky_spender

    @risky_spender.setter
    def risky_spender(self, risky_spender):
        """Sets the risky_spender of this NewAllowance.


        :param risky_spender: The risky_spender of this NewAllowance.  # noqa: E501
        :type: int
        """

        self._risky_spender = risky_spender

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


        :return: The pre_amount of this NewAllowance.  # noqa: E501
        :rtype: str
        """
        return self._pre_amount

    @pre_amount.setter
    def pre_amount(self, pre_amount):
        """Sets the pre_amount of this NewAllowance.


        :param pre_amount: The pre_amount of this NewAllowance.  # noqa: E501
        :type: str
        """

        self._pre_amount = pre_amount

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

        return self.__dict__ == other.__dict__

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