# coding: utf-8

"""
    BlackFox

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: v1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from blackfox.models.range import Range  # noqa: F401,E501


class InputWindowRangeConfig(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'window': 'Range',
        'shift': 'Range',
        'step': 'Range',
        'aggregation_types': 'list[str]'
    }

    attribute_map = {
        'window': 'window',
        'shift': 'shift',
        'step': 'step',
        'aggregation_types': 'aggregationTypes'
    }

    def __init__(self, window=None, shift=None, step=None, aggregation_types=['Avg', 'Sum', 'None']):  # noqa: E501
        """InputWindowRangeConfig - a model defined in Swagger"""  # noqa: E501

        self._window = None
        self._shift = None
        self._step = None
        self._aggregation_types = None
        self.discriminator = None

        if window is not None:
            self.window = window
        if shift is not None:
            self.shift = shift
        if step is not None:
            self.step = step
        if aggregation_types is not None:
            self.aggregation_types = aggregation_types

    @property
    def window(self):
        """Gets the window of this InputWindowRangeConfig.  # noqa: E501


        :return: The window of this InputWindowRangeConfig.  # noqa: E501
        :rtype: Range
        """
        return self._window

    @window.setter
    def window(self, window):
        """Sets the window of this InputWindowRangeConfig.


        :param window: The window of this InputWindowRangeConfig.  # noqa: E501
        :type: Range
        """

        self._window = window

    @property
    def shift(self):
        """Gets the shift of this InputWindowRangeConfig.  # noqa: E501


        :return: The shift of this InputWindowRangeConfig.  # noqa: E501
        :rtype: Range
        """
        return self._shift

    @shift.setter
    def shift(self, shift):
        """Sets the shift of this InputWindowRangeConfig.


        :param shift: The shift of this InputWindowRangeConfig.  # noqa: E501
        :type: Range
        """

        self._shift = shift

    @property
    def step(self):
        """Gets the step of this InputWindowRangeConfig.  # noqa: E501


        :return: The step of this InputWindowRangeConfig.  # noqa: E501
        :rtype: Range
        """
        return self._step

    @step.setter
    def step(self, step):
        """Sets the step of this InputWindowRangeConfig.


        :param step: The step of this InputWindowRangeConfig.  # noqa: E501
        :type: Range
        """

        self._step = step

    @property
    def aggregation_types(self):
        """Gets the aggregation_types of this InputWindowRangeConfig.  # noqa: E501


        :return: The aggregation_types of this InputWindowRangeConfig.  # noqa: E501
        :rtype: list[str]
        """
        return self._aggregation_types

    @aggregation_types.setter
    def aggregation_types(self, aggregation_types):
        """Sets the aggregation_types of this InputWindowRangeConfig.


        :param aggregation_types: The aggregation_types of this InputWindowRangeConfig.  # noqa: E501
        :type: list[str]
        """
        allowed_values = ["Avg", "Sum", "None"]  # noqa: E501
        if not set(aggregation_types).issubset(set(allowed_values)):
            raise ValueError(
                "Invalid values for `aggregation_types` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(aggregation_types) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._aggregation_types = aggregation_types

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, InputWindowRangeConfig):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
