# 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 ContainerComponentType(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 = {
        'id': 'str',
        'file': 'list[FileType]',
        'metadata': 'list[KeyValuePairType]',
        'rounded_time_base': 'int',
        'media_info': 'BaseMediaInfoType',
        'drop_frame': 'bool',
        'format': 'str',
        'start_timestamp': 'TimeCodeType',
        'time_code_time_base': 'TimeBaseType',
        'first_smpte_timecode': 'str',
        'sub_format': 'str',
        'duration': 'TimeCodeType',
        'start_timecode': 'int'
    }

    attribute_map = {
        'id': 'id',
        'file': 'file',
        'metadata': 'metadata',
        'rounded_time_base': 'roundedTimeBase',
        'media_info': 'mediaInfo',
        'drop_frame': 'dropFrame',
        'format': 'format',
        'start_timestamp': 'startTimestamp',
        'time_code_time_base': 'timeCodeTimeBase',
        'first_smpte_timecode': 'firstSMPTETimecode',
        'sub_format': 'subFormat',
        'duration': 'duration',
        'start_timecode': 'startTimecode'
    }

    def __init__(self, id=None, file=None, metadata=None, rounded_time_base=None, media_info=None, drop_frame=None, format=None, start_timestamp=None, time_code_time_base=None, first_smpte_timecode=None, sub_format=None, duration=None, start_timecode=None):  # noqa: E501
        """ContainerComponentType - a model defined in OpenAPI"""  # noqa: E501

        self._id = None
        self._file = None
        self._metadata = None
        self._rounded_time_base = None
        self._media_info = None
        self._drop_frame = None
        self._format = None
        self._start_timestamp = None
        self._time_code_time_base = None
        self._first_smpte_timecode = None
        self._sub_format = None
        self._duration = None
        self._start_timecode = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if file is not None:
            self.file = file
        if metadata is not None:
            self.metadata = metadata
        if rounded_time_base is not None:
            self.rounded_time_base = rounded_time_base
        if media_info is not None:
            self.media_info = media_info
        if drop_frame is not None:
            self.drop_frame = drop_frame
        if format is not None:
            self.format = format
        if start_timestamp is not None:
            self.start_timestamp = start_timestamp
        if time_code_time_base is not None:
            self.time_code_time_base = time_code_time_base
        if first_smpte_timecode is not None:
            self.first_smpte_timecode = first_smpte_timecode
        if sub_format is not None:
            self.sub_format = sub_format
        if duration is not None:
            self.duration = duration
        if start_timecode is not None:
            self.start_timecode = start_timecode

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


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

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


        :param id: The id of this ContainerComponentType.  # 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 file(self):
        """Gets the file of this ContainerComponentType.  # noqa: E501


        :return: The file of this ContainerComponentType.  # noqa: E501
        :rtype: list[FileType]
        """
        return self._file

    @file.setter
    def file(self, file):
        """Sets the file of this ContainerComponentType.


        :param file: The file of this ContainerComponentType.  # noqa: E501
        :type: list[FileType]
        """

        self._file = file

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


        :return: The metadata of this ContainerComponentType.  # noqa: E501
        :rtype: list[KeyValuePairType]
        """
        return self._metadata

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


        :param metadata: The metadata of this ContainerComponentType.  # noqa: E501
        :type: list[KeyValuePairType]
        """

        self._metadata = metadata

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


        :return: The rounded_time_base of this ContainerComponentType.  # noqa: E501
        :rtype: int
        """
        return self._rounded_time_base

    @rounded_time_base.setter
    def rounded_time_base(self, rounded_time_base):
        """Sets the rounded_time_base of this ContainerComponentType.


        :param rounded_time_base: The rounded_time_base of this ContainerComponentType.  # noqa: E501
        :type: int
        """

        self._rounded_time_base = rounded_time_base

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


        :return: The media_info of this ContainerComponentType.  # noqa: E501
        :rtype: BaseMediaInfoType
        """
        return self._media_info

    @media_info.setter
    def media_info(self, media_info):
        """Sets the media_info of this ContainerComponentType.


        :param media_info: The media_info of this ContainerComponentType.  # noqa: E501
        :type: BaseMediaInfoType
        """

        self._media_info = media_info

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


        :return: The drop_frame of this ContainerComponentType.  # noqa: E501
        :rtype: bool
        """
        return self._drop_frame

    @drop_frame.setter
    def drop_frame(self, drop_frame):
        """Sets the drop_frame of this ContainerComponentType.


        :param drop_frame: The drop_frame of this ContainerComponentType.  # noqa: E501
        :type: bool
        """

        self._drop_frame = drop_frame

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


        :return: The format of this ContainerComponentType.  # noqa: E501
        :rtype: str
        """
        return self._format

    @format.setter
    def format(self, format):
        """Sets the format of this ContainerComponentType.


        :param format: The format of this ContainerComponentType.  # noqa: E501
        :type: str
        """

        self._format = format

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


        :return: The start_timestamp of this ContainerComponentType.  # noqa: E501
        :rtype: TimeCodeType
        """
        return self._start_timestamp

    @start_timestamp.setter
    def start_timestamp(self, start_timestamp):
        """Sets the start_timestamp of this ContainerComponentType.


        :param start_timestamp: The start_timestamp of this ContainerComponentType.  # noqa: E501
        :type: TimeCodeType
        """

        self._start_timestamp = start_timestamp

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


        :return: The time_code_time_base of this ContainerComponentType.  # noqa: E501
        :rtype: TimeBaseType
        """
        return self._time_code_time_base

    @time_code_time_base.setter
    def time_code_time_base(self, time_code_time_base):
        """Sets the time_code_time_base of this ContainerComponentType.


        :param time_code_time_base: The time_code_time_base of this ContainerComponentType.  # noqa: E501
        :type: TimeBaseType
        """

        self._time_code_time_base = time_code_time_base

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


        :return: The first_smpte_timecode of this ContainerComponentType.  # noqa: E501
        :rtype: str
        """
        return self._first_smpte_timecode

    @first_smpte_timecode.setter
    def first_smpte_timecode(self, first_smpte_timecode):
        """Sets the first_smpte_timecode of this ContainerComponentType.


        :param first_smpte_timecode: The first_smpte_timecode of this ContainerComponentType.  # noqa: E501
        :type: str
        """

        self._first_smpte_timecode = first_smpte_timecode

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


        :return: The sub_format of this ContainerComponentType.  # noqa: E501
        :rtype: str
        """
        return self._sub_format

    @sub_format.setter
    def sub_format(self, sub_format):
        """Sets the sub_format of this ContainerComponentType.


        :param sub_format: The sub_format of this ContainerComponentType.  # noqa: E501
        :type: str
        """

        self._sub_format = sub_format

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


        :return: The duration of this ContainerComponentType.  # noqa: E501
        :rtype: TimeCodeType
        """
        return self._duration

    @duration.setter
    def duration(self, duration):
        """Sets the duration of this ContainerComponentType.


        :param duration: The duration of this ContainerComponentType.  # noqa: E501
        :type: TimeCodeType
        """

        self._duration = duration

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


        :return: The start_timecode of this ContainerComponentType.  # noqa: E501
        :rtype: int
        """
        return self._start_timecode

    @start_timecode.setter
    def start_timecode(self, start_timecode):
        """Sets the start_timecode of this ContainerComponentType.


        :param start_timecode: The start_timecode of this ContainerComponentType.  # noqa: E501
        :type: int
        """

        self._start_timecode = start_timecode

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

        return self.__dict__ == other.__dict__

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