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

"""
zypev1

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


class CategoryMetadata(object):

    """Implementation of the 'CategoryMetadata' model.

    TODO: type model description here.

    Attributes:
        id (string): ID of the category assigned to the video if you are
            updating its values
        created_at (string): Timestamp category was created
        updated_at (string): Timestamp of when category was last updated
        values (list of string): List of values you wish to add to the
            category. Must exist in the main Category first
        title (string): Title of the category assigned to the video
        friendly_title (string): URL friendly title

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "id": '_id',
        "created_at": 'created_at',
        "updated_at": 'updated_at',
        "values": 'values',
        "title": 'title',
        "friendly_title": 'friendly_title'
    }

    def __init__(self,
                 id=None,
                 created_at=None,
                 updated_at=None,
                 values=None,
                 title=None,
                 friendly_title=None):
        """Constructor for the CategoryMetadata class"""

        # Initialize members of the class
        self.id = id
        self.created_at = created_at
        self.updated_at = updated_at
        self.values = values
        self.title = title
        self.friendly_title = friendly_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')
        updated_at = dictionary.get('updated_at')
        values = dictionary.get('values')
        title = dictionary.get('title')
        friendly_title = dictionary.get('friendly_title')

        # Return an object of this model
        return cls(id,
                   created_at,
                   updated_at,
                   values,
                   title,
                   friendly_title)
