# coding: utf-8

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

import pprint
import re  # noqa: F401

import six

class PlayerStateInfo(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 = {
        'position_ticks': 'int',
        'can_seek': 'bool',
        'is_paused': 'bool',
        'is_muted': 'bool',
        'volume_level': 'int',
        'audio_stream_index': 'int',
        'subtitle_stream_index': 'int',
        'media_source_id': 'str',
        'play_method': 'PlayMethod',
        'repeat_mode': 'RepeatMode',
        'subtitle_offset': 'int',
        'shuffle': 'bool',
        'playback_rate': 'float'
    }

    attribute_map = {
        'position_ticks': 'PositionTicks',
        'can_seek': 'CanSeek',
        'is_paused': 'IsPaused',
        'is_muted': 'IsMuted',
        'volume_level': 'VolumeLevel',
        'audio_stream_index': 'AudioStreamIndex',
        'subtitle_stream_index': 'SubtitleStreamIndex',
        'media_source_id': 'MediaSourceId',
        'play_method': 'PlayMethod',
        'repeat_mode': 'RepeatMode',
        'subtitle_offset': 'SubtitleOffset',
        'shuffle': 'Shuffle',
        'playback_rate': 'PlaybackRate'
    }

    def __init__(self, position_ticks=None, can_seek=None, is_paused=None, is_muted=None, volume_level=None, audio_stream_index=None, subtitle_stream_index=None, media_source_id=None, play_method=None, repeat_mode=None, subtitle_offset=None, shuffle=None, playback_rate=None):  # noqa: E501
        """PlayerStateInfo - a model defined in Swagger"""  # noqa: E501
        self._position_ticks = None
        self._can_seek = None
        self._is_paused = None
        self._is_muted = None
        self._volume_level = None
        self._audio_stream_index = None
        self._subtitle_stream_index = None
        self._media_source_id = None
        self._play_method = None
        self._repeat_mode = None
        self._subtitle_offset = None
        self._shuffle = None
        self._playback_rate = None
        self.discriminator = None
        if position_ticks is not None:
            self.position_ticks = position_ticks
        if can_seek is not None:
            self.can_seek = can_seek
        if is_paused is not None:
            self.is_paused = is_paused
        if is_muted is not None:
            self.is_muted = is_muted
        if volume_level is not None:
            self.volume_level = volume_level
        if audio_stream_index is not None:
            self.audio_stream_index = audio_stream_index
        if subtitle_stream_index is not None:
            self.subtitle_stream_index = subtitle_stream_index
        if media_source_id is not None:
            self.media_source_id = media_source_id
        if play_method is not None:
            self.play_method = play_method
        if repeat_mode is not None:
            self.repeat_mode = repeat_mode
        if subtitle_offset is not None:
            self.subtitle_offset = subtitle_offset
        if shuffle is not None:
            self.shuffle = shuffle
        if playback_rate is not None:
            self.playback_rate = playback_rate

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

        The now playing position ticks.  # noqa: E501

        :return: The position_ticks of this PlayerStateInfo.  # noqa: E501
        :rtype: int
        """
        return self._position_ticks

    @position_ticks.setter
    def position_ticks(self, position_ticks):
        """Sets the position_ticks of this PlayerStateInfo.

        The now playing position ticks.  # noqa: E501

        :param position_ticks: The position_ticks of this PlayerStateInfo.  # noqa: E501
        :type: int
        """

        self._position_ticks = position_ticks

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

        A value indicating whether this instance can seek.  # noqa: E501

        :return: The can_seek of this PlayerStateInfo.  # noqa: E501
        :rtype: bool
        """
        return self._can_seek

    @can_seek.setter
    def can_seek(self, can_seek):
        """Sets the can_seek of this PlayerStateInfo.

        A value indicating whether this instance can seek.  # noqa: E501

        :param can_seek: The can_seek of this PlayerStateInfo.  # noqa: E501
        :type: bool
        """

        self._can_seek = can_seek

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

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

        :return: The is_paused of this PlayerStateInfo.  # noqa: E501
        :rtype: bool
        """
        return self._is_paused

    @is_paused.setter
    def is_paused(self, is_paused):
        """Sets the is_paused of this PlayerStateInfo.

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

        :param is_paused: The is_paused of this PlayerStateInfo.  # noqa: E501
        :type: bool
        """

        self._is_paused = is_paused

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

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

        :return: The is_muted of this PlayerStateInfo.  # noqa: E501
        :rtype: bool
        """
        return self._is_muted

    @is_muted.setter
    def is_muted(self, is_muted):
        """Sets the is_muted of this PlayerStateInfo.

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

        :param is_muted: The is_muted of this PlayerStateInfo.  # noqa: E501
        :type: bool
        """

        self._is_muted = is_muted

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

        The volume level.  # noqa: E501

        :return: The volume_level of this PlayerStateInfo.  # noqa: E501
        :rtype: int
        """
        return self._volume_level

    @volume_level.setter
    def volume_level(self, volume_level):
        """Sets the volume_level of this PlayerStateInfo.

        The volume level.  # noqa: E501

        :param volume_level: The volume_level of this PlayerStateInfo.  # noqa: E501
        :type: int
        """

        self._volume_level = volume_level

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

        The index of the now playing audio stream.  # noqa: E501

        :return: The audio_stream_index of this PlayerStateInfo.  # noqa: E501
        :rtype: int
        """
        return self._audio_stream_index

    @audio_stream_index.setter
    def audio_stream_index(self, audio_stream_index):
        """Sets the audio_stream_index of this PlayerStateInfo.

        The index of the now playing audio stream.  # noqa: E501

        :param audio_stream_index: The audio_stream_index of this PlayerStateInfo.  # noqa: E501
        :type: int
        """

        self._audio_stream_index = audio_stream_index

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

        The index of the now playing subtitle stream.  # noqa: E501

        :return: The subtitle_stream_index of this PlayerStateInfo.  # noqa: E501
        :rtype: int
        """
        return self._subtitle_stream_index

    @subtitle_stream_index.setter
    def subtitle_stream_index(self, subtitle_stream_index):
        """Sets the subtitle_stream_index of this PlayerStateInfo.

        The index of the now playing subtitle stream.  # noqa: E501

        :param subtitle_stream_index: The subtitle_stream_index of this PlayerStateInfo.  # noqa: E501
        :type: int
        """

        self._subtitle_stream_index = subtitle_stream_index

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

        The now playing media version identifier.  # noqa: E501

        :return: The media_source_id of this PlayerStateInfo.  # noqa: E501
        :rtype: str
        """
        return self._media_source_id

    @media_source_id.setter
    def media_source_id(self, media_source_id):
        """Sets the media_source_id of this PlayerStateInfo.

        The now playing media version identifier.  # noqa: E501

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

        self._media_source_id = media_source_id

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


        :return: The play_method of this PlayerStateInfo.  # noqa: E501
        :rtype: PlayMethod
        """
        return self._play_method

    @play_method.setter
    def play_method(self, play_method):
        """Sets the play_method of this PlayerStateInfo.


        :param play_method: The play_method of this PlayerStateInfo.  # noqa: E501
        :type: PlayMethod
        """

        self._play_method = play_method

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


        :return: The repeat_mode of this PlayerStateInfo.  # noqa: E501
        :rtype: RepeatMode
        """
        return self._repeat_mode

    @repeat_mode.setter
    def repeat_mode(self, repeat_mode):
        """Sets the repeat_mode of this PlayerStateInfo.


        :param repeat_mode: The repeat_mode of this PlayerStateInfo.  # noqa: E501
        :type: RepeatMode
        """

        self._repeat_mode = repeat_mode

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


        :return: The subtitle_offset of this PlayerStateInfo.  # noqa: E501
        :rtype: int
        """
        return self._subtitle_offset

    @subtitle_offset.setter
    def subtitle_offset(self, subtitle_offset):
        """Sets the subtitle_offset of this PlayerStateInfo.


        :param subtitle_offset: The subtitle_offset of this PlayerStateInfo.  # noqa: E501
        :type: int
        """

        self._subtitle_offset = subtitle_offset

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


        :return: The shuffle of this PlayerStateInfo.  # noqa: E501
        :rtype: bool
        """
        return self._shuffle

    @shuffle.setter
    def shuffle(self, shuffle):
        """Sets the shuffle of this PlayerStateInfo.


        :param shuffle: The shuffle of this PlayerStateInfo.  # noqa: E501
        :type: bool
        """

        self._shuffle = shuffle

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


        :return: The playback_rate of this PlayerStateInfo.  # noqa: E501
        :rtype: float
        """
        return self._playback_rate

    @playback_rate.setter
    def playback_rate(self, playback_rate):
        """Sets the playback_rate of this PlayerStateInfo.


        :param playback_rate: The playback_rate of this PlayerStateInfo.  # noqa: E501
        :type: float
        """

        self._playback_rate = playback_rate

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

        return self.__dict__ == other.__dict__

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