# coding: utf-8

"""
    PubMan REST API

    This is an automatically generated REST API client for PubMan.  # noqa: E501

    OpenAPI spec version: 1.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class FileDbVO(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 = {
        'allowed_audience_ids': 'list[str]',
        'checksum': 'str',
        'checksum_algorithm': 'str',
        'content': 'str',
        'creation_date': 'datetime',
        'creator': 'AccountUserDbRO',
        'last_modification_date': 'datetime',
        'metadata': 'MdsFileVO',
        'mime_type': 'str',
        'modifier': 'AccountUserDbRO',
        'name': 'str',
        'object_id': 'str',
        'pid': 'str',
        'size': 'int',
        'storage': 'str',
        'visibility': 'str'
    }

    attribute_map = {
        'allowed_audience_ids': 'allowedAudienceIds',
        'checksum': 'checksum',
        'checksum_algorithm': 'checksumAlgorithm',
        'content': 'content',
        'creation_date': 'creationDate',
        'creator': 'creator',
        'last_modification_date': 'lastModificationDate',
        'metadata': 'metadata',
        'mime_type': 'mimeType',
        'modifier': 'modifier',
        'name': 'name',
        'object_id': 'objectId',
        'pid': 'pid',
        'size': 'size',
        'storage': 'storage',
        'visibility': 'visibility'
    }

    def __init__(self, allowed_audience_ids=None, checksum=None, checksum_algorithm=None, content=None, creation_date=None, creator=None, last_modification_date=None, metadata=None, mime_type=None, modifier=None, name=None, object_id=None, pid=None, size=None, storage=None, visibility=None):  # noqa: E501
        """FileDbVO - a model defined in Swagger"""  # noqa: E501

        self._allowed_audience_ids = None
        self._checksum = None
        self._checksum_algorithm = None
        self._content = None
        self._creation_date = None
        self._creator = None
        self._last_modification_date = None
        self._metadata = None
        self._mime_type = None
        self._modifier = None
        self._name = None
        self._object_id = None
        self._pid = None
        self._size = None
        self._storage = None
        self._visibility = None
        self.discriminator = None

        if allowed_audience_ids is not None:
            self.allowed_audience_ids = allowed_audience_ids
        if checksum is not None:
            self.checksum = checksum
        if checksum_algorithm is not None:
            self.checksum_algorithm = checksum_algorithm
        if content is not None:
            self.content = content
        if creation_date is not None:
            self.creation_date = creation_date
        if creator is not None:
            self.creator = creator
        if last_modification_date is not None:
            self.last_modification_date = last_modification_date
        if metadata is not None:
            self.metadata = metadata
        if mime_type is not None:
            self.mime_type = mime_type
        if modifier is not None:
            self.modifier = modifier
        if name is not None:
            self.name = name
        if object_id is not None:
            self.object_id = object_id
        if pid is not None:
            self.pid = pid
        if size is not None:
            self.size = size
        if storage is not None:
            self.storage = storage
        if visibility is not None:
            self.visibility = visibility

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


        :return: The allowed_audience_ids of this FileDbVO.  # noqa: E501
        :rtype: list[str]
        """
        return self._allowed_audience_ids

    @allowed_audience_ids.setter
    def allowed_audience_ids(self, allowed_audience_ids):
        """Sets the allowed_audience_ids of this FileDbVO.


        :param allowed_audience_ids: The allowed_audience_ids of this FileDbVO.  # noqa: E501
        :type: list[str]
        """

        self._allowed_audience_ids = allowed_audience_ids

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


        :return: The checksum of this FileDbVO.  # noqa: E501
        :rtype: str
        """
        return self._checksum

    @checksum.setter
    def checksum(self, checksum):
        """Sets the checksum of this FileDbVO.


        :param checksum: The checksum of this FileDbVO.  # noqa: E501
        :type: str
        """

        self._checksum = checksum

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


        :return: The checksum_algorithm of this FileDbVO.  # noqa: E501
        :rtype: str
        """
        return self._checksum_algorithm

    @checksum_algorithm.setter
    def checksum_algorithm(self, checksum_algorithm):
        """Sets the checksum_algorithm of this FileDbVO.


        :param checksum_algorithm: The checksum_algorithm of this FileDbVO.  # noqa: E501
        :type: str
        """
        allowed_values = ["MD5"]  # noqa: E501
        if checksum_algorithm not in allowed_values:
            raise ValueError(
                "Invalid value for `checksum_algorithm` ({0}), must be one of {1}"  # noqa: E501
                .format(checksum_algorithm, allowed_values)
            )

        self._checksum_algorithm = checksum_algorithm

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


        :return: The content of this FileDbVO.  # noqa: E501
        :rtype: str
        """
        return self._content

    @content.setter
    def content(self, content):
        """Sets the content of this FileDbVO.


        :param content: The content of this FileDbVO.  # noqa: E501
        :type: str
        """

        self._content = content

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


        :return: The creation_date of this FileDbVO.  # noqa: E501
        :rtype: datetime
        """
        return self._creation_date

    @creation_date.setter
    def creation_date(self, creation_date):
        """Sets the creation_date of this FileDbVO.


        :param creation_date: The creation_date of this FileDbVO.  # noqa: E501
        :type: datetime
        """

        self._creation_date = creation_date

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


        :return: The creator of this FileDbVO.  # noqa: E501
        :rtype: AccountUserDbRO
        """
        return self._creator

    @creator.setter
    def creator(self, creator):
        """Sets the creator of this FileDbVO.


        :param creator: The creator of this FileDbVO.  # noqa: E501
        :type: AccountUserDbRO
        """

        self._creator = creator

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


        :return: The last_modification_date of this FileDbVO.  # noqa: E501
        :rtype: datetime
        """
        return self._last_modification_date

    @last_modification_date.setter
    def last_modification_date(self, last_modification_date):
        """Sets the last_modification_date of this FileDbVO.


        :param last_modification_date: The last_modification_date of this FileDbVO.  # noqa: E501
        :type: datetime
        """

        self._last_modification_date = last_modification_date

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


        :return: The metadata of this FileDbVO.  # noqa: E501
        :rtype: MdsFileVO
        """
        return self._metadata

    @metadata.setter
    def metadata(self, metadata):
        """Sets the metadata of this FileDbVO.


        :param metadata: The metadata of this FileDbVO.  # noqa: E501
        :type: MdsFileVO
        """

        self._metadata = metadata

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


        :return: The mime_type of this FileDbVO.  # noqa: E501
        :rtype: str
        """
        return self._mime_type

    @mime_type.setter
    def mime_type(self, mime_type):
        """Sets the mime_type of this FileDbVO.


        :param mime_type: The mime_type of this FileDbVO.  # noqa: E501
        :type: str
        """

        self._mime_type = mime_type

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


        :return: The modifier of this FileDbVO.  # noqa: E501
        :rtype: AccountUserDbRO
        """
        return self._modifier

    @modifier.setter
    def modifier(self, modifier):
        """Sets the modifier of this FileDbVO.


        :param modifier: The modifier of this FileDbVO.  # noqa: E501
        :type: AccountUserDbRO
        """

        self._modifier = modifier

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


        :return: The name of this FileDbVO.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this FileDbVO.


        :param name: The name of this FileDbVO.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The object_id of this FileDbVO.  # noqa: E501
        :rtype: str
        """
        return self._object_id

    @object_id.setter
    def object_id(self, object_id):
        """Sets the object_id of this FileDbVO.


        :param object_id: The object_id of this FileDbVO.  # noqa: E501
        :type: str
        """

        self._object_id = object_id

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


        :return: The pid of this FileDbVO.  # noqa: E501
        :rtype: str
        """
        return self._pid

    @pid.setter
    def pid(self, pid):
        """Sets the pid of this FileDbVO.


        :param pid: The pid of this FileDbVO.  # noqa: E501
        :type: str
        """

        self._pid = pid

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


        :return: The size of this FileDbVO.  # noqa: E501
        :rtype: int
        """
        return self._size

    @size.setter
    def size(self, size):
        """Sets the size of this FileDbVO.


        :param size: The size of this FileDbVO.  # noqa: E501
        :type: int
        """

        self._size = size

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


        :return: The storage of this FileDbVO.  # noqa: E501
        :rtype: str
        """
        return self._storage

    @storage.setter
    def storage(self, storage):
        """Sets the storage of this FileDbVO.


        :param storage: The storage of this FileDbVO.  # noqa: E501
        :type: str
        """
        allowed_values = ["INTERNAL_MANAGED", "EXTERNAL_URL"]  # noqa: E501
        if storage not in allowed_values:
            raise ValueError(
                "Invalid value for `storage` ({0}), must be one of {1}"  # noqa: E501
                .format(storage, allowed_values)
            )

        self._storage = storage

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


        :return: The visibility of this FileDbVO.  # noqa: E501
        :rtype: str
        """
        return self._visibility

    @visibility.setter
    def visibility(self, visibility):
        """Sets the visibility of this FileDbVO.


        :param visibility: The visibility of this FileDbVO.  # noqa: E501
        :type: str
        """
        allowed_values = ["PUBLIC", "PRIVATE", "AUDIENCE"]  # noqa: E501
        if visibility not in allowed_values:
            raise ValueError(
                "Invalid value for `visibility` ({0}), must be one of {1}"  # noqa: E501
                .format(visibility, allowed_values)
            )

        self._visibility = visibility

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

        return self.__dict__ == other.__dict__

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