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

"""
    greenbyteapi

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


class Component(object):

    """Implementation of the 'Component' model.

    The status component categorization.

    Attributes:
        component_id (string): TODO: type description here.
        component_name (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "component_id":'componentId',
        "component_name":'componentName'
    }

    def __init__(self,
                 component_id=None,
                 component_name=None):
        """Constructor for the Component class"""

        # Initialize members of the class
        self.component_id = component_id
        self.component_name = component_name


    @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
        component_id = dictionary.get('componentId')
        component_name = dictionary.get('componentName')

        # Return an object of this model
        return cls(component_id,
                   component_name)


