# coding: utf-8

"""
    Managed Ray API

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

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


class DataCatalogTable(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 = {
        'id': 'str',
        'name': 'str',
        'description': 'str',
        'created_at': 'str',
        'updated_at': 'str',
        'schema_id': 'str',
        'catalog_id': 'str',
        'connection_id': 'str',
        'object_type': 'DataCatalogObjectType',
        'table_type': 'str',
        'data_format': 'str',
        'metadata': 'BackendServerApiProductModelsDataCatalogsTableMetadata'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'description': 'description',
        'created_at': 'created_at',
        'updated_at': 'updated_at',
        'schema_id': 'schema_id',
        'catalog_id': 'catalog_id',
        'connection_id': 'connection_id',
        'object_type': 'object_type',
        'table_type': 'table_type',
        'data_format': 'data_format',
        'metadata': 'metadata'
    }

    def __init__(self, id=None, name=None, description=None, created_at=None, updated_at=None, schema_id=None, catalog_id=None, connection_id=None, object_type=None, table_type=None, data_format=None, metadata=None, local_vars_configuration=None):  # noqa: E501
        """DataCatalogTable - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._id = None
        self._name = None
        self._description = None
        self._created_at = None
        self._updated_at = None
        self._schema_id = None
        self._catalog_id = None
        self._connection_id = None
        self._object_type = None
        self._table_type = None
        self._data_format = None
        self._metadata = None
        self.discriminator = None

        self.id = id
        self.name = name
        if description is not None:
            self.description = description
        self.created_at = created_at
        self.updated_at = updated_at
        self.schema_id = schema_id
        self.catalog_id = catalog_id
        self.connection_id = connection_id
        if object_type is not None:
            self.object_type = object_type
        if table_type is not None:
            self.table_type = table_type
        if data_format is not None:
            self.data_format = data_format
        if metadata is not None:
            self.metadata = metadata

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

        Unique identifier  # noqa: E501

        :return: The id of this DataCatalogTable.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this DataCatalogTable.

        Unique identifier  # noqa: E501

        :param id: The id of this DataCatalogTable.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and id is None:  # noqa: E501
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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

        Display name  # noqa: E501

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

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

        Display name  # noqa: E501

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

        self._name = name

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

        Description  # noqa: E501

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

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

        Description  # noqa: E501

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

        self._description = description

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

        Creation timestamp in ISO 8601 format  # noqa: E501

        :return: The created_at of this DataCatalogTable.  # noqa: E501
        :rtype: str
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this DataCatalogTable.

        Creation timestamp in ISO 8601 format  # noqa: E501

        :param created_at: The created_at of this DataCatalogTable.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and created_at is None:  # noqa: E501
            raise ValueError("Invalid value for `created_at`, must not be `None`")  # noqa: E501

        self._created_at = created_at

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

        Last update timestamp in ISO 8601 format  # noqa: E501

        :return: The updated_at of this DataCatalogTable.  # noqa: E501
        :rtype: str
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this DataCatalogTable.

        Last update timestamp in ISO 8601 format  # noqa: E501

        :param updated_at: The updated_at of this DataCatalogTable.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and updated_at is None:  # noqa: E501
            raise ValueError("Invalid value for `updated_at`, must not be `None`")  # noqa: E501

        self._updated_at = updated_at

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

        ID of the parent schema  # noqa: E501

        :return: The schema_id of this DataCatalogTable.  # noqa: E501
        :rtype: str
        """
        return self._schema_id

    @schema_id.setter
    def schema_id(self, schema_id):
        """Sets the schema_id of this DataCatalogTable.

        ID of the parent schema  # noqa: E501

        :param schema_id: The schema_id of this DataCatalogTable.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and schema_id is None:  # noqa: E501
            raise ValueError("Invalid value for `schema_id`, must not be `None`")  # noqa: E501

        self._schema_id = schema_id

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

        ID of the parent catalog  # noqa: E501

        :return: The catalog_id of this DataCatalogTable.  # noqa: E501
        :rtype: str
        """
        return self._catalog_id

    @catalog_id.setter
    def catalog_id(self, catalog_id):
        """Sets the catalog_id of this DataCatalogTable.

        ID of the parent catalog  # noqa: E501

        :param catalog_id: The catalog_id of this DataCatalogTable.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and catalog_id is None:  # noqa: E501
            raise ValueError("Invalid value for `catalog_id`, must not be `None`")  # noqa: E501

        self._catalog_id = catalog_id

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

        ID of the parent data catalog connection  # noqa: E501

        :return: The connection_id of this DataCatalogTable.  # noqa: E501
        :rtype: str
        """
        return self._connection_id

    @connection_id.setter
    def connection_id(self, connection_id):
        """Sets the connection_id of this DataCatalogTable.

        ID of the parent data catalog connection  # noqa: E501

        :param connection_id: The connection_id of this DataCatalogTable.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and connection_id is None:  # noqa: E501
            raise ValueError("Invalid value for `connection_id`, must not be `None`")  # noqa: E501

        self._connection_id = connection_id

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

        Type of catalog object (always 'table' for this model)  # noqa: E501

        :return: The object_type of this DataCatalogTable.  # noqa: E501
        :rtype: DataCatalogObjectType
        """
        return self._object_type

    @object_type.setter
    def object_type(self, object_type):
        """Sets the object_type of this DataCatalogTable.

        Type of catalog object (always 'table' for this model)  # noqa: E501

        :param object_type: The object_type of this DataCatalogTable.  # noqa: E501
        :type: DataCatalogObjectType
        """

        self._object_type = object_type

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

        Type of table (e.g., 'MANAGED', 'EXTERNAL', 'VIEW')  # noqa: E501

        :return: The table_type of this DataCatalogTable.  # noqa: E501
        :rtype: str
        """
        return self._table_type

    @table_type.setter
    def table_type(self, table_type):
        """Sets the table_type of this DataCatalogTable.

        Type of table (e.g., 'MANAGED', 'EXTERNAL', 'VIEW')  # noqa: E501

        :param table_type: The table_type of this DataCatalogTable.  # noqa: E501
        :type: str
        """

        self._table_type = table_type

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

        Data format (e.g., 'DELTA', 'PARQUET')  # noqa: E501

        :return: The data_format of this DataCatalogTable.  # noqa: E501
        :rtype: str
        """
        return self._data_format

    @data_format.setter
    def data_format(self, data_format):
        """Sets the data_format of this DataCatalogTable.

        Data format (e.g., 'DELTA', 'PARQUET')  # noqa: E501

        :param data_format: The data_format of this DataCatalogTable.  # noqa: E501
        :type: str
        """

        self._data_format = data_format

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

        Table-specific metadata including owner, full_name, and column_count  # noqa: E501

        :return: The metadata of this DataCatalogTable.  # noqa: E501
        :rtype: BackendServerApiProductModelsDataCatalogsTableMetadata
        """
        return self._metadata

    @metadata.setter
    def metadata(self, metadata):
        """Sets the metadata of this DataCatalogTable.

        Table-specific metadata including owner, full_name, and column_count  # noqa: E501

        :param metadata: The metadata of this DataCatalogTable.  # noqa: E501
        :type: BackendServerApiProductModelsDataCatalogsTableMetadata
        """

        self._metadata = metadata

    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, DataCatalogTable):
            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, DataCatalogTable):
            return True

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