# -*- coding: utf-8 -*-

"""
zypev1

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""


class SegmentMetadata(object):

    """Implementation of the 'SegmentMetadata' model.

    TODO: type model description here.

    Attributes:
        id (string): ID of the record
        video_id (string): TODO: type description here.
        start (float): When the segment starts
        end (float): When the segment ends
        description (string): Description of segment

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "id": '_id',
        "video_id": 'video_id',
        "start": 'start',
        "end": 'end',
        "description": 'description'
    }

    def __init__(self,
                 id=None,
                 video_id=None,
                 start=None,
                 end=None,
                 description=None):
        """Constructor for the SegmentMetadata class"""

        # Initialize members of the class
        self.id = id
        self.video_id = video_id
        self.start = start
        self.end = end
        self.description = description

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Creates an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """
        if dictionary is None:
            return None

        # Extract variables from the dictionary
        id = dictionary.get('_id')
        video_id = dictionary.get('video_id')
        start = dictionary.get('start')
        end = dictionary.get('end')
        description = dictionary.get('description')

        # Return an object of this model
        return cls(id,
                   video_id,
                   start,
                   end,
                   description)
