# coding: utf-8

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

import pprint
import re  # noqa: F401

import six

class PlaybackInfoResponse(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 = {
        'media_sources': 'list[MediaSourceInfo]',
        'play_session_id': 'str',
        'error_code': 'PlaybackErrorCode'
    }

    attribute_map = {
        'media_sources': 'MediaSources',
        'play_session_id': 'PlaySessionId',
        'error_code': 'ErrorCode'
    }

    def __init__(self, media_sources=None, play_session_id=None, error_code=None):  # noqa: E501
        """PlaybackInfoResponse - a model defined in Swagger"""  # noqa: E501
        self._media_sources = None
        self._play_session_id = None
        self._error_code = None
        self.discriminator = None
        if media_sources is not None:
            self.media_sources = media_sources
        if play_session_id is not None:
            self.play_session_id = play_session_id
        if error_code is not None:
            self.error_code = error_code

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

        The media sources.  # noqa: E501

        :return: The media_sources of this PlaybackInfoResponse.  # noqa: E501
        :rtype: list[MediaSourceInfo]
        """
        return self._media_sources

    @media_sources.setter
    def media_sources(self, media_sources):
        """Sets the media_sources of this PlaybackInfoResponse.

        The media sources.  # noqa: E501

        :param media_sources: The media_sources of this PlaybackInfoResponse.  # noqa: E501
        :type: list[MediaSourceInfo]
        """

        self._media_sources = media_sources

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

        The play session identifier.  # noqa: E501

        :return: The play_session_id of this PlaybackInfoResponse.  # noqa: E501
        :rtype: str
        """
        return self._play_session_id

    @play_session_id.setter
    def play_session_id(self, play_session_id):
        """Sets the play_session_id of this PlaybackInfoResponse.

        The play session identifier.  # noqa: E501

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

        self._play_session_id = play_session_id

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


        :return: The error_code of this PlaybackInfoResponse.  # noqa: E501
        :rtype: PlaybackErrorCode
        """
        return self._error_code

    @error_code.setter
    def error_code(self, error_code):
        """Sets the error_code of this PlaybackInfoResponse.


        :param error_code: The error_code of this PlaybackInfoResponse.  # noqa: E501
        :type: PlaybackErrorCode
        """

        self._error_code = error_code

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

        return self.__dict__ == other.__dict__

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