# coding: utf-8

"""
    Tator REST API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.6.5
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from ..configuration import Configuration


class MediaUpdate(object):
    """
    """

    """
    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 = {
        'archive_state': 'str',
        'attributes': 'dict(str, object)',
        'codec': 'str',
        'concat': 'list[ConcatDefinition]',
        'elemental_id': 'str',
        'fps': 'float',
        'height': 'int',
        'last_edit_end': 'datetime',
        'last_edit_start': 'datetime',
        'live': 'LiveUpdateDefinition',
        'master_section': 'int',
        'media_files': 'MediaFiles',
        'multi': 'MultiDefinition',
        'name': 'str',
        'null_attributes': 'list[str]',
        'num_frames': 'int',
        'primary_section': 'int',
        'reset_attributes': 'list[str]',
        'summary_level': 'int',
        'user_elemental_id': 'str',
        'width': 'int'
    }

    attribute_map = {
        'archive_state': 'archive_state',
        'attributes': 'attributes',
        'codec': 'codec',
        'concat': 'concat',
        'elemental_id': 'elemental_id',
        'fps': 'fps',
        'height': 'height',
        'last_edit_end': 'last_edit_end',
        'last_edit_start': 'last_edit_start',
        'live': 'live',
        'master_section': 'master_section',
        'media_files': 'media_files',
        'multi': 'multi',
        'name': 'name',
        'null_attributes': 'null_attributes',
        'num_frames': 'num_frames',
        'primary_section': 'primary_section',
        'reset_attributes': 'reset_attributes',
        'summary_level': 'summary_level',
        'user_elemental_id': 'user_elemental_id',
        'width': 'width'
    }

    def __init__(self, archive_state=None, attributes=None, codec=None, concat=None, elemental_id=None, fps=None, height=None, last_edit_end=None, last_edit_start=None, live=None, master_section=None, media_files=None, multi=None, name=None, null_attributes=None, num_frames=None, primary_section=None, reset_attributes=None, summary_level=None, user_elemental_id=None, width=None, local_vars_configuration=None):  # noqa: E501
        """MediaUpdate - a model defined in OpenAPI"""
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._archive_state = None
        self._attributes = None
        self._codec = None
        self._concat = None
        self._elemental_id = None
        self._fps = None
        self._height = None
        self._last_edit_end = None
        self._last_edit_start = None
        self._live = None
        self._master_section = None
        self._media_files = None
        self._multi = None
        self._name = None
        self._null_attributes = None
        self._num_frames = None
        self._primary_section = None
        self._reset_attributes = None
        self._summary_level = None
        self._user_elemental_id = None
        self._width = None
        self.discriminator = None

        if archive_state is not None:
            self.archive_state = archive_state
        if attributes is not None:
            self.attributes = attributes
        if codec is not None:
            self.codec = codec
        if concat is not None:
            self.concat = concat
        if elemental_id is not None:
            self.elemental_id = elemental_id
        if fps is not None:
            self.fps = fps
        if height is not None:
            self.height = height
        if last_edit_end is not None:
            self.last_edit_end = last_edit_end
        if last_edit_start is not None:
            self.last_edit_start = last_edit_start
        if live is not None:
            self.live = live
        if master_section is not None:
            self.master_section = master_section
        if media_files is not None:
            self.media_files = media_files
        if multi is not None:
            self.multi = multi
        if name is not None:
            self.name = name
        if null_attributes is not None:
            self.null_attributes = null_attributes
        if num_frames is not None:
            self.num_frames = num_frames
        if primary_section is not None:
            self.primary_section = primary_section
        if reset_attributes is not None:
            self.reset_attributes = reset_attributes
        if summary_level is not None:
            self.summary_level = summary_level
        if user_elemental_id is not None:
            self.user_elemental_id = user_elemental_id
        if width is not None:
            self.width = width

    @property
    def archive_state(self):
        """
        Marks media for archival or retrieval. Media may not be set directly to `live` or `archived`, the system performs that transition for the user.

        :return: The archive_state of this MediaUpdate. 
        :rtype: str
        """
        return self._archive_state

    @archive_state.setter
    def archive_state(self, archive_state):
        """
        Marks media for archival or retrieval. Media may not be set directly to `live` or `archived`, the system performs that transition for the user.

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

        self._archive_state = archive_state

    @property
    def attributes(self):
        """
        Object containing attribute values.

        :return: The attributes of this MediaUpdate. 
        :rtype: dict(str, object)
        """
        return self._attributes

    @attributes.setter
    def attributes(self, attributes):
        """
        Object containing attribute values.

        :param attributes: The attributes of this MediaUpdate.
        :type: dict(str, object)
        """

        self._attributes = attributes

    @property
    def codec(self):
        """
        Codec of the original video.

        :return: The codec of this MediaUpdate. 
        :rtype: str
        """
        return self._codec

    @codec.setter
    def codec(self, codec):
        """
        Codec of the original video.

        :param codec: The codec of this MediaUpdate.
        :type: str
        """

        self._codec = codec

    @property
    def concat(self):
        """
        List of concated videos

        :return: The concat of this MediaUpdate. 
        :rtype: list[ConcatDefinition]
        """
        return self._concat

    @concat.setter
    def concat(self, concat):
        """
        List of concated videos

        :param concat: The concat of this MediaUpdate.
        :type: list[ConcatDefinition]
        """

        self._concat = concat

    @property
    def elemental_id(self):
        """
        Unique ID of an element

        :return: The elemental_id of this MediaUpdate. 
        :rtype: str
        """
        return self._elemental_id

    @elemental_id.setter
    def elemental_id(self, elemental_id):
        """
        Unique ID of an element

        :param elemental_id: The elemental_id of this MediaUpdate.
        :type: str
        """

        self._elemental_id = elemental_id

    @property
    def fps(self):
        """
        Frame rate of the video.

        :return: The fps of this MediaUpdate. 
        :rtype: float
        """
        return self._fps

    @fps.setter
    def fps(self, fps):
        """
        Frame rate of the video.

        :param fps: The fps of this MediaUpdate.
        :type: float
        """

        self._fps = fps

    @property
    def height(self):
        """
        Pixel height of the video.

        :return: The height of this MediaUpdate. 
        :rtype: int
        """
        return self._height

    @height.setter
    def height(self, height):
        """
        Pixel height of the video.

        :param height: The height of this MediaUpdate.
        :type: int
        """

        self._height = height

    @property
    def last_edit_end(self):
        """
        Datetime of the end of the session when this media or its annotations were last edited.

        :return: The last_edit_end of this MediaUpdate. 
        :rtype: datetime
        """
        return self._last_edit_end

    @last_edit_end.setter
    def last_edit_end(self, last_edit_end):
        """
        Datetime of the end of the session when this media or its annotations were last edited.

        :param last_edit_end: The last_edit_end of this MediaUpdate.
        :type: datetime
        """

        self._last_edit_end = last_edit_end

    @property
    def last_edit_start(self):
        """
        Datetime of the start of the session when this media or its annotations were last edited.

        :return: The last_edit_start of this MediaUpdate. 
        :rtype: datetime
        """
        return self._last_edit_start

    @last_edit_start.setter
    def last_edit_start(self, last_edit_start):
        """
        Datetime of the start of the session when this media or its annotations were last edited.

        :param last_edit_start: The last_edit_start of this MediaUpdate.
        :type: datetime
        """

        self._last_edit_start = last_edit_start

    @property
    def live(self):
        """

        :return: The live of this MediaUpdate. 
        :rtype: LiveUpdateDefinition
        """
        return self._live

    @live.setter
    def live(self, live):
        """

        :param live: The live of this MediaUpdate.
        :type: LiveUpdateDefinition
        """

        self._live = live

    @property
    def master_section(self):
        """
        Unique ID to define the ACL origin of this object. If not set defaults to the master section of the primary_section.

        :return: The master_section of this MediaUpdate. 
        :rtype: int
        """
        return self._master_section

    @master_section.setter
    def master_section(self, master_section):
        """
        Unique ID to define the ACL origin of this object. If not set defaults to the master section of the primary_section.

        :param master_section: The master_section of this MediaUpdate.
        :type: int
        """

        self._master_section = master_section

    @property
    def media_files(self):
        """

        :return: The media_files of this MediaUpdate. 
        :rtype: MediaFiles
        """
        return self._media_files

    @media_files.setter
    def media_files(self, media_files):
        """

        :param media_files: The media_files of this MediaUpdate.
        :type: MediaFiles
        """

        self._media_files = media_files

    @property
    def multi(self):
        """

        :return: The multi of this MediaUpdate. 
        :rtype: MultiDefinition
        """
        return self._multi

    @multi.setter
    def multi(self, multi):
        """

        :param multi: The multi of this MediaUpdate.
        :type: MultiDefinition
        """

        self._multi = multi

    @property
    def name(self):
        """
        Name of the media.

        :return: The name of this MediaUpdate. 
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Name of the media.

        :param name: The name of this MediaUpdate.
        :type: str
        """

        self._name = name

    @property
    def null_attributes(self):
        """
        Null a value in the attributes body

        :return: The null_attributes of this MediaUpdate. 
        :rtype: list[str]
        """
        return self._null_attributes

    @null_attributes.setter
    def null_attributes(self, null_attributes):
        """
        Null a value in the attributes body

        :param null_attributes: The null_attributes of this MediaUpdate.
        :type: list[str]
        """

        self._null_attributes = null_attributes

    @property
    def num_frames(self):
        """
        Number of frames in the video.

        :return: The num_frames of this MediaUpdate. 
        :rtype: int
        """
        return self._num_frames

    @num_frames.setter
    def num_frames(self, num_frames):
        """
        Number of frames in the video.

        :param num_frames: The num_frames of this MediaUpdate.
        :type: int
        """
        if (self.local_vars_configuration.client_side_validation and
                num_frames is not None and num_frames < 0):  # noqa: E501
            raise ValueError("Invalid value for `num_frames`, must be a value greater than or equal to `0`")  # noqa: E501

        self._num_frames = num_frames

    @property
    def primary_section(self):
        """
        Unique ID for folder section containing this media, if any. When patching, use -1 to indicate no section.

        :return: The primary_section of this MediaUpdate. 
        :rtype: int
        """
        return self._primary_section

    @primary_section.setter
    def primary_section(self, primary_section):
        """
        Unique ID for folder section containing this media, if any. When patching, use -1 to indicate no section.

        :param primary_section: The primary_section of this MediaUpdate.
        :type: int
        """

        self._primary_section = primary_section

    @property
    def reset_attributes(self):
        """
        Reset an attribute to the default value specified in the Type object

        :return: The reset_attributes of this MediaUpdate. 
        :rtype: list[str]
        """
        return self._reset_attributes

    @reset_attributes.setter
    def reset_attributes(self, reset_attributes):
        """
        Reset an attribute to the default value specified in the Type object

        :param reset_attributes: The reset_attributes of this MediaUpdate.
        :type: list[str]
        """

        self._reset_attributes = reset_attributes

    @property
    def summary_level(self):
        """
        If supplied, this video is best summarized at this frame interval

        :return: The summary_level of this MediaUpdate. 
        :rtype: int
        """
        return self._summary_level

    @summary_level.setter
    def summary_level(self, summary_level):
        """
        If supplied, this video is best summarized at this frame interval

        :param summary_level: The summary_level of this MediaUpdate.
        :type: int
        """

        self._summary_level = summary_level

    @property
    def user_elemental_id(self):
        """
        Unique ID of the original user who created this. If permissions allow, will change the creating user to the one referenced by this elemental_id

        :return: The user_elemental_id of this MediaUpdate. 
        :rtype: str
        """
        return self._user_elemental_id

    @user_elemental_id.setter
    def user_elemental_id(self, user_elemental_id):
        """
        Unique ID of the original user who created this. If permissions allow, will change the creating user to the one referenced by this elemental_id

        :param user_elemental_id: The user_elemental_id of this MediaUpdate.
        :type: str
        """

        self._user_elemental_id = user_elemental_id

    @property
    def width(self):
        """
        Pixel width of the video.

        :return: The width of this MediaUpdate. 
        :rtype: int
        """
        return self._width

    @width.setter
    def width(self, width):
        """
        Pixel width of the video.

        :param width: The width of this MediaUpdate.
        :type: int
        """

        self._width = width

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

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