# 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 MediaComponentType(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]',
        'number_of_packets': 'int',
        'profile': 'int',
        'item_track': 'str',
        'time_base': 'TimeBaseType',
        'level': 'int',
        'repeat_count': 'int',
        'start_timestamp': 'TimeCodeType',
        'interval': 'TimeIntervalType',
        'pid': 'int',
        'edl': 'EDLType',
        'codec': 'str',
        'extradata': 'str',
        'segment': 'int',
        'duration': 'TimeCodeType',
        'track_order': 'int',
        'essence_stream_id': 'int',
        'bitrate': 'int'
    }

    attribute_map = {
        'id': 'id',
        'file': 'file',
        'metadata': 'metadata',
        'number_of_packets': 'numberOfPackets',
        'profile': 'profile',
        'item_track': 'itemTrack',
        'time_base': 'timeBase',
        'level': 'level',
        'repeat_count': 'repeatCount',
        'start_timestamp': 'startTimestamp',
        'interval': 'interval',
        'pid': 'pid',
        'edl': 'edl',
        'codec': 'codec',
        'extradata': 'extradata',
        'segment': 'segment',
        'duration': 'duration',
        'track_order': 'trackOrder',
        'essence_stream_id': 'essenceStreamId',
        'bitrate': 'bitrate'
    }

    def __init__(self, id=None, file=None, metadata=None, number_of_packets=None, profile=None, item_track=None, time_base=None, level=None, repeat_count=None, start_timestamp=None, interval=None, pid=None, edl=None, codec=None, extradata=None, segment=None, duration=None, track_order=None, essence_stream_id=None, bitrate=None):  # noqa: E501
        """MediaComponentType - a model defined in OpenAPI"""  # noqa: E501

        self._id = None
        self._file = None
        self._metadata = None
        self._number_of_packets = None
        self._profile = None
        self._item_track = None
        self._time_base = None
        self._level = None
        self._repeat_count = None
        self._start_timestamp = None
        self._interval = None
        self._pid = None
        self._edl = None
        self._codec = None
        self._extradata = None
        self._segment = None
        self._duration = None
        self._track_order = None
        self._essence_stream_id = None
        self._bitrate = 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 number_of_packets is not None:
            self.number_of_packets = number_of_packets
        if profile is not None:
            self.profile = profile
        if item_track is not None:
            self.item_track = item_track
        if time_base is not None:
            self.time_base = time_base
        if level is not None:
            self.level = level
        if repeat_count is not None:
            self.repeat_count = repeat_count
        if start_timestamp is not None:
            self.start_timestamp = start_timestamp
        if interval is not None:
            self.interval = interval
        if pid is not None:
            self.pid = pid
        if edl is not None:
            self.edl = edl
        if codec is not None:
            self.codec = codec
        if extradata is not None:
            self.extradata = extradata
        if segment is not None:
            self.segment = segment
        if duration is not None:
            self.duration = duration
        if track_order is not None:
            self.track_order = track_order
        if essence_stream_id is not None:
            self.essence_stream_id = essence_stream_id
        if bitrate is not None:
            self.bitrate = bitrate

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


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

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


        :param id: The id of this MediaComponentType.  # 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 MediaComponentType.  # noqa: E501


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

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


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

        self._file = file

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


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

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


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

        self._metadata = metadata

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


        :return: The number_of_packets of this MediaComponentType.  # noqa: E501
        :rtype: int
        """
        return self._number_of_packets

    @number_of_packets.setter
    def number_of_packets(self, number_of_packets):
        """Sets the number_of_packets of this MediaComponentType.


        :param number_of_packets: The number_of_packets of this MediaComponentType.  # noqa: E501
        :type: int
        """

        self._number_of_packets = number_of_packets

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


        :return: The profile of this MediaComponentType.  # noqa: E501
        :rtype: int
        """
        return self._profile

    @profile.setter
    def profile(self, profile):
        """Sets the profile of this MediaComponentType.


        :param profile: The profile of this MediaComponentType.  # noqa: E501
        :type: int
        """

        self._profile = profile

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


        :return: The item_track of this MediaComponentType.  # noqa: E501
        :rtype: str
        """
        return self._item_track

    @item_track.setter
    def item_track(self, item_track):
        """Sets the item_track of this MediaComponentType.


        :param item_track: The item_track of this MediaComponentType.  # noqa: E501
        :type: str
        """

        self._item_track = item_track

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


        :return: The time_base of this MediaComponentType.  # noqa: E501
        :rtype: TimeBaseType
        """
        return self._time_base

    @time_base.setter
    def time_base(self, time_base):
        """Sets the time_base of this MediaComponentType.


        :param time_base: The time_base of this MediaComponentType.  # noqa: E501
        :type: TimeBaseType
        """

        self._time_base = time_base

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


        :return: The level of this MediaComponentType.  # noqa: E501
        :rtype: int
        """
        return self._level

    @level.setter
    def level(self, level):
        """Sets the level of this MediaComponentType.


        :param level: The level of this MediaComponentType.  # noqa: E501
        :type: int
        """

        self._level = level

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


        :return: The repeat_count of this MediaComponentType.  # noqa: E501
        :rtype: int
        """
        return self._repeat_count

    @repeat_count.setter
    def repeat_count(self, repeat_count):
        """Sets the repeat_count of this MediaComponentType.


        :param repeat_count: The repeat_count of this MediaComponentType.  # noqa: E501
        :type: int
        """

        self._repeat_count = repeat_count

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


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

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


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

        self._start_timestamp = start_timestamp

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


        :return: The interval of this MediaComponentType.  # noqa: E501
        :rtype: TimeIntervalType
        """
        return self._interval

    @interval.setter
    def interval(self, interval):
        """Sets the interval of this MediaComponentType.


        :param interval: The interval of this MediaComponentType.  # noqa: E501
        :type: TimeIntervalType
        """

        self._interval = interval

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


        :return: The pid of this MediaComponentType.  # noqa: E501
        :rtype: int
        """
        return self._pid

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


        :param pid: The pid of this MediaComponentType.  # noqa: E501
        :type: int
        """

        self._pid = pid

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


        :return: The edl of this MediaComponentType.  # noqa: E501
        :rtype: EDLType
        """
        return self._edl

    @edl.setter
    def edl(self, edl):
        """Sets the edl of this MediaComponentType.


        :param edl: The edl of this MediaComponentType.  # noqa: E501
        :type: EDLType
        """

        self._edl = edl

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


        :return: The codec of this MediaComponentType.  # noqa: E501
        :rtype: str
        """
        return self._codec

    @codec.setter
    def codec(self, codec):
        """Sets the codec of this MediaComponentType.


        :param codec: The codec of this MediaComponentType.  # noqa: E501
        :type: str
        """

        self._codec = codec

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


        :return: The extradata of this MediaComponentType.  # noqa: E501
        :rtype: str
        """
        return self._extradata

    @extradata.setter
    def extradata(self, extradata):
        """Sets the extradata of this MediaComponentType.


        :param extradata: The extradata of this MediaComponentType.  # noqa: E501
        :type: str
        """

        self._extradata = extradata

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


        :return: The segment of this MediaComponentType.  # noqa: E501
        :rtype: int
        """
        return self._segment

    @segment.setter
    def segment(self, segment):
        """Sets the segment of this MediaComponentType.


        :param segment: The segment of this MediaComponentType.  # noqa: E501
        :type: int
        """

        self._segment = segment

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


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

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


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

        self._duration = duration

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


        :return: The track_order of this MediaComponentType.  # noqa: E501
        :rtype: int
        """
        return self._track_order

    @track_order.setter
    def track_order(self, track_order):
        """Sets the track_order of this MediaComponentType.


        :param track_order: The track_order of this MediaComponentType.  # noqa: E501
        :type: int
        """

        self._track_order = track_order

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


        :return: The essence_stream_id of this MediaComponentType.  # noqa: E501
        :rtype: int
        """
        return self._essence_stream_id

    @essence_stream_id.setter
    def essence_stream_id(self, essence_stream_id):
        """Sets the essence_stream_id of this MediaComponentType.


        :param essence_stream_id: The essence_stream_id of this MediaComponentType.  # noqa: E501
        :type: int
        """

        self._essence_stream_id = essence_stream_id

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


        :return: The bitrate of this MediaComponentType.  # noqa: E501
        :rtype: int
        """
        return self._bitrate

    @bitrate.setter
    def bitrate(self, bitrate):
        """Sets the bitrate of this MediaComponentType.


        :param bitrate: The bitrate of this MediaComponentType.  # noqa: E501
        :type: int
        """

        self._bitrate = bitrate

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

        return self.__dict__ == other.__dict__

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