# 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 OrmCoupon(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 = {
        'code': 'str',
        'created_by': 'str',
        'created_dt': 'datetime',
        'credit_expiration_seconds': 'int',
        'credit_value': 'int',
        'edges': 'OrmCouponEdges',
        'end_dt': 'datetime',
        'group_name': 'str',
        'id': 'int',
        'immutable_slug': 'str',
        'redeem_current_count': 'int',
        'redeem_max_count': 'int',
        'start_dt': 'datetime',
        'updated_dt': 'datetime'
    }

    attribute_map = {
        'code': 'code',
        'created_by': 'created_by',
        'created_dt': 'created_dt',
        'credit_expiration_seconds': 'credit_expiration_seconds',
        'credit_value': 'credit_value',
        'edges': 'edges',
        'end_dt': 'end_dt',
        'group_name': 'group_name',
        'id': 'id',
        'immutable_slug': 'immutable_slug',
        'redeem_current_count': 'redeem_current_count',
        'redeem_max_count': 'redeem_max_count',
        'start_dt': 'start_dt',
        'updated_dt': 'updated_dt'
    }

    def __init__(self, code=None, created_by=None, created_dt=None, credit_expiration_seconds=None, credit_value=None, edges=None, end_dt=None, group_name=None, id=None, immutable_slug=None, redeem_current_count=None, redeem_max_count=None, start_dt=None, updated_dt=None, local_vars_configuration=None):  # noqa: E501
        """OrmCoupon - 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._code = None
        self._created_by = None
        self._created_dt = None
        self._credit_expiration_seconds = None
        self._credit_value = None
        self._edges = None
        self._end_dt = None
        self._group_name = None
        self._id = None
        self._immutable_slug = None
        self._redeem_current_count = None
        self._redeem_max_count = None
        self._start_dt = None
        self._updated_dt = None
        self.discriminator = None

        if code is not None:
            self.code = code
        if created_by is not None:
            self.created_by = created_by
        if created_dt is not None:
            self.created_dt = created_dt
        if credit_expiration_seconds is not None:
            self.credit_expiration_seconds = credit_expiration_seconds
        if credit_value is not None:
            self.credit_value = credit_value
        if edges is not None:
            self.edges = edges
        if end_dt is not None:
            self.end_dt = end_dt
        if group_name is not None:
            self.group_name = group_name
        if id is not None:
            self.id = id
        if immutable_slug is not None:
            self.immutable_slug = immutable_slug
        if redeem_current_count is not None:
            self.redeem_current_count = redeem_current_count
        if redeem_max_count is not None:
            self.redeem_max_count = redeem_max_count
        if start_dt is not None:
            self.start_dt = start_dt
        if updated_dt is not None:
            self.updated_dt = updated_dt

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


        :return: The code of this OrmCoupon.  # noqa: E501
        :rtype: str
        """
        return self._code

    @code.setter
    def code(self, code):
        """Sets the code of this OrmCoupon.


        :param code: The code of this OrmCoupon.  # noqa: E501
        :type code: str
        """

        self._code = code

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


        :return: The created_by of this OrmCoupon.  # noqa: E501
        :rtype: str
        """
        return self._created_by

    @created_by.setter
    def created_by(self, created_by):
        """Sets the created_by of this OrmCoupon.


        :param created_by: The created_by of this OrmCoupon.  # noqa: E501
        :type created_by: str
        """

        self._created_by = created_by

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


        :return: The created_dt of this OrmCoupon.  # noqa: E501
        :rtype: datetime
        """
        return self._created_dt

    @created_dt.setter
    def created_dt(self, created_dt):
        """Sets the created_dt of this OrmCoupon.


        :param created_dt: The created_dt of this OrmCoupon.  # noqa: E501
        :type created_dt: datetime
        """

        self._created_dt = created_dt

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


        :return: The credit_expiration_seconds of this OrmCoupon.  # noqa: E501
        :rtype: int
        """
        return self._credit_expiration_seconds

    @credit_expiration_seconds.setter
    def credit_expiration_seconds(self, credit_expiration_seconds):
        """Sets the credit_expiration_seconds of this OrmCoupon.


        :param credit_expiration_seconds: The credit_expiration_seconds of this OrmCoupon.  # noqa: E501
        :type credit_expiration_seconds: int
        """

        self._credit_expiration_seconds = credit_expiration_seconds

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


        :return: The credit_value of this OrmCoupon.  # noqa: E501
        :rtype: int
        """
        return self._credit_value

    @credit_value.setter
    def credit_value(self, credit_value):
        """Sets the credit_value of this OrmCoupon.


        :param credit_value: The credit_value of this OrmCoupon.  # noqa: E501
        :type credit_value: int
        """

        self._credit_value = credit_value

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


        :return: The edges of this OrmCoupon.  # noqa: E501
        :rtype: OrmCouponEdges
        """
        return self._edges

    @edges.setter
    def edges(self, edges):
        """Sets the edges of this OrmCoupon.


        :param edges: The edges of this OrmCoupon.  # noqa: E501
        :type edges: OrmCouponEdges
        """

        self._edges = edges

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


        :return: The end_dt of this OrmCoupon.  # noqa: E501
        :rtype: datetime
        """
        return self._end_dt

    @end_dt.setter
    def end_dt(self, end_dt):
        """Sets the end_dt of this OrmCoupon.


        :param end_dt: The end_dt of this OrmCoupon.  # noqa: E501
        :type end_dt: datetime
        """

        self._end_dt = end_dt

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


        :return: The group_name of this OrmCoupon.  # noqa: E501
        :rtype: str
        """
        return self._group_name

    @group_name.setter
    def group_name(self, group_name):
        """Sets the group_name of this OrmCoupon.


        :param group_name: The group_name of this OrmCoupon.  # noqa: E501
        :type group_name: str
        """

        self._group_name = group_name

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


        :return: The id of this OrmCoupon.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this OrmCoupon.


        :param id: The id of this OrmCoupon.  # noqa: E501
        :type id: int
        """

        self._id = id

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


        :return: The immutable_slug of this OrmCoupon.  # noqa: E501
        :rtype: str
        """
        return self._immutable_slug

    @immutable_slug.setter
    def immutable_slug(self, immutable_slug):
        """Sets the immutable_slug of this OrmCoupon.


        :param immutable_slug: The immutable_slug of this OrmCoupon.  # noqa: E501
        :type immutable_slug: str
        """

        self._immutable_slug = immutable_slug

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


        :return: The redeem_current_count of this OrmCoupon.  # noqa: E501
        :rtype: int
        """
        return self._redeem_current_count

    @redeem_current_count.setter
    def redeem_current_count(self, redeem_current_count):
        """Sets the redeem_current_count of this OrmCoupon.


        :param redeem_current_count: The redeem_current_count of this OrmCoupon.  # noqa: E501
        :type redeem_current_count: int
        """

        self._redeem_current_count = redeem_current_count

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


        :return: The redeem_max_count of this OrmCoupon.  # noqa: E501
        :rtype: int
        """
        return self._redeem_max_count

    @redeem_max_count.setter
    def redeem_max_count(self, redeem_max_count):
        """Sets the redeem_max_count of this OrmCoupon.


        :param redeem_max_count: The redeem_max_count of this OrmCoupon.  # noqa: E501
        :type redeem_max_count: int
        """

        self._redeem_max_count = redeem_max_count

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


        :return: The start_dt of this OrmCoupon.  # noqa: E501
        :rtype: datetime
        """
        return self._start_dt

    @start_dt.setter
    def start_dt(self, start_dt):
        """Sets the start_dt of this OrmCoupon.


        :param start_dt: The start_dt of this OrmCoupon.  # noqa: E501
        :type start_dt: datetime
        """

        self._start_dt = start_dt

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


        :return: The updated_dt of this OrmCoupon.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_dt

    @updated_dt.setter
    def updated_dt(self, updated_dt):
        """Sets the updated_dt of this OrmCoupon.


        :param updated_dt: The updated_dt of this OrmCoupon.  # noqa: E501
        :type updated_dt: datetime
        """

        self._updated_dt = updated_dt

    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, OrmCoupon):
            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, OrmCoupon):
            return True

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