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

"""
ctddocumentation

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""
from ctddocumentation.api_helper import APIHelper


class IndicatorInfo(object):

    """Implementation of the 'IndicatorInfo' model.

    TODO: type model description here.

    Attributes:
        id (int): TODO: type description here.
        points (int): TODO: type description here.
        site_id (int): TODO: type description here.
        mtype (int): TODO: type description here.
        description (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "id": 'id',
        "points": 'points',
        "site_id": 'site_id',
        "mtype": 'type',
        "description": 'description'
    }

    _optionals = [
        'id',
        'points',
        'site_id',
        'mtype',
        'description',
    ]

    def __init__(self,
                 id=APIHelper.SKIP,
                 points=APIHelper.SKIP,
                 site_id=APIHelper.SKIP,
                 mtype=APIHelper.SKIP,
                 description=APIHelper.SKIP):
        """Constructor for the IndicatorInfo class"""

        # Initialize members of the class
        if id is not APIHelper.SKIP:
            self.id = id 
        if points is not APIHelper.SKIP:
            self.points = points 
        if site_id is not APIHelper.SKIP:
            self.site_id = site_id 
        if mtype is not APIHelper.SKIP:
            self.mtype = mtype 
        if description is not APIHelper.SKIP:
            self.description = description 

    @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") if dictionary.get("id") else APIHelper.SKIP
        points = dictionary.get("points") if dictionary.get("points") else APIHelper.SKIP
        site_id = dictionary.get("site_id") if dictionary.get("site_id") else APIHelper.SKIP
        mtype = dictionary.get("type") if dictionary.get("type") else APIHelper.SKIP
        description = dictionary.get("description") if dictionary.get("description") else APIHelper.SKIP
        # Return an object of this model
        return cls(id,
                   points,
                   site_id,
                   mtype,
                   description)
