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

"""
    greenbyteapi

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


class TurbineType(object):

    """Implementation of the 'TurbineType' model.

    Turbine-specific type information.

    Attributes:
        turbine_type_id (int): TODO: type description here.
        title (string): TODO: type description here.
        manufacturer (string): TODO: type description here.
        model (string): TODO: type description here.
        controller (string): The model of the turbine controller.
        rated_power (int): TODO: type description here.
        max_rotor_speed (float): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "turbine_type_id":'turbineTypeId',
        "title":'title',
        "manufacturer":'manufacturer',
        "model":'model',
        "controller":'controller',
        "rated_power":'ratedPower',
        "max_rotor_speed":'maxRotorSpeed'
    }

    def __init__(self,
                 turbine_type_id=None,
                 title=None,
                 manufacturer=None,
                 model=None,
                 controller=None,
                 rated_power=None,
                 max_rotor_speed=None):
        """Constructor for the TurbineType class"""

        # Initialize members of the class
        self.turbine_type_id = turbine_type_id
        self.title = title
        self.manufacturer = manufacturer
        self.model = model
        self.controller = controller
        self.rated_power = rated_power
        self.max_rotor_speed = max_rotor_speed


    @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
        turbine_type_id = dictionary.get('turbineTypeId')
        title = dictionary.get('title')
        manufacturer = dictionary.get('manufacturer')
        model = dictionary.get('model')
        controller = dictionary.get('controller')
        rated_power = dictionary.get('ratedPower')
        max_rotor_speed = dictionary.get('maxRotorSpeed')

        # Return an object of this model
        return cls(turbine_type_id,
                   title,
                   manufacturer,
                   model,
                   controller,
                   rated_power,
                   max_rotor_speed)


