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

"""
    opentelematicsapi

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

import opentelematicsapi.models.vehicle_fault_code_event

class FollowFleetFaultCodeEventsResponse(object):

    """Implementation of the 'Follow Fleet Fault Code Events response' model.

    TODO: type model description here.

    Attributes:
        token (string): a since-token, pass-in the token previously returned
            by GET of `feed` to 'follow' new Log Events
        feed (list of VehicleFaultCodeEvent): the 'feed' of Log Events

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "token":'token',
        "feed":'feed'
    }

    def __init__(self,
                 token=None,
                 feed=None):
        """Constructor for the FollowFleetFaultCodeEventsResponse class"""

        # Initialize members of the class
        self.token = token
        self.feed = feed


    @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
        token = dictionary.get('token')
        feed = None
        if dictionary.get('feed') != None:
            feed = list()
            for structure in dictionary.get('feed'):
                feed.append(opentelematicsapi.models.vehicle_fault_code_event.VehicleFaultCodeEvent.from_dictionary(structure))

        # Return an object of this model
        return cls(token,
                   feed)



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

"""
    opentelematicsapi

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

import opentelematicsapi.models.vehicle_fault_code_event

class FollowFleetFaultCodeEventsResponse(object):

    """Implementation of the 'Follow Fleet Fault Code Events response' model.

    TODO: type model description here.

    Attributes:
        token (string): a since-token, pass-in the token previously returned
            by GET of `feed` to 'follow' new Log Events
        feed (list of VehicleFaultCodeEvent): the 'feed' of Log Events

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "token":'token',
        "feed":'feed'
    }

    def __init__(self,
                 token=None,
                 feed=None):
        """Constructor for the FollowFleetFaultCodeEventsResponse class"""

        # Initialize members of the class
        self.token = token
        self.feed = feed


    @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
        token = dictionary.get('token')
        feed = None
        if dictionary.get('feed') != None:
            feed = list()
            for structure in dictionary.get('feed'):
                feed.append(opentelematicsapi.models.vehicle_fault_code_event.VehicleFaultCodeEvent.from_dictionary(structure))

        # Return an object of this model
        return cls(token,
                   feed)



# -*- coding: utf-8 -*- opentelematicsapi      This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). Implementation of the 'Follow Fleet Fault Code Events response' model.      TODO: type model description here.      Attributes:         token (string): a since-token, pass-in the token previously returned             by GET of `feed` to 'follow' new Log Events         feed (list of VehicleFaultCodeEvent): the 'feed' of Log Events # Create a mapping from Model property names to API property names Constructor for the FollowFleetFaultCodeEventsResponse class # Initialize members of the class 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. # Extract variables from the dictionary # Return an object of this model