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

"""
zypev1

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


class PictureMetadata(object):

    """Implementation of the 'PictureMetadata' model.

    TODO: type model description here.

    Attributes:
        id (string): TODO: type description here.
        styles (Styles): TODO: type description here.
        content_type (string): TODO: type description here.
        updated_at (string): TODO: type description here.
        url (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "id": '_id',
        "styles": 'styles',
        "content_type": 'content_type',
        "updated_at": 'updated_at',
        "url": 'url'
    }

    def __init__(self,
                 id=None,
                 styles=None,
                 content_type=None,
                 updated_at=None,
                 url=None):
        """Constructor for the PictureMetadata class"""

        # Initialize members of the class
        self.id = id
        self.styles = styles
        self.content_type = content_type
        self.updated_at = updated_at
        self.url = url

    @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')
        styles = Styles.from_dictionary(dictionary.get('styles')) if dictionary.get('styles') else None
        content_type = dictionary.get('content_type')
        updated_at = dictionary.get('updated_at')
        url = dictionary.get('url')

        # Return an object of this model
        return cls(id,
                   styles,
                   content_type,
                   updated_at,
                   url)
