# 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 LineageGraphNode(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',
        'namespace_name': 'str',
        'uri': 'str',
        'created_at': 'datetime',
        'updated_at': 'datetime',
        'created_by': 'str',
        'updated_by': 'str',
        'workload_type': 'LineageWorkloadType',
        'anyscale_workload_id': 'str',
        'artifact_type': 'LineageArtifactType',
        'artifact_file_format': 'str',
        'node_type': 'LineageNodeType'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'namespace_name': 'namespace_name',
        'uri': 'uri',
        'created_at': 'created_at',
        'updated_at': 'updated_at',
        'created_by': 'created_by',
        'updated_by': 'updated_by',
        'workload_type': 'workload_type',
        'anyscale_workload_id': 'anyscale_workload_id',
        'artifact_type': 'artifact_type',
        'artifact_file_format': 'artifact_file_format',
        'node_type': 'node_type'
    }

    def __init__(self, id=None, name=None, namespace_name=None, uri=None, created_at=None, updated_at=None, created_by=None, updated_by=None, workload_type=None, anyscale_workload_id=None, artifact_type=None, artifact_file_format=None, node_type=None, local_vars_configuration=None):  # noqa: E501
        """LineageGraphNode - 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._namespace_name = None
        self._uri = None
        self._created_at = None
        self._updated_at = None
        self._created_by = None
        self._updated_by = None
        self._workload_type = None
        self._anyscale_workload_id = None
        self._artifact_type = None
        self._artifact_file_format = None
        self._node_type = None
        self.discriminator = None

        self.id = id
        self.name = name
        self.namespace_name = namespace_name
        self.uri = uri
        self.created_at = created_at
        self.updated_at = updated_at
        self.created_by = created_by
        self.updated_by = updated_by
        if workload_type is not None:
            self.workload_type = workload_type
        if anyscale_workload_id is not None:
            self.anyscale_workload_id = anyscale_workload_id
        if artifact_type is not None:
            self.artifact_type = artifact_type
        if artifact_file_format is not None:
            self.artifact_file_format = artifact_file_format
        self.node_type = node_type

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

        ID of the lineage node  # noqa: E501

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

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

        ID of the lineage node  # noqa: E501

        :param id: The id of this LineageGraphNode.  # 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 LineageGraphNode.  # noqa: E501

        Name of the node  # noqa: E501

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

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

        Name of the node  # noqa: E501

        :param name: The name of this LineageGraphNode.  # 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 namespace_name(self):
        """Gets the namespace_name of this LineageGraphNode.  # noqa: E501

        Namespace name  # noqa: E501

        :return: The namespace_name of this LineageGraphNode.  # noqa: E501
        :rtype: str
        """
        return self._namespace_name

    @namespace_name.setter
    def namespace_name(self, namespace_name):
        """Sets the namespace_name of this LineageGraphNode.

        Namespace name  # noqa: E501

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

        self._namespace_name = namespace_name

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

        URI of the node  # noqa: E501

        :return: The uri of this LineageGraphNode.  # noqa: E501
        :rtype: str
        """
        return self._uri

    @uri.setter
    def uri(self, uri):
        """Sets the uri of this LineageGraphNode.

        URI of the node  # noqa: E501

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

        self._uri = uri

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

        Creation datetime  # noqa: E501

        :return: The created_at of this LineageGraphNode.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

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

        Creation datetime  # noqa: E501

        :param created_at: The created_at of this LineageGraphNode.  # noqa: E501
        :type: datetime
        """
        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 LineageGraphNode.  # noqa: E501

        Last update datetime  # noqa: E501

        :return: The updated_at of this LineageGraphNode.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

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

        Last update datetime  # noqa: E501

        :param updated_at: The updated_at of this LineageGraphNode.  # noqa: E501
        :type: datetime
        """
        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 created_by(self):
        """Gets the created_by of this LineageGraphNode.  # noqa: E501

        User who created the node  # noqa: E501

        :return: The created_by of this LineageGraphNode.  # noqa: E501
        :rtype: str
        """
        return self._created_by

    @created_by.setter
    def created_by(self, created_by):
        """Sets the created_by of this LineageGraphNode.

        User who created the node  # noqa: E501

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

        self._created_by = created_by

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

        User who last updated the node  # noqa: E501

        :return: The updated_by of this LineageGraphNode.  # noqa: E501
        :rtype: str
        """
        return self._updated_by

    @updated_by.setter
    def updated_by(self, updated_by):
        """Sets the updated_by of this LineageGraphNode.

        User who last updated the node  # noqa: E501

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

        self._updated_by = updated_by

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

        Type of workload (WORKSPACE/SERVICE/JOB)  # noqa: E501

        :return: The workload_type of this LineageGraphNode.  # noqa: E501
        :rtype: LineageWorkloadType
        """
        return self._workload_type

    @workload_type.setter
    def workload_type(self, workload_type):
        """Sets the workload_type of this LineageGraphNode.

        Type of workload (WORKSPACE/SERVICE/JOB)  # noqa: E501

        :param workload_type: The workload_type of this LineageGraphNode.  # noqa: E501
        :type: LineageWorkloadType
        """

        self._workload_type = workload_type

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

        Anyscale workload ID  # noqa: E501

        :return: The anyscale_workload_id of this LineageGraphNode.  # noqa: E501
        :rtype: str
        """
        return self._anyscale_workload_id

    @anyscale_workload_id.setter
    def anyscale_workload_id(self, anyscale_workload_id):
        """Sets the anyscale_workload_id of this LineageGraphNode.

        Anyscale workload ID  # noqa: E501

        :param anyscale_workload_id: The anyscale_workload_id of this LineageGraphNode.  # noqa: E501
        :type: str
        """

        self._anyscale_workload_id = anyscale_workload_id

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

        Type of artifact (DATASET/MODEL)  # noqa: E501

        :return: The artifact_type of this LineageGraphNode.  # noqa: E501
        :rtype: LineageArtifactType
        """
        return self._artifact_type

    @artifact_type.setter
    def artifact_type(self, artifact_type):
        """Sets the artifact_type of this LineageGraphNode.

        Type of artifact (DATASET/MODEL)  # noqa: E501

        :param artifact_type: The artifact_type of this LineageGraphNode.  # noqa: E501
        :type: LineageArtifactType
        """

        self._artifact_type = artifact_type

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

        File format (e.g., parquet, csv)  # noqa: E501

        :return: The artifact_file_format of this LineageGraphNode.  # noqa: E501
        :rtype: str
        """
        return self._artifact_file_format

    @artifact_file_format.setter
    def artifact_file_format(self, artifact_file_format):
        """Sets the artifact_file_format of this LineageGraphNode.

        File format (e.g., parquet, csv)  # noqa: E501

        :param artifact_file_format: The artifact_file_format of this LineageGraphNode.  # noqa: E501
        :type: str
        """

        self._artifact_file_format = artifact_file_format

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

        Type of node (ARTIFACT/WORKLOAD)  # noqa: E501

        :return: The node_type of this LineageGraphNode.  # noqa: E501
        :rtype: LineageNodeType
        """
        return self._node_type

    @node_type.setter
    def node_type(self, node_type):
        """Sets the node_type of this LineageGraphNode.

        Type of node (ARTIFACT/WORKLOAD)  # noqa: E501

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

        self._node_type = node_type

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

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