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

"""
zypev1

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""
from zypev1.models.picture_metadata import PictureMetadata


class ZobjectMetadata(object):

    """Implementation of the 'ZobjectMetadata' model.

    TODO: type model description here.

    Attributes:
        id (string): TODO: type description here.
        created_at (string): TODO: type description here.
        site_id (string): TODO: type description here.
        updated_at (string): TODO: type description here.
        video_ids (list of string): TODO: type description here.
        zobject_type_id (string): TODO: type description here.
        pictures (list of PictureMetadata): TODO: type description here.
        title (string): TODO: type description here.
        description (string): TODO: type description here.
        friendly_title (string): mckellen
        keywords (list of string): TODO: type description here.
        active (string): TODO: type description here.
        zobject_type_title (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "id": '_id',
        "created_at": 'created_at',
        "site_id": 'site_id',
        "updated_at": 'updated_at',
        "video_ids": 'video_ids',
        "zobject_type_id": 'zobject_type_id',
        "pictures": 'pictures',
        "title": 'title',
        "description": 'description',
        "friendly_title": 'friendly_title',
        "keywords": 'keywords',
        "active": 'active',
        "zobject_type_title": 'zobject_type_title'
    }

    def __init__(self,
                 id=None,
                 created_at=None,
                 site_id=None,
                 updated_at=None,
                 video_ids=None,
                 zobject_type_id=None,
                 pictures=None,
                 title=None,
                 description=None,
                 friendly_title=None,
                 keywords=None,
                 active=None,
                 zobject_type_title=None):
        """Constructor for the ZobjectMetadata class"""

        # Initialize members of the class
        self.id = id
        self.created_at = created_at
        self.site_id = site_id
        self.updated_at = updated_at
        self.video_ids = video_ids
        self.zobject_type_id = zobject_type_id
        self.pictures = pictures
        self.title = title
        self.description = description
        self.friendly_title = friendly_title
        self.keywords = keywords
        self.active = active
        self.zobject_type_title = zobject_type_title

    @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')
        created_at = dictionary.get('created_at')
        site_id = dictionary.get('site_id')
        updated_at = dictionary.get('updated_at')
        video_ids = dictionary.get('video_ids')
        zobject_type_id = dictionary.get('zobject_type_id')
        pictures = None
        if dictionary.get('pictures') is not None:
            pictures = [PictureMetadata.from_dictionary(x) for x in dictionary.get('pictures')]
        title = dictionary.get('title')
        description = dictionary.get('description')
        friendly_title = dictionary.get('friendly_title')
        keywords = dictionary.get('keywords')
        active = dictionary.get('active')
        zobject_type_title = dictionary.get('zobject_type_title')

        # Return an object of this model
        return cls(id,
                   created_at,
                   site_id,
                   updated_at,
                   video_ids,
                   zobject_type_id,
                   pictures,
                   title,
                   description,
                   friendly_title,
                   keywords,
                   active,
                   zobject_type_title)
