# coding: utf-8

"""
    herd

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    OpenAPI spec version: 0.178.0-SNAPSHOT
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class SchemaColumn(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'name': 'str',
        'type': 'str',
        'size': 'str',
        'required': 'bool',
        'default_value': 'str',
        'description': 'str'
    }

    attribute_map = {
        'name': 'name',
        'type': 'type',
        'size': 'size',
        'required': 'required',
        'default_value': 'defaultValue',
        'description': 'description'
    }

    def __init__(self, name=None, type=None, size=None, required=None, default_value=None, description=None):  # noqa: E501
        """SchemaColumn - a model defined in OpenAPI"""  # noqa: E501

        self._name = None
        self._type = None
        self._size = None
        self._required = None
        self._default_value = None
        self._description = None
        self.discriminator = None

        self.name = name
        self.type = type
        if size is not None:
            self.size = size
        if required is not None:
            self.required = required
        if default_value is not None:
            self.default_value = default_value
        if description is not None:
            self.description = description

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

        The name of the schema column. Required when Column is present  # noqa: E501

        :return: The name of this SchemaColumn.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this SchemaColumn.

        The name of the schema column. Required when Column is present  # noqa: E501

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

        self._name = name

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

        The data type of the schema column. Required when Column is present  # noqa: E501

        :return: The type of this SchemaColumn.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this SchemaColumn.

        The data type of the schema column. Required when Column is present  # noqa: E501

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

        self._type = type

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

        The column size. This is a string value since, for \"NUMERIC\" and \"DECIMAL\" data types, we should be able to specify both                   the maximum number of digits (p) that are present in the number and the maximum number of decimal places (s) as a \"p,s\" string. Required when                   Column is present                  # noqa: E501

        :return: The size of this SchemaColumn.  # noqa: E501
        :rtype: str
        """
        return self._size

    @size.setter
    def size(self, size):
        """Sets the size of this SchemaColumn.

        The column size. This is a string value since, for \"NUMERIC\" and \"DECIMAL\" data types, we should be able to specify both                   the maximum number of digits (p) that are present in the number and the maximum number of decimal places (s) as a \"p,s\" string. Required when                   Column is present                  # noqa: E501

        :param size: The size of this SchemaColumn.  # noqa: E501
        :type: str
        """

        self._size = size

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

        Values true|false. If true, a value isis required for the column (not nullable)  # noqa: E501

        :return: The required of this SchemaColumn.  # noqa: E501
        :rtype: bool
        """
        return self._required

    @required.setter
    def required(self, required):
        """Sets the required of this SchemaColumn.

        Values true|false. If true, a value isis required for the column (not nullable)  # noqa: E501

        :param required: The required of this SchemaColumn.  # noqa: E501
        :type: bool
        """

        self._required = required

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

        Default value for the column  # noqa: E501

        :return: The default_value of this SchemaColumn.  # noqa: E501
        :rtype: str
        """
        return self._default_value

    @default_value.setter
    def default_value(self, default_value):
        """Sets the default_value of this SchemaColumn.

        Default value for the column  # noqa: E501

        :param default_value: The default_value of this SchemaColumn.  # noqa: E501
        :type: str
        """

        self._default_value = default_value

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

        Description of the column  # noqa: E501

        :return: The description of this SchemaColumn.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this SchemaColumn.

        Description of the column  # noqa: E501

        :param description: The description of this SchemaColumn.  # noqa: E501
        :type: str
        """

        self._description = description

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

        for attr, _ in six.iteritems(self.openapi_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 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, SchemaColumn):
            return False

        return self.__dict__ == other.__dict__

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