# 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 DatasetDag(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',
        'job_id': 'str',
        'session_name': 'str',
        'operator_dag': 'list[OperatorBranch]'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'job_id': 'job_id',
        'session_name': 'session_name',
        'operator_dag': 'operator_dag'
    }

    def __init__(self, id=None, name=None, job_id=None, session_name=None, operator_dag=None, local_vars_configuration=None):  # noqa: E501
        """DatasetDag - 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._job_id = None
        self._session_name = None
        self._operator_dag = None
        self.discriminator = None

        self.id = id
        self.name = name
        self.job_id = job_id
        self.session_name = session_name
        self.operator_dag = operator_dag

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


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

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


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


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

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


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


        :return: The job_id of this DatasetDag.  # noqa: E501
        :rtype: str
        """
        return self._job_id

    @job_id.setter
    def job_id(self, job_id):
        """Sets the job_id of this DatasetDag.


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

        self._job_id = job_id

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


        :return: The session_name of this DatasetDag.  # noqa: E501
        :rtype: str
        """
        return self._session_name

    @session_name.setter
    def session_name(self, session_name):
        """Sets the session_name of this DatasetDag.


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

        self._session_name = session_name

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


        :return: The operator_dag of this DatasetDag.  # noqa: E501
        :rtype: list[OperatorBranch]
        """
        return self._operator_dag

    @operator_dag.setter
    def operator_dag(self, operator_dag):
        """Sets the operator_dag of this DatasetDag.


        :param operator_dag: The operator_dag of this DatasetDag.  # noqa: E501
        :type: list[OperatorBranch]
        """
        if self.local_vars_configuration.client_side_validation and operator_dag is None:  # noqa: E501
            raise ValueError("Invalid value for `operator_dag`, must not be `None`")  # noqa: E501

        self._operator_dag = operator_dag

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

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