# 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 TableDataQueryInputV1(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 = {
        'columns_to_include': 'list[str]',
        'condition_monitor_id': 'str',
        'cursor': 'Cursor',
        'filter': 'Filter',
        'group_by': 'GroupBy',
        'include_overrides': 'bool',
        'limit': 'int',
        'properties_to_include': 'list[PropertiesForItemUUIDColumn]',
        'sorts': 'list[Sort]',
        'table_formulas': 'list[TableFormula]',
        'tables_to_join': 'list[TableJoinInput]',
        'use_distinct': 'bool',
        'virtual_columns': 'VirtualColumns'
    }

    attribute_map = {
        'columns_to_include': 'columnsToInclude',
        'condition_monitor_id': 'conditionMonitorId',
        'cursor': 'cursor',
        'filter': 'filter',
        'group_by': 'groupBy',
        'include_overrides': 'includeOverrides',
        'limit': 'limit',
        'properties_to_include': 'propertiesToInclude',
        'sorts': 'sorts',
        'table_formulas': 'tableFormulas',
        'tables_to_join': 'tablesToJoin',
        'use_distinct': 'useDistinct',
        'virtual_columns': 'virtualColumns'
    }

    def __init__(self, columns_to_include=None, condition_monitor_id=None, cursor=None, filter=None, group_by=None, include_overrides=None, limit=None, properties_to_include=None, sorts=None, table_formulas=None, tables_to_join=None, use_distinct=None, virtual_columns=None):
        """
        TableDataQueryInputV1 - a model defined in Swagger
        """

        self._columns_to_include = None
        self._condition_monitor_id = None
        self._cursor = None
        self._filter = None
        self._group_by = None
        self._include_overrides = None
        self._limit = None
        self._properties_to_include = None
        self._sorts = None
        self._table_formulas = None
        self._tables_to_join = None
        self._use_distinct = None
        self._virtual_columns = None

        if columns_to_include is not None:
          self.columns_to_include = columns_to_include
        if condition_monitor_id is not None:
          self.condition_monitor_id = condition_monitor_id
        if cursor is not None:
          self.cursor = cursor
        if filter is not None:
          self.filter = filter
        if group_by is not None:
          self.group_by = group_by
        if include_overrides is not None:
          self.include_overrides = include_overrides
        if limit is not None:
          self.limit = limit
        if properties_to_include is not None:
          self.properties_to_include = properties_to_include
        if sorts is not None:
          self.sorts = sorts
        if table_formulas is not None:
          self.table_formulas = table_formulas
        if tables_to_join is not None:
          self.tables_to_join = tables_to_join
        if use_distinct is not None:
          self.use_distinct = use_distinct
        if virtual_columns is not None:
          self.virtual_columns = virtual_columns

    @property
    def columns_to_include(self):
        """
        Gets the columns_to_include of this TableDataQueryInputV1.
        What columns to include in the result. If set to null or not provided, all columns are returned. To include context columns, prepend the column with either 'context_comments.', 'context_label.', or 'context_opaque.'

        :return: The columns_to_include of this TableDataQueryInputV1.
        :rtype: list[str]
        """
        return self._columns_to_include

    @columns_to_include.setter
    def columns_to_include(self, columns_to_include):
        """
        Sets the columns_to_include of this TableDataQueryInputV1.
        What columns to include in the result. If set to null or not provided, all columns are returned. To include context columns, prepend the column with either 'context_comments.', 'context_label.', or 'context_opaque.'

        :param columns_to_include: The columns_to_include of this TableDataQueryInputV1.
        :type: list[str]
        """

        self._columns_to_include = columns_to_include

    @property
    def condition_monitor_id(self):
        """
        Gets the condition_monitor_id of this TableDataQueryInputV1.
        The condition monitor ID to use in condition monitor related queries

        :return: The condition_monitor_id of this TableDataQueryInputV1.
        :rtype: str
        """
        return self._condition_monitor_id

    @condition_monitor_id.setter
    def condition_monitor_id(self, condition_monitor_id):
        """
        Sets the condition_monitor_id of this TableDataQueryInputV1.
        The condition monitor ID to use in condition monitor related queries

        :param condition_monitor_id: The condition_monitor_id of this TableDataQueryInputV1.
        :type: str
        """

        self._condition_monitor_id = condition_monitor_id

    @property
    def cursor(self):
        """
        Gets the cursor of this TableDataQueryInputV1.

        :return: The cursor of this TableDataQueryInputV1.
        :rtype: Cursor
        """
        return self._cursor

    @cursor.setter
    def cursor(self, cursor):
        """
        Sets the cursor of this TableDataQueryInputV1.

        :param cursor: The cursor of this TableDataQueryInputV1.
        :type: Cursor
        """

        self._cursor = cursor

    @property
    def filter(self):
        """
        Gets the filter of this TableDataQueryInputV1.

        :return: The filter of this TableDataQueryInputV1.
        :rtype: Filter
        """
        return self._filter

    @filter.setter
    def filter(self, filter):
        """
        Sets the filter of this TableDataQueryInputV1.

        :param filter: The filter of this TableDataQueryInputV1.
        :type: Filter
        """

        self._filter = filter

    @property
    def group_by(self):
        """
        Gets the group_by of this TableDataQueryInputV1.

        :return: The group_by of this TableDataQueryInputV1.
        :rtype: GroupBy
        """
        return self._group_by

    @group_by.setter
    def group_by(self, group_by):
        """
        Sets the group_by of this TableDataQueryInputV1.

        :param group_by: The group_by of this TableDataQueryInputV1.
        :type: GroupBy
        """

        self._group_by = group_by

    @property
    def include_overrides(self):
        """
        Gets the include_overrides of this TableDataQueryInputV1.
        Include override columns in the result.

        :return: The include_overrides of this TableDataQueryInputV1.
        :rtype: bool
        """
        return self._include_overrides

    @include_overrides.setter
    def include_overrides(self, include_overrides):
        """
        Sets the include_overrides of this TableDataQueryInputV1.
        Include override columns in the result.

        :param include_overrides: The include_overrides of this TableDataQueryInputV1.
        :type: bool
        """

        self._include_overrides = include_overrides

    @property
    def limit(self):
        """
        Gets the limit of this TableDataQueryInputV1.
        Maximum number of rows to return

        :return: The limit of this TableDataQueryInputV1.
        :rtype: int
        """
        return self._limit

    @limit.setter
    def limit(self, limit):
        """
        Sets the limit of this TableDataQueryInputV1.
        Maximum number of rows to return

        :param limit: The limit of this TableDataQueryInputV1.
        :type: int
        """
        if limit is None:
            raise ValueError("Invalid value for `limit`, must not be `None`")

        self._limit = limit

    @property
    def properties_to_include(self):
        """
        Gets the properties_to_include of this TableDataQueryInputV1.
        Any additional item properties to retrieve for an item. Only works for UUID columns.

        :return: The properties_to_include of this TableDataQueryInputV1.
        :rtype: list[PropertiesForItemUUIDColumn]
        """
        return self._properties_to_include

    @properties_to_include.setter
    def properties_to_include(self, properties_to_include):
        """
        Sets the properties_to_include of this TableDataQueryInputV1.
        Any additional item properties to retrieve for an item. Only works for UUID columns.

        :param properties_to_include: The properties_to_include of this TableDataQueryInputV1.
        :type: list[PropertiesForItemUUIDColumn]
        """

        self._properties_to_include = properties_to_include

    @property
    def sorts(self):
        """
        Gets the sorts of this TableDataQueryInputV1.
        The sort(s) to apply to the results

        :return: The sorts of this TableDataQueryInputV1.
        :rtype: list[Sort]
        """
        return self._sorts

    @sorts.setter
    def sorts(self, sorts):
        """
        Sets the sorts of this TableDataQueryInputV1.
        The sort(s) to apply to the results

        :param sorts: The sorts of this TableDataQueryInputV1.
        :type: list[Sort]
        """

        self._sorts = sorts

    @property
    def table_formulas(self):
        """
        Gets the table_formulas of this TableDataQueryInputV1.
        The formulas to run against the items in the table results. Each formula result will be returned as their own column in the order requested by the formula.  ColumnsToInclude must include the column containing the items to run the formula across.

        :return: The table_formulas of this TableDataQueryInputV1.
        :rtype: list[TableFormula]
        """
        return self._table_formulas

    @table_formulas.setter
    def table_formulas(self, table_formulas):
        """
        Sets the table_formulas of this TableDataQueryInputV1.
        The formulas to run against the items in the table results. Each formula result will be returned as their own column in the order requested by the formula.  ColumnsToInclude must include the column containing the items to run the formula across.

        :param table_formulas: The table_formulas of this TableDataQueryInputV1.
        :type: list[TableFormula]
        """

        self._table_formulas = table_formulas

    @property
    def tables_to_join(self):
        """
        Gets the tables_to_join of this TableDataQueryInputV1.
        Materialized tables to join and the columns to include from each table. If no columns are added, all will be fetched. Each UUID column in the table being fetched will be joined with the columnToJoin, or the item id column if blank

        :return: The tables_to_join of this TableDataQueryInputV1.
        :rtype: list[TableJoinInput]
        """
        return self._tables_to_join

    @tables_to_join.setter
    def tables_to_join(self, tables_to_join):
        """
        Sets the tables_to_join of this TableDataQueryInputV1.
        Materialized tables to join and the columns to include from each table. If no columns are added, all will be fetched. Each UUID column in the table being fetched will be joined with the columnToJoin, or the item id column if blank

        :param tables_to_join: The tables_to_join of this TableDataQueryInputV1.
        :type: list[TableJoinInput]
        """

        self._tables_to_join = tables_to_join

    @property
    def use_distinct(self):
        """
        Gets the use_distinct of this TableDataQueryInputV1.
        Include only distinct rows in the result. ColumnsToInclude must be included to use this and distinct will apply across all columns requested.

        :return: The use_distinct of this TableDataQueryInputV1.
        :rtype: bool
        """
        return self._use_distinct

    @use_distinct.setter
    def use_distinct(self, use_distinct):
        """
        Sets the use_distinct of this TableDataQueryInputV1.
        Include only distinct rows in the result. ColumnsToInclude must be included to use this and distinct will apply across all columns requested.

        :param use_distinct: The use_distinct of this TableDataQueryInputV1.
        :type: bool
        """

        self._use_distinct = use_distinct

    @property
    def virtual_columns(self):
        """
        Gets the virtual_columns of this TableDataQueryInputV1.

        :return: The virtual_columns of this TableDataQueryInputV1.
        :rtype: VirtualColumns
        """
        return self._virtual_columns

    @virtual_columns.setter
    def virtual_columns(self, virtual_columns):
        """
        Sets the virtual_columns of this TableDataQueryInputV1.

        :param virtual_columns: The virtual_columns of this TableDataQueryInputV1.
        :type: VirtualColumns
        """

        self._virtual_columns = virtual_columns

    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, TableDataQueryInputV1):
            return False

        return self.__dict__ == other.__dict__

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