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

"""
zypev1

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


class Category(object):

    """Implementation of the 'Category' model.

    TODO: type model description here.

    Attributes:
        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 = {
        "title": 'title',
        "friendly_title": 'friendly_title'
    }

    def __init__(self,
                 title=None,
                 friendly_title=None):
        """Constructor for the Category class"""

        # Initialize members of the class
        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
        title = dictionary.get('title')
        friendly_title = dictionary.get('friendly_title')

        # Return an object of this model
        return cls(title,
                   friendly_title)
