# 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 ItemType(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 = {
        'files': 'URIListType',
        'merged_access': 'AccessControlMergedType',
        'end': 'str',
        'thumbnails': 'URIListType',
        'timespan': 'list[ItemTypeTimespan]',
        'terse': 'object',
        'access': 'list[ItemTypeAccess]',
        'start': 'str',
        'shape': 'list[ShapeType]',
        'base': 'str',
        'external_id': 'list[ExternalIdentifierType]',
        'posters': 'URIListType',
        'id': 'str',
        'metadata': 'MetadataType'
    }

    attribute_map = {
        'files': 'files',
        'merged_access': 'merged-access',
        'end': 'end',
        'thumbnails': 'thumbnails',
        'timespan': 'timespan',
        'terse': 'terse',
        'access': 'access',
        'start': 'start',
        'shape': 'shape',
        'base': 'base',
        'external_id': 'externalId',
        'posters': 'posters',
        'id': 'id',
        'metadata': 'metadata'
    }

    def __init__(self, files=None, merged_access=None, end=None, thumbnails=None, timespan=None, terse=None, access=None, start=None, shape=None, base=None, external_id=None, posters=None, id=None, metadata=None):  # noqa: E501
        """ItemType - a model defined in OpenAPI"""  # noqa: E501

        self._files = None
        self._merged_access = None
        self._end = None
        self._thumbnails = None
        self._timespan = None
        self._terse = None
        self._access = None
        self._start = None
        self._shape = None
        self._base = None
        self._external_id = None
        self._posters = None
        self._id = None
        self._metadata = None
        self.discriminator = None

        if files is not None:
            self.files = files
        if merged_access is not None:
            self.merged_access = merged_access
        if end is not None:
            self.end = end
        if thumbnails is not None:
            self.thumbnails = thumbnails
        if timespan is not None:
            self.timespan = timespan
        if terse is not None:
            self.terse = terse
        if access is not None:
            self.access = access
        if start is not None:
            self.start = start
        if shape is not None:
            self.shape = shape
        if base is not None:
            self.base = base
        if external_id is not None:
            self.external_id = external_id
        if posters is not None:
            self.posters = posters
        if id is not None:
            self.id = id
        if metadata is not None:
            self.metadata = metadata

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


        :return: The files of this ItemType.  # noqa: E501
        :rtype: URIListType
        """
        return self._files

    @files.setter
    def files(self, files):
        """Sets the files of this ItemType.


        :param files: The files of this ItemType.  # noqa: E501
        :type: URIListType
        """

        self._files = files

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


        :return: The merged_access of this ItemType.  # noqa: E501
        :rtype: AccessControlMergedType
        """
        return self._merged_access

    @merged_access.setter
    def merged_access(self, merged_access):
        """Sets the merged_access of this ItemType.


        :param merged_access: The merged_access of this ItemType.  # noqa: E501
        :type: AccessControlMergedType
        """

        self._merged_access = merged_access

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


        :return: The end of this ItemType.  # noqa: E501
        :rtype: str
        """
        return self._end

    @end.setter
    def end(self, end):
        """Sets the end of this ItemType.


        :param end: The end of this ItemType.  # noqa: E501
        :type: str
        """

        self._end = end

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


        :return: The thumbnails of this ItemType.  # noqa: E501
        :rtype: URIListType
        """
        return self._thumbnails

    @thumbnails.setter
    def thumbnails(self, thumbnails):
        """Sets the thumbnails of this ItemType.


        :param thumbnails: The thumbnails of this ItemType.  # noqa: E501
        :type: URIListType
        """

        self._thumbnails = thumbnails

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


        :return: The timespan of this ItemType.  # noqa: E501
        :rtype: list[ItemTypeTimespan]
        """
        return self._timespan

    @timespan.setter
    def timespan(self, timespan):
        """Sets the timespan of this ItemType.


        :param timespan: The timespan of this ItemType.  # noqa: E501
        :type: list[ItemTypeTimespan]
        """

        self._timespan = timespan

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


        :return: The terse of this ItemType.  # noqa: E501
        :rtype: object
        """
        return self._terse

    @terse.setter
    def terse(self, terse):
        """Sets the terse of this ItemType.


        :param terse: The terse of this ItemType.  # noqa: E501
        :type: object
        """

        self._terse = terse

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


        :return: The access of this ItemType.  # noqa: E501
        :rtype: list[ItemTypeAccess]
        """
        return self._access

    @access.setter
    def access(self, access):
        """Sets the access of this ItemType.


        :param access: The access of this ItemType.  # noqa: E501
        :type: list[ItemTypeAccess]
        """

        self._access = access

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


        :return: The start of this ItemType.  # noqa: E501
        :rtype: str
        """
        return self._start

    @start.setter
    def start(self, start):
        """Sets the start of this ItemType.


        :param start: The start of this ItemType.  # noqa: E501
        :type: str
        """

        self._start = start

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


        :return: The shape of this ItemType.  # noqa: E501
        :rtype: list[ShapeType]
        """
        return self._shape

    @shape.setter
    def shape(self, shape):
        """Sets the shape of this ItemType.


        :param shape: The shape of this ItemType.  # noqa: E501
        :type: list[ShapeType]
        """

        self._shape = shape

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


        :return: The base of this ItemType.  # noqa: E501
        :rtype: str
        """
        return self._base

    @base.setter
    def base(self, base):
        """Sets the base of this ItemType.


        :param base: The base of this ItemType.  # noqa: E501
        :type: str
        """

        self._base = base

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


        :return: The external_id of this ItemType.  # noqa: E501
        :rtype: list[ExternalIdentifierType]
        """
        return self._external_id

    @external_id.setter
    def external_id(self, external_id):
        """Sets the external_id of this ItemType.


        :param external_id: The external_id of this ItemType.  # noqa: E501
        :type: list[ExternalIdentifierType]
        """

        self._external_id = external_id

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


        :return: The posters of this ItemType.  # noqa: E501
        :rtype: URIListType
        """
        return self._posters

    @posters.setter
    def posters(self, posters):
        """Sets the posters of this ItemType.


        :param posters: The posters of this ItemType.  # noqa: E501
        :type: URIListType
        """

        self._posters = posters

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


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

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


        :param id: The id of this ItemType.  # noqa: E501
        :type: str
        """
        if id is not None and not re.search(r'([_A-Za-z]+-)?([A-Za-z_][A-Za-z0-9_]*-|(([A-Za-z_][A-Za-z0-9_]*)?\*))([0-9]{1}[0-9]{0,31})', id):  # noqa: E501
            raise ValueError(r"Invalid value for `id`, must be a follow pattern or equal to `/([_A-Za-z]+-)?([A-Za-z_][A-Za-z0-9_]*-|(([A-Za-z_][A-Za-z0-9_]*)?\*))([0-9]{1}[0-9]{0,31})/`")  # noqa: E501

        self._id = id

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


        :return: The metadata of this ItemType.  # noqa: E501
        :rtype: MetadataType
        """
        return self._metadata

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


        :param metadata: The metadata of this ItemType.  # noqa: E501
        :type: MetadataType
        """

        self._metadata = metadata

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

        return self.__dict__ == other.__dict__

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