# coding: utf-8

"""
    EPIC API

    REST API for interacting with EPIC (https://epic.zenotech.com) services. <br />                             Please note this API is in BETA and does not yet contain                             all EPIC functionality.  # noqa: E501

    The version of the OpenAPI document: v2
    Contact: support@zenotech.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from epiccore.configuration import Configuration


class JobDataBinding(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',
        'spec': 'JobSpec',
        'app_options': 'object',
        'cluster': 'JobClusterSpec',
        'input_data': 'DataSpec'
    }

    attribute_map = {
        'name': 'name',
        'spec': 'spec',
        'app_options': 'app_options',
        'cluster': 'cluster',
        'input_data': 'input_data'
    }

    def __init__(self, name=None, spec=None, app_options=None, cluster=None, input_data=None, local_vars_configuration=None):  # noqa: E501
        """JobDataBinding - 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._name = None
        self._spec = None
        self._app_options = None
        self._cluster = None
        self._input_data = None
        self.discriminator = None

        self.name = name
        self.spec = spec
        self.app_options = app_options
        self.cluster = cluster
        self.input_data = input_data

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

        Name for this job  # noqa: E501

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

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

        Name for this job  # noqa: E501

        :param name: The name of this JobDataBinding.  # noqa: E501
        :type name: 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
        if (self.local_vars_configuration.client_side_validation and
                name is not None and len(name) < 1):
            raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`")  # noqa: E501

        self._name = name

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


        :return: The spec of this JobDataBinding.  # noqa: E501
        :rtype: JobSpec
        """
        return self._spec

    @spec.setter
    def spec(self, spec):
        """Sets the spec of this JobDataBinding.


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

        self._spec = spec

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

        Application specific options  # noqa: E501

        :return: The app_options of this JobDataBinding.  # noqa: E501
        :rtype: object
        """
        return self._app_options

    @app_options.setter
    def app_options(self, app_options):
        """Sets the app_options of this JobDataBinding.

        Application specific options  # noqa: E501

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

        self._app_options = app_options

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


        :return: The cluster of this JobDataBinding.  # noqa: E501
        :rtype: JobClusterSpec
        """
        return self._cluster

    @cluster.setter
    def cluster(self, cluster):
        """Sets the cluster of this JobDataBinding.


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

        self._cluster = cluster

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


        :return: The input_data of this JobDataBinding.  # noqa: E501
        :rtype: DataSpec
        """
        return self._input_data

    @input_data.setter
    def input_data(self, input_data):
        """Sets the input_data of this JobDataBinding.


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

        self._input_data = input_data

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

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