# coding: utf-8

"""
    Vidispine API

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

    The version of the OpenAPI document: 5.x
    Contact: info@vidispine.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six
from . import *

class CollectionContentType(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    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 = {
        'add_items': 'bool',
        'after': 'str',
        'uri': 'str',
        'mode': 'str',
        'metadata': 'SimpleMetadataType',
        'type': 'str',
        'id': 'str',
        'before': 'str'
    }

    attribute_map = {
        'add_items': 'addItems',
        'after': 'after',
        'uri': 'uri',
        'mode': 'mode',
        'metadata': 'metadata',
        'type': 'type',
        'id': 'id',
        'before': 'before'
    }

    def __init__(self, add_items=None, after=None, uri=None, mode=None, metadata=None, type=None, id=None, before=None):  # noqa: E501
        """CollectionContentType - a model defined in OpenAPI"""  # noqa: E501

        self._add_items = None
        self._after = None
        self._uri = None
        self._mode = None
        self._metadata = None
        self._type = None
        self._id = None
        self._before = None
        self.discriminator = None

        if add_items is not None:
            self.add_items = add_items
        if after is not None:
            self.after = after
        if uri is not None:
            self.uri = uri
        if mode is not None:
            self.mode = mode
        if metadata is not None:
            self.metadata = metadata
        if type is not None:
            self.type = type
        if id is not None:
            self.id = id
        if before is not None:
            self.before = before

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


        :return: The add_items of this CollectionContentType.  # noqa: E501
        :rtype: bool
        """
        return self._add_items

    @add_items.setter
    def add_items(self, add_items):
        """Sets the add_items of this CollectionContentType.


        :param add_items: The add_items of this CollectionContentType.  # noqa: E501
        :type: bool
        """

        self._add_items = add_items

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


        :return: The after of this CollectionContentType.  # noqa: E501
        :rtype: str
        """
        return self._after

    @after.setter
    def after(self, after):
        """Sets the after of this CollectionContentType.


        :param after: The after of this CollectionContentType.  # noqa: E501
        :type: str
        """

        self._after = after

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


        :return: The uri of this CollectionContentType.  # noqa: E501
        :rtype: str
        """
        return self._uri

    @uri.setter
    def uri(self, uri):
        """Sets the uri of this CollectionContentType.


        :param uri: The uri of this CollectionContentType.  # noqa: E501
        :type: str
        """

        self._uri = uri

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


        :return: The mode of this CollectionContentType.  # noqa: E501
        :rtype: str
        """
        return self._mode

    @mode.setter
    def mode(self, mode):
        """Sets the mode of this CollectionContentType.


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

        self._mode = mode

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


        :return: The metadata of this CollectionContentType.  # noqa: E501
        :rtype: SimpleMetadataType
        """
        return self._metadata

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


        :param metadata: The metadata of this CollectionContentType.  # noqa: E501
        :type: SimpleMetadataType
        """

        self._metadata = metadata

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


        :return: The type of this CollectionContentType.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this CollectionContentType.


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

        self._type = type

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


        :return: The id of this CollectionContentType.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this CollectionContentType.


        :param id: The id of this CollectionContentType.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The before of this CollectionContentType.  # noqa: E501
        :rtype: str
        """
        return self._before

    @before.setter
    def before(self, before):
        """Sets the before of this CollectionContentType.


        :param before: The before of this CollectionContentType.  # noqa: E501
        :type: str
        """

        self._before = before

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

        return self.__dict__ == other.__dict__

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