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

"""
    healthoslib.models.request_access_token_request
 
    This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ) on 02/18/2017
"""
import healthoslib.models.base_model

class RequestAccessTokenRequest(healthoslib.models.base_model.BaseModel):

    """Implementation of the 'Request Access TokenRequest' model.

    TODO: type model description here.

    Attributes:
        grant_type (string): TODO: type description here.
        client_id (string): TODO: type description here.
        client_secret (string): TODO: type description here.
        scope (string): TODO: type description here.

    """

    def __init__(self, 
                 grant_type = None,
                 client_id = None,
                 client_secret = None,
                 scope = None):
        """Constructor for the RequestAccessTokenRequest class"""
        
        # Initialize members of the class
        self.grant_type = grant_type
        self.client_id = client_id
        self.client_secret = client_secret
        self.scope = scope

        # Create a mapping from Model property names to API property names
        self.names = {
            "grant_type" : "grant_type",
            "client_id" : "client_id",
            "client_secret" : "client_secret",
            "scope" : "scope",
        }


    @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 == None:
            return None
        else:
            # Extract variables from the dictionary
            grant_type = dictionary.get("grant_type")
            client_id = dictionary.get("client_id")
            client_secret = dictionary.get("client_secret")
            scope = dictionary.get("scope")
            # Return an object of this model
            return cls(grant_type,
                       client_id,
                       client_secret,
                       scope)


