# 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.109.1-v202602271209-CD
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from pprint import pformat
from six import iteritems
import re


class TableDefinitionCSVInputV1(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 = {
        'batch_action': 'str',
        'column_delimiter': 'str',
        'data_id': 'str',
        'datasource_class': 'str',
        'datasource_id': 'str',
        'header_row': 'int',
        'name': 'str',
        'scoped_to': 'str',
        'table_type': 'str',
        'upload_filename': 'str'
    }

    attribute_map = {
        'batch_action': 'batchAction',
        'column_delimiter': 'columnDelimiter',
        'data_id': 'dataId',
        'datasource_class': 'datasourceClass',
        'datasource_id': 'datasourceId',
        'header_row': 'headerRow',
        'name': 'name',
        'scoped_to': 'scopedTo',
        'table_type': 'tableType',
        'upload_filename': 'uploadFilename'
    }

    def __init__(self, batch_action='UPDATE_EXISTING_INSERT_NEW', column_delimiter=None, data_id=None, datasource_class=None, datasource_id=None, header_row=None, name=None, scoped_to=None, table_type=None, upload_filename=None):
        """
        TableDefinitionCSVInputV1 - a model defined in Swagger
        """

        self._batch_action = None
        self._column_delimiter = None
        self._data_id = None
        self._datasource_class = None
        self._datasource_id = None
        self._header_row = None
        self._name = None
        self._scoped_to = None
        self._table_type = None
        self._upload_filename = None

        if batch_action is not None:
          self.batch_action = batch_action
        if column_delimiter is not None:
          self.column_delimiter = column_delimiter
        if data_id is not None:
          self.data_id = data_id
        if datasource_class is not None:
          self.datasource_class = datasource_class
        if datasource_id is not None:
          self.datasource_id = datasource_id
        if header_row is not None:
          self.header_row = header_row
        if name is not None:
          self.name = name
        if scoped_to is not None:
          self.scoped_to = scoped_to
        if table_type is not None:
          self.table_type = table_type
        if upload_filename is not None:
          self.upload_filename = upload_filename

    @property
    def batch_action(self):
        """
        Gets the batch_action of this TableDefinitionCSVInputV1.
        The action to take for a batch update. Valid options are as follows: UPDATE_EXISTING_INSERT_NEW_CLEANUP: Update existing rows and insert new rows, but remove any rows that weren't updated or inserted. UPDATE_EXISTING_INSERT_NEW: Update existing rows and insert new rows. This is the default. ONLY_UPDATE_EXISTING: Only update existing rows, but don’t insert new rows ONLY_INSERT_NEW: Only insert new rows, but don’t update existing rows 

        :return: The batch_action of this TableDefinitionCSVInputV1.
        :rtype: str
        """
        return self._batch_action

    @batch_action.setter
    def batch_action(self, batch_action):
        """
        Sets the batch_action of this TableDefinitionCSVInputV1.
        The action to take for a batch update. Valid options are as follows: UPDATE_EXISTING_INSERT_NEW_CLEANUP: Update existing rows and insert new rows, but remove any rows that weren't updated or inserted. UPDATE_EXISTING_INSERT_NEW: Update existing rows and insert new rows. This is the default. ONLY_UPDATE_EXISTING: Only update existing rows, but don’t insert new rows ONLY_INSERT_NEW: Only insert new rows, but don’t update existing rows 

        :param batch_action: The batch_action of this TableDefinitionCSVInputV1.
        :type: str
        """

        self._batch_action = batch_action

    @property
    def column_delimiter(self):
        """
        Gets the column_delimiter of this TableDefinitionCSVInputV1.
        The character used as the CSV field delimiter. The possibilities are comma, semicolon, and tab

        :return: The column_delimiter of this TableDefinitionCSVInputV1.
        :rtype: str
        """
        return self._column_delimiter

    @column_delimiter.setter
    def column_delimiter(self, column_delimiter):
        """
        Sets the column_delimiter of this TableDefinitionCSVInputV1.
        The character used as the CSV field delimiter. The possibilities are comma, semicolon, and tab

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

        self._column_delimiter = column_delimiter

    @property
    def data_id(self):
        """
        Gets the data_id of this TableDefinitionCSVInputV1.
        A unique identifier for the table definition within its datasource

        :return: The data_id of this TableDefinitionCSVInputV1.
        :rtype: str
        """
        return self._data_id

    @data_id.setter
    def data_id(self, data_id):
        """
        Sets the data_id of this TableDefinitionCSVInputV1.
        A unique identifier for the table definition within its datasource

        :param data_id: The data_id of this TableDefinitionCSVInputV1.
        :type: str
        """

        self._data_id = data_id

    @property
    def datasource_class(self):
        """
        Gets the datasource_class of this TableDefinitionCSVInputV1.
        Along with the Datasource ID, the Datasource Class uniquely identifies a datasource

        :return: The datasource_class of this TableDefinitionCSVInputV1.
        :rtype: str
        """
        return self._datasource_class

    @datasource_class.setter
    def datasource_class(self, datasource_class):
        """
        Sets the datasource_class of this TableDefinitionCSVInputV1.
        Along with the Datasource ID, the Datasource Class uniquely identifies a datasource

        :param datasource_class: The datasource_class of this TableDefinitionCSVInputV1.
        :type: str
        """

        self._datasource_class = datasource_class

    @property
    def datasource_id(self):
        """
        Gets the datasource_id of this TableDefinitionCSVInputV1.
        Along with the Datasource Class, the Datasource ID uniquely identifies a datasource

        :return: The datasource_id of this TableDefinitionCSVInputV1.
        :rtype: str
        """
        return self._datasource_id

    @datasource_id.setter
    def datasource_id(self, datasource_id):
        """
        Sets the datasource_id of this TableDefinitionCSVInputV1.
        Along with the Datasource Class, the Datasource ID uniquely identifies a datasource

        :param datasource_id: The datasource_id of this TableDefinitionCSVInputV1.
        :type: str
        """

        self._datasource_id = datasource_id

    @property
    def header_row(self):
        """
        Gets the header_row of this TableDefinitionCSVInputV1.
        Index of row with unique column headers to be used in the creation of table-definition columns. The row index is 1-based.

        :return: The header_row of this TableDefinitionCSVInputV1.
        :rtype: int
        """
        return self._header_row

    @header_row.setter
    def header_row(self, header_row):
        """
        Sets the header_row of this TableDefinitionCSVInputV1.
        Index of row with unique column headers to be used in the creation of table-definition columns. The row index is 1-based.

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

        self._header_row = header_row

    @property
    def name(self):
        """
        Gets the name of this TableDefinitionCSVInputV1.
        Human readable name of the table. An input of just whitespaces is equivalent to a null input.

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

    @name.setter
    def name(self, name):
        """
        Sets the name of this TableDefinitionCSVInputV1.
        Human readable name of the table. An input of just whitespaces is equivalent to a null input.

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

        self._name = name

    @property
    def scoped_to(self):
        """
        Gets the scoped_to of this TableDefinitionCSVInputV1.
        The ID of the workbook to which the table definition will be scoped. If not provided, the table definition will have a global scope

        :return: The scoped_to of this TableDefinitionCSVInputV1.
        :rtype: str
        """
        return self._scoped_to

    @scoped_to.setter
    def scoped_to(self, scoped_to):
        """
        Sets the scoped_to of this TableDefinitionCSVInputV1.
        The ID of the workbook to which the table definition will be scoped. If not provided, the table definition will have a global scope

        :param scoped_to: The scoped_to of this TableDefinitionCSVInputV1.
        :type: str
        """

        self._scoped_to = scoped_to

    @property
    def table_type(self):
        """
        Gets the table_type of this TableDefinitionCSVInputV1.
        The type of table. Defaults to SCALING_CSV. Cannot be changed after creation.

        :return: The table_type of this TableDefinitionCSVInputV1.
        :rtype: str
        """
        return self._table_type

    @table_type.setter
    def table_type(self, table_type):
        """
        Sets the table_type of this TableDefinitionCSVInputV1.
        The type of table. Defaults to SCALING_CSV. Cannot be changed after creation.

        :param table_type: The table_type of this TableDefinitionCSVInputV1.
        :type: str
        """

        self._table_type = table_type

    @property
    def upload_filename(self):
        """
        Gets the upload_filename of this TableDefinitionCSVInputV1.
        The server-side name of the CSV file that is returned from the upload endpoint.

        :return: The upload_filename of this TableDefinitionCSVInputV1.
        :rtype: str
        """
        return self._upload_filename

    @upload_filename.setter
    def upload_filename(self, upload_filename):
        """
        Sets the upload_filename of this TableDefinitionCSVInputV1.
        The server-side name of the CSV file that is returned from the upload endpoint.

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

        self._upload_filename = upload_filename

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

        return self.__dict__ == other.__dict__

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