# coding: utf-8

"""
    Seeq REST API

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

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

from pprint import pformat
from six import iteritems
import re


class CalculatedTableInputV1(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 = {
        'description': 'str',
        'group_by': 'list[str]',
        'join': 'JoinInputV1',
        'name': 'str',
        'order_by': 'list[OrderByInputV1]',
        'select_expressions': 'list[CalculatedTableColumnInputV1]',
        'source': 'str'
    }

    attribute_map = {
        'description': 'description',
        'group_by': 'groupBy',
        'join': 'join',
        'name': 'name',
        'order_by': 'orderBy',
        'select_expressions': 'selectExpressions',
        'source': 'source'
    }

    def __init__(self, description=None, group_by=None, join=None, name=None, order_by=None, select_expressions=None, source=None):
        """
        CalculatedTableInputV1 - a model defined in Swagger
        """

        self._description = None
        self._group_by = None
        self._join = None
        self._name = None
        self._order_by = None
        self._select_expressions = None
        self._source = None

        if description is not None:
          self.description = description
        if group_by is not None:
          self.group_by = group_by
        if join is not None:
          self.join = join
        if name is not None:
          self.name = name
        if order_by is not None:
          self.order_by = order_by
        if select_expressions is not None:
          self.select_expressions = select_expressions
        if source is not None:
          self.source = source

    @property
    def description(self):
        """
        Gets the description of this CalculatedTableInputV1.
        Description for the calculated table

        :return: The description of this CalculatedTableInputV1.
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """
        Sets the description of this CalculatedTableInputV1.
        Description for the calculated table

        :param description: The description of this CalculatedTableInputV1.
        :type: str
        """

        self._description = description

    @property
    def group_by(self):
        """
        Gets the group_by of this CalculatedTableInputV1.
        Group by for the query

        :return: The group_by of this CalculatedTableInputV1.
        :rtype: list[str]
        """
        return self._group_by

    @group_by.setter
    def group_by(self, group_by):
        """
        Sets the group_by of this CalculatedTableInputV1.
        Group by for the query

        :param group_by: The group_by of this CalculatedTableInputV1.
        :type: list[str]
        """

        self._group_by = group_by

    @property
    def join(self):
        """
        Gets the join of this CalculatedTableInputV1.

        :return: The join of this CalculatedTableInputV1.
        :rtype: JoinInputV1
        """
        return self._join

    @join.setter
    def join(self, join):
        """
        Sets the join of this CalculatedTableInputV1.

        :param join: The join of this CalculatedTableInputV1.
        :type: JoinInputV1
        """

        self._join = join

    @property
    def name(self):
        """
        Gets the name of this CalculatedTableInputV1.
        The name of the Calculated Table

        :return: The name of this CalculatedTableInputV1.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this CalculatedTableInputV1.
        The name of the Calculated Table

        :param name: The name of this CalculatedTableInputV1.
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")

        self._name = name

    @property
    def order_by(self):
        """
        Gets the order_by of this CalculatedTableInputV1.
        Order by for the query

        :return: The order_by of this CalculatedTableInputV1.
        :rtype: list[OrderByInputV1]
        """
        return self._order_by

    @order_by.setter
    def order_by(self, order_by):
        """
        Sets the order_by of this CalculatedTableInputV1.
        Order by for the query

        :param order_by: The order_by of this CalculatedTableInputV1.
        :type: list[OrderByInputV1]
        """

        self._order_by = order_by

    @property
    def select_expressions(self):
        """
        Gets the select_expressions of this CalculatedTableInputV1.
        List of sql expressions corresponding to columns of a calculated table

        :return: The select_expressions of this CalculatedTableInputV1.
        :rtype: list[CalculatedTableColumnInputV1]
        """
        return self._select_expressions

    @select_expressions.setter
    def select_expressions(self, select_expressions):
        """
        Sets the select_expressions of this CalculatedTableInputV1.
        List of sql expressions corresponding to columns of a calculated table

        :param select_expressions: The select_expressions of this CalculatedTableInputV1.
        :type: list[CalculatedTableColumnInputV1]
        """
        if select_expressions is None:
            raise ValueError("Invalid value for `select_expressions`, must not be `None`")

        self._select_expressions = select_expressions

    @property
    def source(self):
        """
        Gets the source of this CalculatedTableInputV1.
        The source table that the calculated table is based on

        :return: The source of this CalculatedTableInputV1.
        :rtype: str
        """
        return self._source

    @source.setter
    def source(self, source):
        """
        Sets the source of this CalculatedTableInputV1.
        The source table that the calculated table is based on

        :param source: The source of this CalculatedTableInputV1.
        :type: str
        """
        if source is None:
            raise ValueError("Invalid value for `source`, must not be `None`")

        self._source = source

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

        for attr, _ in 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 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, CalculatedTableInputV1):
            return False

        return self.__dict__ == other.__dict__

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