# coding: utf-8

"""
    Tator REST API

    Interface to the Tator backend.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from ..configuration import Configuration


class MediaBulkUpdate(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)',
        'float_array': 'list[FloatArrayQuery]',
        'ids': 'list[int]',
        'localization_ids': 'list[int]',
        'null_attributes': 'list[str]',
        'object_search': 'AttributeOperationSpec',
        'reset_attributes': 'list[str]',
        'state_ids': 'list[int]',
        'user_elemental_id': 'str'
    }

    attribute_map = {
        'archive_state': 'archive_state',
        'attributes': 'attributes',
        'float_array': 'float_array',
        'ids': 'ids',
        'localization_ids': 'localization_ids',
        'null_attributes': 'null_attributes',
        'object_search': 'object_search',
        'reset_attributes': 'reset_attributes',
        'state_ids': 'state_ids',
        'user_elemental_id': 'user_elemental_id'
    }

    def __init__(self, archive_state=None, attributes=None, float_array=None, ids=None, localization_ids=None, null_attributes=None, object_search=None, reset_attributes=None, state_ids=None, user_elemental_id=None, local_vars_configuration=None):  # noqa: E501
        """MediaBulkUpdate - 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._float_array = None
        self._ids = None
        self._localization_ids = None
        self._null_attributes = None
        self._object_search = None
        self._reset_attributes = None
        self._state_ids = None
        self._user_elemental_id = None
        self.discriminator = None

        if archive_state is not None:
            self.archive_state = archive_state
        if attributes is not None:
            self.attributes = attributes
        if float_array is not None:
            self.float_array = float_array
        if ids is not None:
            self.ids = ids
        if localization_ids is not None:
            self.localization_ids = localization_ids
        if null_attributes is not None:
            self.null_attributes = null_attributes
        if object_search is not None:
            self.object_search = object_search
        if reset_attributes is not None:
            self.reset_attributes = reset_attributes
        if state_ids is not None:
            self.state_ids = state_ids
        if user_elemental_id is not None:
            self.user_elemental_id = user_elemental_id

    @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 MediaBulkUpdate. 
        :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 MediaBulkUpdate.
        :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):
        """
        Attribute values to bulk update an entity list.

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

    @attributes.setter
    def attributes(self, attributes):
        """
        Attribute values to bulk update an entity list.

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

        self._attributes = attributes

    @property
    def float_array(self):
        """
        Searches on `float_array` attributes.

        :return: The float_array of this MediaBulkUpdate. 
        :rtype: list[FloatArrayQuery]
        """
        return self._float_array

    @float_array.setter
    def float_array(self, float_array):
        """
        Searches on `float_array` attributes.

        :param float_array: The float_array of this MediaBulkUpdate.
        :type: list[FloatArrayQuery]
        """

        self._float_array = float_array

    @property
    def ids(self):
        """
        Array of media IDs to retrieve.

        :return: The ids of this MediaBulkUpdate. 
        :rtype: list[int]
        """
        return self._ids

    @ids.setter
    def ids(self, ids):
        """
        Array of media IDs to retrieve.

        :param ids: The ids of this MediaBulkUpdate.
        :type: list[int]
        """

        self._ids = ids

    @property
    def localization_ids(self):
        """
        Array of child localization IDs for which media should be retrieved.

        :return: The localization_ids of this MediaBulkUpdate. 
        :rtype: list[int]
        """
        return self._localization_ids

    @localization_ids.setter
    def localization_ids(self, localization_ids):
        """
        Array of child localization IDs for which media should be retrieved.

        :param localization_ids: The localization_ids of this MediaBulkUpdate.
        :type: list[int]
        """

        self._localization_ids = localization_ids

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

        :return: The null_attributes of this MediaBulkUpdate. 
        :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 MediaBulkUpdate.
        :type: list[str]
        """

        self._null_attributes = null_attributes

    @property
    def object_search(self):
        """

        :return: The object_search of this MediaBulkUpdate. 
        :rtype: AttributeOperationSpec
        """
        return self._object_search

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

        :param object_search: The object_search of this MediaBulkUpdate.
        :type: AttributeOperationSpec
        """

        self._object_search = object_search

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

        :return: The reset_attributes of this MediaBulkUpdate. 
        :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 MediaBulkUpdate.
        :type: list[str]
        """

        self._reset_attributes = reset_attributes

    @property
    def state_ids(self):
        """
        Array of child state IDs for which media should be retrieved.

        :return: The state_ids of this MediaBulkUpdate. 
        :rtype: list[int]
        """
        return self._state_ids

    @state_ids.setter
    def state_ids(self, state_ids):
        """
        Array of child state IDs for which media should be retrieved.

        :param state_ids: The state_ids of this MediaBulkUpdate.
        :type: list[int]
        """

        self._state_ids = state_ids

    @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 MediaBulkUpdate. 
        :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 MediaBulkUpdate.
        :type: str
        """

        self._user_elemental_id = user_elemental_id

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

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