# coding: utf-8

"""
    Curia Platform API

    These are the docs for the curia platform API. To test, generate an authorization token first.  # noqa: E501

    OpenAPI spec version: 1.26.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class ModelJob(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'id': 'str',
        'type': 'str',
        'outcome_type': 'str',
        'config': 'ModelJobConfig',
        'execution_id': 'str',
        'status': 'str',
        'project_id': 'str',
        'model_id': 'str',
        'model_batch_job_id': 'str',
        'model_batch_job': 'ModelBatchJob',
        'cohort_id': 'str',
        'dataset_id': 'str',
        'project': 'Project',
        'model': 'Model',
        'cohort': 'Cohort',
        'model_population_id': 'str',
        'model_population': 'ModelPopulation',
        'dataset': 'Dataset',
        'events': 'list[ModelJobEvent]',
        'outputs': 'list[ModelJobOutput]',
        'model_job_output_features': 'list[ModelJobOutputFeature]',
        'model_job_statuses': 'list[ModelJobStatus]',
        'feature_sub_categories': 'list[FeatureSubCategory]',
        'last_updated_by': 'str',
        'created_by': 'str',
        'created_at': 'datetime',
        'updated_at': 'datetime',
        'version': 'float'
    }

    attribute_map = {
        'id': 'id',
        'type': 'type',
        'outcome_type': 'outcomeType',
        'config': 'config',
        'execution_id': 'executionId',
        'status': 'status',
        'project_id': 'projectId',
        'model_id': 'modelId',
        'model_batch_job_id': 'modelBatchJobId',
        'model_batch_job': 'modelBatchJob',
        'cohort_id': 'cohortId',
        'dataset_id': 'datasetId',
        'project': 'project',
        'model': 'model',
        'cohort': 'cohort',
        'model_population_id': 'modelPopulationId',
        'model_population': 'modelPopulation',
        'dataset': 'dataset',
        'events': 'events',
        'outputs': 'outputs',
        'model_job_output_features': 'modelJobOutputFeatures',
        'model_job_statuses': 'modelJobStatuses',
        'feature_sub_categories': 'featureSubCategories',
        'last_updated_by': 'lastUpdatedBy',
        'created_by': 'createdBy',
        'created_at': 'createdAt',
        'updated_at': 'updatedAt',
        'version': 'version'
    }

    def __init__(self, id=None, type=None, outcome_type=None, config=None, execution_id=None, status=None, project_id=None, model_id=None, model_batch_job_id=None, model_batch_job=None, cohort_id=None, dataset_id=None, project=None, model=None, cohort=None, model_population_id=None, model_population=None, dataset=None, events=None, outputs=None, model_job_output_features=None, model_job_statuses=None, feature_sub_categories=None, last_updated_by=None, created_by=None, created_at=None, updated_at=None, version=None):  # noqa: E501
        """ModelJob - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._type = None
        self._outcome_type = None
        self._config = None
        self._execution_id = None
        self._status = None
        self._project_id = None
        self._model_id = None
        self._model_batch_job_id = None
        self._model_batch_job = None
        self._cohort_id = None
        self._dataset_id = None
        self._project = None
        self._model = None
        self._cohort = None
        self._model_population_id = None
        self._model_population = None
        self._dataset = None
        self._events = None
        self._outputs = None
        self._model_job_output_features = None
        self._model_job_statuses = None
        self._feature_sub_categories = None
        self._last_updated_by = None
        self._created_by = None
        self._created_at = None
        self._updated_at = None
        self._version = None
        self.discriminator = None
        if id is not None:
            self.id = id
        self.type = type
        if outcome_type is not None:
            self.outcome_type = outcome_type
        if config is not None:
            self.config = config
        if execution_id is not None:
            self.execution_id = execution_id
        if status is not None:
            self.status = status
        self.project_id = project_id
        self.model_id = model_id
        if model_batch_job_id is not None:
            self.model_batch_job_id = model_batch_job_id
        if model_batch_job is not None:
            self.model_batch_job = model_batch_job
        if cohort_id is not None:
            self.cohort_id = cohort_id
        if dataset_id is not None:
            self.dataset_id = dataset_id
        if project is not None:
            self.project = project
        if model is not None:
            self.model = model
        if cohort is not None:
            self.cohort = cohort
        if model_population_id is not None:
            self.model_population_id = model_population_id
        if model_population is not None:
            self.model_population = model_population
        if dataset is not None:
            self.dataset = dataset
        if events is not None:
            self.events = events
        if outputs is not None:
            self.outputs = outputs
        if model_job_output_features is not None:
            self.model_job_output_features = model_job_output_features
        if model_job_statuses is not None:
            self.model_job_statuses = model_job_statuses
        if feature_sub_categories is not None:
            self.feature_sub_categories = feature_sub_categories
        if last_updated_by is not None:
            self.last_updated_by = last_updated_by
        if created_by is not None:
            self.created_by = created_by
        if created_at is not None:
            self.created_at = created_at
        if updated_at is not None:
            self.updated_at = updated_at
        if version is not None:
            self.version = version

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


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

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


        :param id: The id of this ModelJob.  # noqa: E501
        :type: str
        """

        self._id = id

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


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

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


        :param type: The type of this ModelJob.  # noqa: E501
        :type: str
        """
        if type is None:
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501
        allowed_values = ["train", "predict"]  # noqa: E501
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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


        :return: The outcome_type of this ModelJob.  # noqa: E501
        :rtype: str
        """
        return self._outcome_type

    @outcome_type.setter
    def outcome_type(self, outcome_type):
        """Sets the outcome_type of this ModelJob.


        :param outcome_type: The outcome_type of this ModelJob.  # noqa: E501
        :type: str
        """
        allowed_values = ["regression", "occurrence"]  # noqa: E501
        if outcome_type not in allowed_values:
            raise ValueError(
                "Invalid value for `outcome_type` ({0}), must be one of {1}"  # noqa: E501
                .format(outcome_type, allowed_values)
            )

        self._outcome_type = outcome_type

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


        :return: The config of this ModelJob.  # noqa: E501
        :rtype: ModelJobConfig
        """
        return self._config

    @config.setter
    def config(self, config):
        """Sets the config of this ModelJob.


        :param config: The config of this ModelJob.  # noqa: E501
        :type: ModelJobConfig
        """

        self._config = config

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


        :return: The execution_id of this ModelJob.  # noqa: E501
        :rtype: str
        """
        return self._execution_id

    @execution_id.setter
    def execution_id(self, execution_id):
        """Sets the execution_id of this ModelJob.


        :param execution_id: The execution_id of this ModelJob.  # noqa: E501
        :type: str
        """

        self._execution_id = execution_id

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


        :return: The status of this ModelJob.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this ModelJob.


        :param status: The status of this ModelJob.  # noqa: E501
        :type: str
        """

        self._status = status

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


        :return: The project_id of this ModelJob.  # noqa: E501
        :rtype: str
        """
        return self._project_id

    @project_id.setter
    def project_id(self, project_id):
        """Sets the project_id of this ModelJob.


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

        self._project_id = project_id

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


        :return: The model_id of this ModelJob.  # noqa: E501
        :rtype: str
        """
        return self._model_id

    @model_id.setter
    def model_id(self, model_id):
        """Sets the model_id of this ModelJob.


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

        self._model_id = model_id

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


        :return: The model_batch_job_id of this ModelJob.  # noqa: E501
        :rtype: str
        """
        return self._model_batch_job_id

    @model_batch_job_id.setter
    def model_batch_job_id(self, model_batch_job_id):
        """Sets the model_batch_job_id of this ModelJob.


        :param model_batch_job_id: The model_batch_job_id of this ModelJob.  # noqa: E501
        :type: str
        """

        self._model_batch_job_id = model_batch_job_id

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


        :return: The model_batch_job of this ModelJob.  # noqa: E501
        :rtype: ModelBatchJob
        """
        return self._model_batch_job

    @model_batch_job.setter
    def model_batch_job(self, model_batch_job):
        """Sets the model_batch_job of this ModelJob.


        :param model_batch_job: The model_batch_job of this ModelJob.  # noqa: E501
        :type: ModelBatchJob
        """

        self._model_batch_job = model_batch_job

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


        :return: The cohort_id of this ModelJob.  # noqa: E501
        :rtype: str
        """
        return self._cohort_id

    @cohort_id.setter
    def cohort_id(self, cohort_id):
        """Sets the cohort_id of this ModelJob.


        :param cohort_id: The cohort_id of this ModelJob.  # noqa: E501
        :type: str
        """

        self._cohort_id = cohort_id

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


        :return: The dataset_id of this ModelJob.  # noqa: E501
        :rtype: str
        """
        return self._dataset_id

    @dataset_id.setter
    def dataset_id(self, dataset_id):
        """Sets the dataset_id of this ModelJob.


        :param dataset_id: The dataset_id of this ModelJob.  # noqa: E501
        :type: str
        """

        self._dataset_id = dataset_id

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


        :return: The project of this ModelJob.  # noqa: E501
        :rtype: Project
        """
        return self._project

    @project.setter
    def project(self, project):
        """Sets the project of this ModelJob.


        :param project: The project of this ModelJob.  # noqa: E501
        :type: Project
        """

        self._project = project

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


        :return: The model of this ModelJob.  # noqa: E501
        :rtype: Model
        """
        return self._model

    @model.setter
    def model(self, model):
        """Sets the model of this ModelJob.


        :param model: The model of this ModelJob.  # noqa: E501
        :type: Model
        """

        self._model = model

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


        :return: The cohort of this ModelJob.  # noqa: E501
        :rtype: Cohort
        """
        return self._cohort

    @cohort.setter
    def cohort(self, cohort):
        """Sets the cohort of this ModelJob.


        :param cohort: The cohort of this ModelJob.  # noqa: E501
        :type: Cohort
        """

        self._cohort = cohort

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


        :return: The model_population_id of this ModelJob.  # noqa: E501
        :rtype: str
        """
        return self._model_population_id

    @model_population_id.setter
    def model_population_id(self, model_population_id):
        """Sets the model_population_id of this ModelJob.


        :param model_population_id: The model_population_id of this ModelJob.  # noqa: E501
        :type: str
        """

        self._model_population_id = model_population_id

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


        :return: The model_population of this ModelJob.  # noqa: E501
        :rtype: ModelPopulation
        """
        return self._model_population

    @model_population.setter
    def model_population(self, model_population):
        """Sets the model_population of this ModelJob.


        :param model_population: The model_population of this ModelJob.  # noqa: E501
        :type: ModelPopulation
        """

        self._model_population = model_population

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


        :return: The dataset of this ModelJob.  # noqa: E501
        :rtype: Dataset
        """
        return self._dataset

    @dataset.setter
    def dataset(self, dataset):
        """Sets the dataset of this ModelJob.


        :param dataset: The dataset of this ModelJob.  # noqa: E501
        :type: Dataset
        """

        self._dataset = dataset

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


        :return: The events of this ModelJob.  # noqa: E501
        :rtype: list[ModelJobEvent]
        """
        return self._events

    @events.setter
    def events(self, events):
        """Sets the events of this ModelJob.


        :param events: The events of this ModelJob.  # noqa: E501
        :type: list[ModelJobEvent]
        """

        self._events = events

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


        :return: The outputs of this ModelJob.  # noqa: E501
        :rtype: list[ModelJobOutput]
        """
        return self._outputs

    @outputs.setter
    def outputs(self, outputs):
        """Sets the outputs of this ModelJob.


        :param outputs: The outputs of this ModelJob.  # noqa: E501
        :type: list[ModelJobOutput]
        """

        self._outputs = outputs

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


        :return: The model_job_output_features of this ModelJob.  # noqa: E501
        :rtype: list[ModelJobOutputFeature]
        """
        return self._model_job_output_features

    @model_job_output_features.setter
    def model_job_output_features(self, model_job_output_features):
        """Sets the model_job_output_features of this ModelJob.


        :param model_job_output_features: The model_job_output_features of this ModelJob.  # noqa: E501
        :type: list[ModelJobOutputFeature]
        """

        self._model_job_output_features = model_job_output_features

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


        :return: The model_job_statuses of this ModelJob.  # noqa: E501
        :rtype: list[ModelJobStatus]
        """
        return self._model_job_statuses

    @model_job_statuses.setter
    def model_job_statuses(self, model_job_statuses):
        """Sets the model_job_statuses of this ModelJob.


        :param model_job_statuses: The model_job_statuses of this ModelJob.  # noqa: E501
        :type: list[ModelJobStatus]
        """

        self._model_job_statuses = model_job_statuses

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


        :return: The feature_sub_categories of this ModelJob.  # noqa: E501
        :rtype: list[FeatureSubCategory]
        """
        return self._feature_sub_categories

    @feature_sub_categories.setter
    def feature_sub_categories(self, feature_sub_categories):
        """Sets the feature_sub_categories of this ModelJob.


        :param feature_sub_categories: The feature_sub_categories of this ModelJob.  # noqa: E501
        :type: list[FeatureSubCategory]
        """

        self._feature_sub_categories = feature_sub_categories

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


        :return: The last_updated_by of this ModelJob.  # noqa: E501
        :rtype: str
        """
        return self._last_updated_by

    @last_updated_by.setter
    def last_updated_by(self, last_updated_by):
        """Sets the last_updated_by of this ModelJob.


        :param last_updated_by: The last_updated_by of this ModelJob.  # noqa: E501
        :type: str
        """

        self._last_updated_by = last_updated_by

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


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

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


        :param created_by: The created_by of this ModelJob.  # noqa: E501
        :type: str
        """

        self._created_by = created_by

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


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

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


        :param created_at: The created_at of this ModelJob.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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


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

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


        :param updated_at: The updated_at of this ModelJob.  # noqa: E501
        :type: datetime
        """

        self._updated_at = updated_at

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


        :return: The version of this ModelJob.  # noqa: E501
        :rtype: float
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this ModelJob.


        :param version: The version of this ModelJob.  # noqa: E501
        :type: float
        """

        self._version = version

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

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(ModelJob, dict):
            for key, value in self.items():
                result[key] = 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, ModelJob):
            return False

        return self.__dict__ == other.__dict__

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