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

"""
    greenbyteapi

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


class DataSignalConfiguration(object):

    """Implementation of the 'DataSignalConfiguration' model.

    Your data signal configuration. These only apply to wind devices.

    Attributes:
        availability_time_data_signal_id (int): The id of the data signal used
            for time-based availability data.
        availability_production_data_signal_id (int): The id of the data
            signal used for production-based availability data.
        lost_production_data_signal_id (int): The id of the data signal used
            for lost production data.
        performance_data_signal_id (int): The id of the data signal used for
            performance data.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "availability_time_data_signal_id":'availabilityTimeDataSignalId',
        "availability_production_data_signal_id":'availabilityProductionDataSignalId',
        "lost_production_data_signal_id":'lostProductionDataSignalId',
        "performance_data_signal_id":'performanceDataSignalId'
    }

    def __init__(self,
                 availability_time_data_signal_id=None,
                 availability_production_data_signal_id=None,
                 lost_production_data_signal_id=None,
                 performance_data_signal_id=None):
        """Constructor for the DataSignalConfiguration class"""

        # Initialize members of the class
        self.availability_time_data_signal_id = availability_time_data_signal_id
        self.availability_production_data_signal_id = availability_production_data_signal_id
        self.lost_production_data_signal_id = lost_production_data_signal_id
        self.performance_data_signal_id = performance_data_signal_id


    @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
        availability_time_data_signal_id = dictionary.get('availabilityTimeDataSignalId')
        availability_production_data_signal_id = dictionary.get('availabilityProductionDataSignalId')
        lost_production_data_signal_id = dictionary.get('lostProductionDataSignalId')
        performance_data_signal_id = dictionary.get('performanceDataSignalId')

        # Return an object of this model
        return cls(availability_time_data_signal_id,
                   availability_production_data_signal_id,
                   lost_production_data_signal_id,
                   performance_data_signal_id)


