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

"""
zypev1

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


class DevicePin(object):

    """Implementation of the 'DevicePin' model.

    TODO: type model description here.

    Attributes:
        id (string): TODO: type description here.
        consumer_id (string): TODO: type description here.
        created_at (string): TODO: type description here.
        deleted_at (string): TODO: type description here.
        linked_device_id (string): TODO: type description here.
        pin (string): TODO: type description here.
        pin_expiration (string): 02-13T07:27:00.113-05:00
        updated_at (string): TODO: type description here.
        linked_true (bool): TODO: type description here.
        subscription_count (float): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "id": '_id',
        "consumer_id": 'consumer_id',
        "created_at": 'created_at',
        "deleted_at": 'deleted_at',
        "linked_device_id": 'linked_device_id',
        "pin": 'pin',
        "pin_expiration": 'pin_expiration',
        "updated_at": 'updated_at',
        "linked_true": 'linked true',
        "subscription_count": 'subscription_count'
    }

    def __init__(self,
                 id=None,
                 consumer_id=None,
                 created_at=None,
                 deleted_at=None,
                 linked_device_id=None,
                 pin=None,
                 pin_expiration=None,
                 updated_at=None,
                 linked_true=None,
                 subscription_count=None):
        """Constructor for the DevicePin class"""

        # Initialize members of the class
        self.id = id
        self.consumer_id = consumer_id
        self.created_at = created_at
        self.deleted_at = deleted_at
        self.linked_device_id = linked_device_id
        self.pin = pin
        self.pin_expiration = pin_expiration
        self.updated_at = updated_at
        self.linked_true = linked_true
        self.subscription_count = subscription_count

    @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')
        consumer_id = dictionary.get('consumer_id')
        created_at = dictionary.get('created_at')
        deleted_at = dictionary.get('deleted_at')
        linked_device_id = dictionary.get('linked_device_id')
        pin = dictionary.get('pin')
        pin_expiration = dictionary.get('pin_expiration')
        updated_at = dictionary.get('updated_at')
        linked_true = dictionary.get('linked true')
        subscription_count = dictionary.get('subscription_count')

        # Return an object of this model
        return cls(id,
                   consumer_id,
                   created_at,
                   deleted_at,
                   linked_device_id,
                   pin,
                   pin_expiration,
                   updated_at,
                   linked_true,
                   subscription_count)
