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

"""
   wegene.Models.GenotypeModel

   This file was automatically generated by APIMATIC BETA v2.0 on 02/22/2016
"""
from wegene.APIHelper import APIHelper

class GenotypeModel(object):

    """Implementation of the 'genotype' model.

    Genotype information

    Attributes:
        gene (string): Name of the gene
        genotype (string): Genotype of the user
        genotypeid (int): Genotype Id
        mag (string): Research value of the genotype
        orientation (string): Dominance or Recessive type
        repute (string): Beneficial/Harmful for the carrier
        rsid (string): RS Id
        snpid (int): SNP Id
        summary (string): Description of the genotype impact
        tsummary (string): Description of the genotype impact in plain Chinese
            texts

    """

    def __init__(self,
                 **kwargs):
        """Constructor for the GenotypeModel class

        Args:
            **kwargs: Keyword Arguments in order to initialise the
                object. Any of the attributes in this object are able to
                be set through the **kwargs of the constructor. The values
                that can be supplied and their types are as follows::

                    gene -- string -- Sets the attribute gene
                    genotype -- string -- Sets the attribute genotype
                    genotypeid -- int -- Sets the attribute genotypeid
                    mag -- string -- Sets the attribute mag
                    orientation -- string -- Sets the attribute orientation
                    repute -- string -- Sets the attribute repute
                    rsid -- string -- Sets the attribute rsid
                    snpid -- int -- Sets the attribute snpid
                    summary -- string -- Sets the attribute summary
                    tsummary -- string -- Sets the attribute tsummary

        """
        # Set all of the parameters to their default values
        self.gene = None
        self.genotype = None
        self.genotypeid = None
        self.mag = None
        self.orientation = None
        self.repute = None
        self.rsid = None
        self.snpid = None
        self.summary = None
        self.tsummary = None

        # Create a mapping from API property names to Model property names
        replace_names = {
            "gene": "gene",
            "genotype": "genotype",
            "genotypeid": "genotypeid",
            "mag": "mag",
            "orientation": "orientation",
            "repute": "repute",
            "rsid": "rsid",
            "snpid": "snpid",
            "summary": "summary",
            "tsummary": "tsummary",
        }

        # Parse all of the Key-Value arguments
        if kwargs is not None:
            for key in kwargs:
                # Only add arguments that are actually part of this object
                if key in replace_names:
                    setattr(self, replace_names[key], kwargs[key])

    def resolve_names(self):
        """Creates a dictionary representation of this object.

        This method converts an object to a dictionary that represents the
        format that the model should be in when passed into an API Request.
        Because of this, the generated dictionary may have different
        property names to that of the model itself.

        Returns:
            dict: The dictionary representing the object.

        """
        # Create a mapping from Model property names to API property names
        replace_names = {
            "gene": "gene",
            "genotype": "genotype",
            "genotypeid": "genotypeid",
            "mag": "mag",
            "orientation": "orientation",
            "repute": "repute",
            "rsid": "rsid",
            "snpid": "snpid",
            "summary": "summary",
            "tsummary": "tsummary",
        }

        retval = dict()

        return APIHelper.resolve_names(self, replace_names, retval)
