# coding: utf-8

"""
    GraphDB Workbench API

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

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


import pprint
import re  # noqa: F401

import six

from graphdb.graphdb_workbench.configuration import Configuration


class SqlColumn(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_type': 'str',
        'nullable': 'bool',
        'sparql_type': 'str',
        'sql_type_precision': 'int',
        'sql_type_scale': 'int'
    }

    attribute_map = {
        'column_name': 'column_name',
        'column_type': 'column_type',
        'nullable': 'nullable',
        'sparql_type': 'sparql_type',
        'sql_type_precision': 'sql_type_precision',
        'sql_type_scale': 'sql_type_scale'
    }

    def __init__(self, column_name=None, column_type=None, nullable=None, sparql_type=None, sql_type_precision=None, sql_type_scale=None, _configuration=None):  # noqa: E501
        """SqlColumn - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._column_name = None
        self._column_type = None
        self._nullable = None
        self._sparql_type = None
        self._sql_type_precision = None
        self._sql_type_scale = None
        self.discriminator = None

        if column_name is not None:
            self.column_name = column_name
        if column_type is not None:
            self.column_type = column_type
        if nullable is not None:
            self.nullable = nullable
        if sparql_type is not None:
            self.sparql_type = sparql_type
        if sql_type_precision is not None:
            self.sql_type_precision = sql_type_precision
        if sql_type_scale is not None:
            self.sql_type_scale = sql_type_scale

    @property
    def column_name(self):
        """Gets the column_name of this SqlColumn.  # noqa: E501


        :return: The column_name of this SqlColumn.  # noqa: E501
        :rtype: str
        """
        return self._column_name

    @column_name.setter
    def column_name(self, column_name):
        """Sets the column_name of this SqlColumn.


        :param column_name: The column_name of this SqlColumn.  # noqa: E501
        :type: str
        """

        self._column_name = column_name

    @property
    def column_type(self):
        """Gets the column_type of this SqlColumn.  # noqa: E501


        :return: The column_type of this SqlColumn.  # noqa: E501
        :rtype: str
        """
        return self._column_type

    @column_type.setter
    def column_type(self, column_type):
        """Sets the column_type of this SqlColumn.


        :param column_type: The column_type of this SqlColumn.  # noqa: E501
        :type: str
        """

        self._column_type = column_type

    @property
    def nullable(self):
        """Gets the nullable of this SqlColumn.  # noqa: E501


        :return: The nullable of this SqlColumn.  # noqa: E501
        :rtype: bool
        """
        return self._nullable

    @nullable.setter
    def nullable(self, nullable):
        """Sets the nullable of this SqlColumn.


        :param nullable: The nullable of this SqlColumn.  # noqa: E501
        :type: bool
        """

        self._nullable = nullable

    @property
    def sparql_type(self):
        """Gets the sparql_type of this SqlColumn.  # noqa: E501


        :return: The sparql_type of this SqlColumn.  # noqa: E501
        :rtype: str
        """
        return self._sparql_type

    @sparql_type.setter
    def sparql_type(self, sparql_type):
        """Sets the sparql_type of this SqlColumn.


        :param sparql_type: The sparql_type of this SqlColumn.  # noqa: E501
        :type: str
        """

        self._sparql_type = sparql_type

    @property
    def sql_type_precision(self):
        """Gets the sql_type_precision of this SqlColumn.  # noqa: E501


        :return: The sql_type_precision of this SqlColumn.  # noqa: E501
        :rtype: int
        """
        return self._sql_type_precision

    @sql_type_precision.setter
    def sql_type_precision(self, sql_type_precision):
        """Sets the sql_type_precision of this SqlColumn.


        :param sql_type_precision: The sql_type_precision of this SqlColumn.  # noqa: E501
        :type: int
        """

        self._sql_type_precision = sql_type_precision

    @property
    def sql_type_scale(self):
        """Gets the sql_type_scale of this SqlColumn.  # noqa: E501


        :return: The sql_type_scale of this SqlColumn.  # noqa: E501
        :rtype: int
        """
        return self._sql_type_scale

    @sql_type_scale.setter
    def sql_type_scale(self, sql_type_scale):
        """Sets the sql_type_scale of this SqlColumn.


        :param sql_type_scale: The sql_type_scale of this SqlColumn.  # noqa: E501
        :type: int
        """

        self._sql_type_scale = sql_type_scale

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

        for attr, _ in six.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
        if issubclass(SqlColumn, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.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, SqlColumn):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
