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

"""
zypev1

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


class RedemptionCodeMetadata(object):

    """Implementation of the 'RedemptionCodeMetadata' model.

    TODO: type model description here.

    Attributes:
        id (string): TODO: type description here.
        content_title (string): TODO: type description here.
        content_type (string): TODO: type description here.
        created_at (string): TODO: type description here.
        redeemed_at (string): TODO: type description here.
        site_id (string): TODO: type description here.
        updated_at (string): TODO: type description here.
        nice_code (string): QJB5-JX5V-6JQ5
        available (string): TODO: type description here.
        redeemed (string): TODO: type description here.
        expired (string): TODO: type description here.
        code (string): TODO: type description here.
        expiration_date (string): TODO: type description here.
        video_id (string): TODO: type description here.
        pass_plan_id (string): TODO: type description here.
        plan_id (string): TODO: type description here.
        playlist_id (string): TODO: type description here.
        transaction_id (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "id": '_id',
        "content_title": 'content_title',
        "content_type": 'content_type',
        "created_at": 'created_at',
        "redeemed_at": 'redeemed_at',
        "site_id": 'site_id',
        "updated_at": 'updated_at',
        "nice_code": 'nice_code',
        "available": 'available',
        "redeemed": 'redeemed',
        "expired": 'expired',
        "code": 'code',
        "expiration_date": 'expiration_date',
        "video_id": 'video_id',
        "pass_plan_id": 'pass_plan_id',
        "plan_id": 'plan_id',
        "playlist_id": 'playlist_id',
        "transaction_id": 'transaction_id'
    }

    def __init__(self,
                 id=None,
                 content_title=None,
                 content_type=None,
                 created_at=None,
                 redeemed_at=None,
                 site_id=None,
                 updated_at=None,
                 nice_code=None,
                 available=None,
                 redeemed=None,
                 expired=None,
                 code=None,
                 expiration_date=None,
                 video_id=None,
                 pass_plan_id=None,
                 plan_id=None,
                 playlist_id=None,
                 transaction_id=None):
        """Constructor for the RedemptionCodeMetadata class"""

        # Initialize members of the class
        self.id = id
        self.content_title = content_title
        self.content_type = content_type
        self.created_at = created_at
        self.redeemed_at = redeemed_at
        self.site_id = site_id
        self.updated_at = updated_at
        self.nice_code = nice_code
        self.available = available
        self.redeemed = redeemed
        self.expired = expired
        self.code = code
        self.expiration_date = expiration_date
        self.video_id = video_id
        self.pass_plan_id = pass_plan_id
        self.plan_id = plan_id
        self.playlist_id = playlist_id
        self.transaction_id = transaction_id

    @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')
        content_title = dictionary.get('content_title')
        content_type = dictionary.get('content_type')
        created_at = dictionary.get('created_at')
        redeemed_at = dictionary.get('redeemed_at')
        site_id = dictionary.get('site_id')
        updated_at = dictionary.get('updated_at')
        nice_code = dictionary.get('nice_code')
        available = dictionary.get('available')
        redeemed = dictionary.get('redeemed')
        expired = dictionary.get('expired')
        code = dictionary.get('code')
        expiration_date = dictionary.get('expiration_date')
        video_id = dictionary.get('video_id')
        pass_plan_id = dictionary.get('pass_plan_id')
        plan_id = dictionary.get('plan_id')
        playlist_id = dictionary.get('playlist_id')
        transaction_id = dictionary.get('transaction_id')

        # Return an object of this model
        return cls(id,
                   content_title,
                   content_type,
                   created_at,
                   redeemed_at,
                   site_id,
                   updated_at,
                   nice_code,
                   available,
                   redeemed,
                   expired,
                   code,
                   expiration_date,
                   video_id,
                   pass_plan_id,
                   plan_id,
                   playlist_id,
                   transaction_id)
