# coding: utf-8

"""
    marax-server-sdk

    Marax Server SDK to send transactional events from client server to marax server  # noqa: E501

    The version of the OpenAPI document: 0.3.0
    Contact: team@marax.ai
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from marax_server_sdk.configuration import Configuration


class RequestBodyPropertiesReward(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 = {
        'id': 'str',
        'expiry': 'datetime',
        'timezone': 'str',
        'promocode': 'str',
        'title': 'str',
        'body': 'str',
        'updated_at': 'datetime',
        'type': 'str',
        'ui': 'str',
        'handled_by': 'str'
    }

    attribute_map = {
        'id': 'id',
        'expiry': 'expiry',
        'timezone': 'timezone',
        'promocode': 'promocode',
        'title': 'title',
        'body': 'body',
        'updated_at': 'updatedAt',
        'type': 'type',
        'ui': 'ui',
        'handled_by': 'handledBy'
    }

    def __init__(self, id=None, expiry=None, timezone=None, promocode=None, title=None, body=None, updated_at=None, type=None, ui=None, handled_by=None, local_vars_configuration=None):  # noqa: E501
        """RequestBodyPropertiesReward - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._id = None
        self._expiry = None
        self._timezone = None
        self._promocode = None
        self._title = None
        self._body = None
        self._updated_at = None
        self._type = None
        self._ui = None
        self._handled_by = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if expiry is not None:
            self.expiry = expiry
        if timezone is not None:
            self.timezone = timezone
        self.promocode = promocode
        self.title = title
        self.body = body
        if updated_at is not None:
            self.updated_at = updated_at
        if type is not None:
            self.type = type
        if ui is not None:
            self.ui = ui
        if handled_by is not None:
            self.handled_by = handled_by

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


        :return: The id of this RequestBodyPropertiesReward.  # noqa: E501
        :rtype: str
        """
        return self._id

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


        :param id: The id of this RequestBodyPropertiesReward.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The expiry of this RequestBodyPropertiesReward.  # noqa: E501
        :rtype: datetime
        """
        return self._expiry

    @expiry.setter
    def expiry(self, expiry):
        """Sets the expiry of this RequestBodyPropertiesReward.


        :param expiry: The expiry of this RequestBodyPropertiesReward.  # noqa: E501
        :type: datetime
        """

        self._expiry = expiry

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


        :return: The timezone of this RequestBodyPropertiesReward.  # noqa: E501
        :rtype: str
        """
        return self._timezone

    @timezone.setter
    def timezone(self, timezone):
        """Sets the timezone of this RequestBodyPropertiesReward.


        :param timezone: The timezone of this RequestBodyPropertiesReward.  # noqa: E501
        :type: str
        """

        self._timezone = timezone

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


        :return: The promocode of this RequestBodyPropertiesReward.  # noqa: E501
        :rtype: str
        """
        return self._promocode

    @promocode.setter
    def promocode(self, promocode):
        """Sets the promocode of this RequestBodyPropertiesReward.


        :param promocode: The promocode of this RequestBodyPropertiesReward.  # noqa: E501
        :type: str
        """

        self._promocode = promocode

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


        :return: The title of this RequestBodyPropertiesReward.  # noqa: E501
        :rtype: str
        """
        return self._title

    @title.setter
    def title(self, title):
        """Sets the title of this RequestBodyPropertiesReward.


        :param title: The title of this RequestBodyPropertiesReward.  # noqa: E501
        :type: str
        """

        self._title = title

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


        :return: The body of this RequestBodyPropertiesReward.  # noqa: E501
        :rtype: str
        """
        return self._body

    @body.setter
    def body(self, body):
        """Sets the body of this RequestBodyPropertiesReward.


        :param body: The body of this RequestBodyPropertiesReward.  # noqa: E501
        :type: str
        """

        self._body = body

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


        :return: The updated_at of this RequestBodyPropertiesReward.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this RequestBodyPropertiesReward.


        :param updated_at: The updated_at of this RequestBodyPropertiesReward.  # noqa: E501
        :type: datetime
        """

        self._updated_at = updated_at

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


        :return: The type of this RequestBodyPropertiesReward.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this RequestBodyPropertiesReward.


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

        self._type = type

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


        :return: The ui of this RequestBodyPropertiesReward.  # noqa: E501
        :rtype: str
        """
        return self._ui

    @ui.setter
    def ui(self, ui):
        """Sets the ui of this RequestBodyPropertiesReward.


        :param ui: The ui of this RequestBodyPropertiesReward.  # noqa: E501
        :type: str
        """

        self._ui = ui

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


        :return: The handled_by of this RequestBodyPropertiesReward.  # noqa: E501
        :rtype: str
        """
        return self._handled_by

    @handled_by.setter
    def handled_by(self, handled_by):
        """Sets the handled_by of this RequestBodyPropertiesReward.


        :param handled_by: The handled_by of this RequestBodyPropertiesReward.  # noqa: E501
        :type: str
        """
        allowed_values = ["marax", "client"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and handled_by not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `handled_by` ({0}), must be one of {1}"  # noqa: E501
                .format(handled_by, allowed_values)
            )

        self._handled_by = handled_by

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

        for attr, _ in six.iteritems(self.openapi_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

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

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