# coding: utf-8

"""
    Kalshi Trade API

    This documentation describes Kalshi's trading API (known as Trade API v2). By using this API, you agree to Kalshi's Developer Agreement (https://kalshi.com/developer-agreement).  # noqa: E501

    OpenAPI spec version: 2.0.0
    Contact: support@kalshi.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class Fill(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 = {
        'action': 'str',
        'count': 'int',
        'created_time': 'OutputTime',
        'is_taker': 'bool',
        'order_id': 'str',
        'side': 'str',
        'ticker': 'str',
        'trade_id': 'str',
        'yes_price': 'Cent'
    }

    attribute_map = {
        'action': 'action',
        'count': 'count',
        'created_time': 'created_time',
        'is_taker': 'is_taker',
        'order_id': 'order_id',
        'side': 'side',
        'ticker': 'ticker',
        'trade_id': 'trade_id',
        'yes_price': 'yes_price'
    }

    def __init__(self, action=None, count=None, created_time=None, is_taker=None, order_id=None, side=None, ticker=None, trade_id=None, yes_price=None):  # noqa: E501
        """Fill - a model defined in Swagger"""  # noqa: E501
        self._action = None
        self._count = None
        self._created_time = None
        self._is_taker = None
        self._order_id = None
        self._side = None
        self._ticker = None
        self._trade_id = None
        self._yes_price = None
        self.discriminator = None
        if action is not None:
            self.action = action
        if count is not None:
            self.count = count
        if created_time is not None:
            self.created_time = created_time
        if is_taker is not None:
            self.is_taker = is_taker
        if order_id is not None:
            self.order_id = order_id
        if side is not None:
            self.side = side
        if ticker is not None:
            self.ticker = ticker
        if trade_id is not None:
            self.trade_id = trade_id
        if yes_price is not None:
            self.yes_price = yes_price

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


        :return: The action of this Fill.  # noqa: E501
        :rtype: str
        """
        return self._action

    @action.setter
    def action(self, action):
        """Sets the action of this Fill.


        :param action: The action of this Fill.  # noqa: E501
        :type: str
        """
        allowed_values = ["buy", "sell", ""]  # noqa: E501
        if action not in allowed_values:
            raise ValueError(
                "Invalid value for `action` ({0}), must be one of {1}"  # noqa: E501
                .format(action, allowed_values)
            )

        self._action = action

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


        :return: The count of this Fill.  # noqa: E501
        :rtype: int
        """
        return self._count

    @count.setter
    def count(self, count):
        """Sets the count of this Fill.


        :param count: The count of this Fill.  # noqa: E501
        :type: int
        """

        self._count = count

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


        :return: The created_time of this Fill.  # noqa: E501
        :rtype: OutputTime
        """
        return self._created_time

    @created_time.setter
    def created_time(self, created_time):
        """Sets the created_time of this Fill.


        :param created_time: The created_time of this Fill.  # noqa: E501
        :type: OutputTime
        """

        self._created_time = created_time

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


        :return: The is_taker of this Fill.  # noqa: E501
        :rtype: bool
        """
        return self._is_taker

    @is_taker.setter
    def is_taker(self, is_taker):
        """Sets the is_taker of this Fill.


        :param is_taker: The is_taker of this Fill.  # noqa: E501
        :type: bool
        """

        self._is_taker = is_taker

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


        :return: The order_id of this Fill.  # noqa: E501
        :rtype: str
        """
        return self._order_id

    @order_id.setter
    def order_id(self, order_id):
        """Sets the order_id of this Fill.


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

        self._order_id = order_id

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


        :return: The side of this Fill.  # noqa: E501
        :rtype: str
        """
        return self._side

    @side.setter
    def side(self, side):
        """Sets the side of this Fill.


        :param side: The side of this Fill.  # noqa: E501
        :type: str
        """
        allowed_values = ["yes", "no", "invalid", ""]  # noqa: E501
        if side not in allowed_values:
            raise ValueError(
                "Invalid value for `side` ({0}), must be one of {1}"  # noqa: E501
                .format(side, allowed_values)
            )

        self._side = side

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


        :return: The ticker of this Fill.  # noqa: E501
        :rtype: str
        """
        return self._ticker

    @ticker.setter
    def ticker(self, ticker):
        """Sets the ticker of this Fill.


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

        self._ticker = ticker

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


        :return: The trade_id of this Fill.  # noqa: E501
        :rtype: str
        """
        return self._trade_id

    @trade_id.setter
    def trade_id(self, trade_id):
        """Sets the trade_id of this Fill.


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

        self._trade_id = trade_id

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


        :return: The yes_price of this Fill.  # noqa: E501
        :rtype: Cent
        """
        return self._yes_price

    @yes_price.setter
    def yes_price(self, yes_price):
        """Sets the yes_price of this Fill.


        :param yes_price: The yes_price of this Fill.  # noqa: E501
        :type: Cent
        """

        self._yes_price = yes_price

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

        return self.__dict__ == other.__dict__

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