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

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

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

    """Implementation of the 'LabTestData' model.

    TODO: type model description here.

    Attributes:
        ordering_information (string): TODO: type description here.
        alternate_names (string): TODO: type description here.
        laboratory (string): TODO: type description here.
        test_code (string): TODO: type description here.
        specimen_types (string): TODO: type description here.
        container_types (string): TODO: type description here.
        minimum_adult_volume (string): TODO: type description here.
        frequency (string): TODO: type description here.
        external_laboratory (string): TODO: type description here.

    """

    def __init__(self, 
                 ordering_information = None,
                 alternate_names = None,
                 laboratory = None,
                 test_code = None,
                 specimen_types = None,
                 container_types = None,
                 minimum_adult_volume = None,
                 frequency = None,
                 external_laboratory = None):
        """Constructor for the LabTestData class"""
        
        # Initialize members of the class
        self.ordering_information = ordering_information
        self.alternate_names = alternate_names
        self.laboratory = laboratory
        self.test_code = test_code
        self.specimen_types = specimen_types
        self.container_types = container_types
        self.minimum_adult_volume = minimum_adult_volume
        self.frequency = frequency
        self.external_laboratory = external_laboratory

        # Create a mapping from Model property names to API property names
        self.names = {
            "ordering_information" : "Ordering information",
            "alternate_names" : "Alternate names",
            "laboratory" : "Laboratory",
            "test_code" : "Test Code",
            "specimen_types" : "Specimen types",
            "container_types" : "Container types",
            "minimum_adult_volume" : "Minimum Adult Volume",
            "frequency" : "Frequency",
            "external_laboratory" : "External Laboratory",
        }


    @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
            ordering_information = dictionary.get("Ordering information")
            alternate_names = dictionary.get("Alternate names")
            laboratory = dictionary.get("Laboratory")
            test_code = dictionary.get("Test Code")
            specimen_types = dictionary.get("Specimen types")
            container_types = dictionary.get("Container types")
            minimum_adult_volume = dictionary.get("Minimum Adult Volume")
            frequency = dictionary.get("Frequency")
            external_laboratory = dictionary.get("External Laboratory")
            # Return an object of this model
            return cls(ordering_information,
                       alternate_names,
                       laboratory,
                       test_code,
                       specimen_types,
                       container_types,
                       minimum_adult_volume,
                       frequency,
                       external_laboratory)


