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

from pprint import pformat
from six import iteritems
import re


class ColumnDefinitionInputV1(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 = {
        'column_name': 'str',
        'column_rules': 'list[ColumnRuleInputV1]',
        'column_type': 'str',
        'column_uom': 'str',
        'is_indexed': 'bool'
    }

    attribute_map = {
        'column_name': 'columnName',
        'column_rules': 'columnRules',
        'column_type': 'columnType',
        'column_uom': 'columnUom',
        'is_indexed': 'isIndexed'
    }

    def __init__(self, column_name=None, column_rules=None, column_type=None, column_uom=None, is_indexed=None):
        """
        ColumnDefinitionInputV1 - a model defined in Swagger
        """

        self._column_name = None
        self._column_rules = None
        self._column_type = None
        self._column_uom = None
        self._is_indexed = None

        if column_name is not None:
          self.column_name = column_name
        if column_rules is not None:
          self.column_rules = column_rules
        if column_type is not None:
          self.column_type = column_type
        if column_uom is not None:
          self.column_uom = column_uom
        if is_indexed is not None:
          self.is_indexed = is_indexed

    @property
    def column_name(self):
        """
        Gets the column_name of this ColumnDefinitionInputV1.
        Name of the column. This will be used as the header for this column. It must be unique for this table

        :return: The column_name of this ColumnDefinitionInputV1.
        :rtype: str
        """
        return self._column_name

    @column_name.setter
    def column_name(self, column_name):
        """
        Sets the column_name of this ColumnDefinitionInputV1.
        Name of the column. This will be used as the header for this column. It must be unique for this table

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

        self._column_name = column_name

    @property
    def column_rules(self):
        """
        Gets the column_rules of this ColumnDefinitionInputV1.
        The list of rules that determine the resulting value of a column. At least one rule is required

        :return: The column_rules of this ColumnDefinitionInputV1.
        :rtype: list[ColumnRuleInputV1]
        """
        return self._column_rules

    @column_rules.setter
    def column_rules(self, column_rules):
        """
        Sets the column_rules of this ColumnDefinitionInputV1.
        The list of rules that determine the resulting value of a column. At least one rule is required

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

        self._column_rules = column_rules

    @property
    def column_type(self):
        """
        Gets the column_type of this ColumnDefinitionInputV1.
        The type for the column

        :return: The column_type of this ColumnDefinitionInputV1.
        :rtype: str
        """
        return self._column_type

    @column_type.setter
    def column_type(self, column_type):
        """
        Sets the column_type of this ColumnDefinitionInputV1.
        The type for the column

        :param column_type: The column_type of this ColumnDefinitionInputV1.
        :type: str
        """
        if column_type is None:
            raise ValueError("Invalid value for `column_type`, must not be `None`")
        allowed_values = ["UUID", "TEXT", "NUMERIC", "TIMESTAMPTZ", "BOOLEAN"]
        if column_type not in allowed_values:
            raise ValueError(
                "Invalid value for `column_type` ({0}), must be one of {1}"
                .format(column_type, allowed_values)
            )

        self._column_type = column_type

    @property
    def column_uom(self):
        """
        Gets the column_uom of this ColumnDefinitionInputV1.
        The unit of measure for this column. This is only applicable to columns whose type                      is NUMERIC. If provided, this will enforce that data in this column must be in this unit. For                      example, if the user specifies Fahrenheit and the value comes in as Meters, the value will not be                      inserted. If not provided, values with different units will be allowed to be stored and an extra                       column will be added to the generated table for the UOM

        :return: The column_uom of this ColumnDefinitionInputV1.
        :rtype: str
        """
        return self._column_uom

    @column_uom.setter
    def column_uom(self, column_uom):
        """
        Sets the column_uom of this ColumnDefinitionInputV1.
        The unit of measure for this column. This is only applicable to columns whose type                      is NUMERIC. If provided, this will enforce that data in this column must be in this unit. For                      example, if the user specifies Fahrenheit and the value comes in as Meters, the value will not be                      inserted. If not provided, values with different units will be allowed to be stored and an extra                       column will be added to the generated table for the UOM

        :param column_uom: The column_uom of this ColumnDefinitionInputV1.
        :type: str
        """

        self._column_uom = column_uom

    @property
    def is_indexed(self):
        """
        Gets the is_indexed of this ColumnDefinitionInputV1.

        :return: The is_indexed of this ColumnDefinitionInputV1.
        :rtype: bool
        """
        return self._is_indexed

    @is_indexed.setter
    def is_indexed(self, is_indexed):
        """
        Sets the is_indexed of this ColumnDefinitionInputV1.

        :param is_indexed: The is_indexed of this ColumnDefinitionInputV1.
        :type: bool
        """

        self._is_indexed = is_indexed

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

        return self.__dict__ == other.__dict__

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