# coding: utf-8

"""
    Emby Server REST API (BETA)
"""

import pprint
import re  # noqa: F401

import six

class UserItemDataDto(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 = {
        'rating': 'float',
        'played_percentage': 'float',
        'unplayed_item_count': 'int',
        'playback_position_ticks': 'int',
        'play_count': 'int',
        'is_favorite': 'bool',
        'last_played_date': 'datetime',
        'played': 'bool',
        'key': 'str',
        'item_id': 'str',
        'server_id': 'str'
    }

    attribute_map = {
        'rating': 'Rating',
        'played_percentage': 'PlayedPercentage',
        'unplayed_item_count': 'UnplayedItemCount',
        'playback_position_ticks': 'PlaybackPositionTicks',
        'play_count': 'PlayCount',
        'is_favorite': 'IsFavorite',
        'last_played_date': 'LastPlayedDate',
        'played': 'Played',
        'key': 'Key',
        'item_id': 'ItemId',
        'server_id': 'ServerId'
    }

    def __init__(self, rating=None, played_percentage=None, unplayed_item_count=None, playback_position_ticks=None, play_count=None, is_favorite=None, last_played_date=None, played=None, key=None, item_id=None, server_id=None):  # noqa: E501
        """UserItemDataDto - a model defined in Swagger"""  # noqa: E501
        self._rating = None
        self._played_percentage = None
        self._unplayed_item_count = None
        self._playback_position_ticks = None
        self._play_count = None
        self._is_favorite = None
        self._last_played_date = None
        self._played = None
        self._key = None
        self._item_id = None
        self._server_id = None
        self.discriminator = None
        if rating is not None:
            self.rating = rating
        if played_percentage is not None:
            self.played_percentage = played_percentage
        if unplayed_item_count is not None:
            self.unplayed_item_count = unplayed_item_count
        if playback_position_ticks is not None:
            self.playback_position_ticks = playback_position_ticks
        if play_count is not None:
            self.play_count = play_count
        if is_favorite is not None:
            self.is_favorite = is_favorite
        if last_played_date is not None:
            self.last_played_date = last_played_date
        if played is not None:
            self.played = played
        if key is not None:
            self.key = key
        if item_id is not None:
            self.item_id = item_id
        if server_id is not None:
            self.server_id = server_id

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

        The rating.  # noqa: E501

        :return: The rating of this UserItemDataDto.  # noqa: E501
        :rtype: float
        """
        return self._rating

    @rating.setter
    def rating(self, rating):
        """Sets the rating of this UserItemDataDto.

        The rating.  # noqa: E501

        :param rating: The rating of this UserItemDataDto.  # noqa: E501
        :type: float
        """

        self._rating = rating

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

        The played percentage.  # noqa: E501

        :return: The played_percentage of this UserItemDataDto.  # noqa: E501
        :rtype: float
        """
        return self._played_percentage

    @played_percentage.setter
    def played_percentage(self, played_percentage):
        """Sets the played_percentage of this UserItemDataDto.

        The played percentage.  # noqa: E501

        :param played_percentage: The played_percentage of this UserItemDataDto.  # noqa: E501
        :type: float
        """

        self._played_percentage = played_percentage

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

        The unplayed item count.  # noqa: E501

        :return: The unplayed_item_count of this UserItemDataDto.  # noqa: E501
        :rtype: int
        """
        return self._unplayed_item_count

    @unplayed_item_count.setter
    def unplayed_item_count(self, unplayed_item_count):
        """Sets the unplayed_item_count of this UserItemDataDto.

        The unplayed item count.  # noqa: E501

        :param unplayed_item_count: The unplayed_item_count of this UserItemDataDto.  # noqa: E501
        :type: int
        """

        self._unplayed_item_count = unplayed_item_count

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

        The playback position ticks.  # noqa: E501

        :return: The playback_position_ticks of this UserItemDataDto.  # noqa: E501
        :rtype: int
        """
        return self._playback_position_ticks

    @playback_position_ticks.setter
    def playback_position_ticks(self, playback_position_ticks):
        """Sets the playback_position_ticks of this UserItemDataDto.

        The playback position ticks.  # noqa: E501

        :param playback_position_ticks: The playback_position_ticks of this UserItemDataDto.  # noqa: E501
        :type: int
        """

        self._playback_position_ticks = playback_position_ticks

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

        The play count.  # noqa: E501

        :return: The play_count of this UserItemDataDto.  # noqa: E501
        :rtype: int
        """
        return self._play_count

    @play_count.setter
    def play_count(self, play_count):
        """Sets the play_count of this UserItemDataDto.

        The play count.  # noqa: E501

        :param play_count: The play_count of this UserItemDataDto.  # noqa: E501
        :type: int
        """

        self._play_count = play_count

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

        A value indicating whether this instance is favorite.  # noqa: E501

        :return: The is_favorite of this UserItemDataDto.  # noqa: E501
        :rtype: bool
        """
        return self._is_favorite

    @is_favorite.setter
    def is_favorite(self, is_favorite):
        """Sets the is_favorite of this UserItemDataDto.

        A value indicating whether this instance is favorite.  # noqa: E501

        :param is_favorite: The is_favorite of this UserItemDataDto.  # noqa: E501
        :type: bool
        """

        self._is_favorite = is_favorite

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

        The last played date.  # noqa: E501

        :return: The last_played_date of this UserItemDataDto.  # noqa: E501
        :rtype: datetime
        """
        return self._last_played_date

    @last_played_date.setter
    def last_played_date(self, last_played_date):
        """Sets the last_played_date of this UserItemDataDto.

        The last played date.  # noqa: E501

        :param last_played_date: The last_played_date of this UserItemDataDto.  # noqa: E501
        :type: datetime
        """

        self._last_played_date = last_played_date

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

        A value indicating whether this `MediaBrowser.Model.Dto.UserItemDataDto` is played.  # noqa: E501

        :return: The played of this UserItemDataDto.  # noqa: E501
        :rtype: bool
        """
        return self._played

    @played.setter
    def played(self, played):
        """Sets the played of this UserItemDataDto.

        A value indicating whether this `MediaBrowser.Model.Dto.UserItemDataDto` is played.  # noqa: E501

        :param played: The played of this UserItemDataDto.  # noqa: E501
        :type: bool
        """

        self._played = played

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

        The key.  # noqa: E501

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

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

        The key.  # noqa: E501

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

        self._key = key

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

        The item identifier.  # noqa: E501

        :return: The item_id of this UserItemDataDto.  # noqa: E501
        :rtype: str
        """
        return self._item_id

    @item_id.setter
    def item_id(self, item_id):
        """Sets the item_id of this UserItemDataDto.

        The item identifier.  # noqa: E501

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

        self._item_id = item_id

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

        Used only by our Windows app. Not used by Emby Server.  # noqa: E501

        :return: The server_id of this UserItemDataDto.  # noqa: E501
        :rtype: str
        """
        return self._server_id

    @server_id.setter
    def server_id(self, server_id):
        """Sets the server_id of this UserItemDataDto.

        Used only by our Windows app. Not used by Emby Server.  # noqa: E501

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

        self._server_id = server_id

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

        return self.__dict__ == other.__dict__

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