# 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 TableDefinitionPreviewInputV1(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 = {
        'bypass_model_controlled_restriction': 'bool',
        'column_definitions': 'ColumnDefinitionBulkEditInputListV1',
        'rows': 'list[RowId]'
    }

    attribute_map = {
        'bypass_model_controlled_restriction': 'bypassModelControlledRestriction',
        'column_definitions': 'columnDefinitions',
        'rows': 'rows'
    }

    def __init__(self, bypass_model_controlled_restriction=None, column_definitions=None, rows=None):
        """
        TableDefinitionPreviewInputV1 - a model defined in Swagger
        """

        self._bypass_model_controlled_restriction = None
        self._column_definitions = None
        self._rows = None

        if bypass_model_controlled_restriction is not None:
          self.bypass_model_controlled_restriction = bypass_model_controlled_restriction
        if column_definitions is not None:
          self.column_definitions = column_definitions
        if rows is not None:
          self.rows = rows

    @property
    def bypass_model_controlled_restriction(self):
        """
        Gets the bypass_model_controlled_restriction of this TableDefinitionPreviewInputV1.
        If true, allows previewing modifications to model-controlled columns. Model-controlled columns are columns created by applying a model to a table. By default, these columns cannot be modified directly to preserve model integrity. Set this to true when previewing changes to model features. Since preview is a transient operation that doesn't persist changes, bypassing this restriction is safe.

        :return: The bypass_model_controlled_restriction of this TableDefinitionPreviewInputV1.
        :rtype: bool
        """
        return self._bypass_model_controlled_restriction

    @bypass_model_controlled_restriction.setter
    def bypass_model_controlled_restriction(self, bypass_model_controlled_restriction):
        """
        Sets the bypass_model_controlled_restriction of this TableDefinitionPreviewInputV1.
        If true, allows previewing modifications to model-controlled columns. Model-controlled columns are columns created by applying a model to a table. By default, these columns cannot be modified directly to preserve model integrity. Set this to true when previewing changes to model features. Since preview is a transient operation that doesn't persist changes, bypassing this restriction is safe.

        :param bypass_model_controlled_restriction: The bypass_model_controlled_restriction of this TableDefinitionPreviewInputV1.
        :type: bool
        """

        self._bypass_model_controlled_restriction = bypass_model_controlled_restriction

    @property
    def column_definitions(self):
        """
        Gets the column_definitions of this TableDefinitionPreviewInputV1.

        :return: The column_definitions of this TableDefinitionPreviewInputV1.
        :rtype: ColumnDefinitionBulkEditInputListV1
        """
        return self._column_definitions

    @column_definitions.setter
    def column_definitions(self, column_definitions):
        """
        Sets the column_definitions of this TableDefinitionPreviewInputV1.

        :param column_definitions: The column_definitions of this TableDefinitionPreviewInputV1.
        :type: ColumnDefinitionBulkEditInputListV1
        """
        if column_definitions is None:
            raise ValueError("Invalid value for `column_definitions`, must not be `None`")

        self._column_definitions = column_definitions

    @property
    def rows(self):
        """
        Gets the rows of this TableDefinitionPreviewInputV1.
        The datumId/itemId combinations of the desired rows to preview in the table. If not provided, the table will be populated with the first 50 rows from the table.

        :return: The rows of this TableDefinitionPreviewInputV1.
        :rtype: list[RowId]
        """
        return self._rows

    @rows.setter
    def rows(self, rows):
        """
        Sets the rows of this TableDefinitionPreviewInputV1.
        The datumId/itemId combinations of the desired rows to preview in the table. If not provided, the table will be populated with the first 50 rows from the table.

        :param rows: The rows of this TableDefinitionPreviewInputV1.
        :type: list[RowId]
        """

        self._rows = rows

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

        return self.__dict__ == other.__dict__

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