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

"""
    greenbyteapi

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


class PowerCurveValue(object):

    """Implementation of the 'PowerCurveValue' model.

    The power at a specific wind speed according to a power curve.

    Attributes:
        wind_speed (float): Wind speed in m/s
        power (float): Power in kW

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "wind_speed":'windSpeed',
        "power":'power'
    }

    def __init__(self,
                 wind_speed=None,
                 power=None):
        """Constructor for the PowerCurveValue class"""

        # Initialize members of the class
        self.wind_speed = wind_speed
        self.power = power


    @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
        wind_speed = dictionary.get('windSpeed')
        power = dictionary.get('power')

        # Return an object of this model
        return cls(wind_speed,
                   power)


