# 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 PlatformFineTuningJob(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 = {
        'result_files': 'list[str]',
        'trained_tokens': 'int',
        'hyperparameters': 'CreateFineTuningHyperparameters',
        'training_file': 'str',
        'validation_file': 'str',
        'model': 'str',
        'id': 'str',
        'created_at': 'datetime',
        'finished_at': 'datetime',
        'fine_tuned_model': 'str',
        'status': 'FineTuningJobStatus',
        'error': 'str',
        'creator_id': 'str',
        'cloud_id': 'str',
        'creator_email': 'str',
        'ha_job_id': 'str'
    }

    attribute_map = {
        'result_files': 'result_files',
        'trained_tokens': 'trained_tokens',
        'hyperparameters': 'hyperparameters',
        'training_file': 'training_file',
        'validation_file': 'validation_file',
        'model': 'model',
        'id': 'id',
        'created_at': 'created_at',
        'finished_at': 'finished_at',
        'fine_tuned_model': 'fine_tuned_model',
        'status': 'status',
        'error': 'error',
        'creator_id': 'creator_id',
        'cloud_id': 'cloud_id',
        'creator_email': 'creator_email',
        'ha_job_id': 'ha_job_id'
    }

    def __init__(self, result_files=[], trained_tokens=None, hyperparameters=None, training_file=None, validation_file=None, model=None, id=None, created_at=None, finished_at=None, fine_tuned_model=None, status=None, error=None, creator_id=None, cloud_id=None, creator_email=None, ha_job_id=None, local_vars_configuration=None):  # noqa: E501
        """PlatformFineTuningJob - 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._result_files = None
        self._trained_tokens = None
        self._hyperparameters = None
        self._training_file = None
        self._validation_file = None
        self._model = None
        self._id = None
        self._created_at = None
        self._finished_at = None
        self._fine_tuned_model = None
        self._status = None
        self._error = None
        self._creator_id = None
        self._cloud_id = None
        self._creator_email = None
        self._ha_job_id = None
        self.discriminator = None

        if result_files is not None:
            self.result_files = result_files
        if trained_tokens is not None:
            self.trained_tokens = trained_tokens
        if hyperparameters is not None:
            self.hyperparameters = hyperparameters
        self.training_file = training_file
        if validation_file is not None:
            self.validation_file = validation_file
        self.model = model
        self.id = id
        self.created_at = created_at
        if finished_at is not None:
            self.finished_at = finished_at
        self.fine_tuned_model = fine_tuned_model
        self.status = status
        if error is not None:
            self.error = error
        self.creator_id = creator_id
        self.cloud_id = cloud_id
        self.creator_email = creator_email
        if ha_job_id is not None:
            self.ha_job_id = ha_job_id

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

        Array with the ID of the .json file that contains finetuning results. Available after the job is `running`  # noqa: E501

        :return: The result_files of this PlatformFineTuningJob.  # noqa: E501
        :rtype: list[str]
        """
        return self._result_files

    @result_files.setter
    def result_files(self, result_files):
        """Sets the result_files of this PlatformFineTuningJob.

        Array with the ID of the .json file that contains finetuning results. Available after the job is `running`  # noqa: E501

        :param result_files: The result_files of this PlatformFineTuningJob.  # noqa: E501
        :type: list[str]
        """

        self._result_files = result_files

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

        Number of tokens trained on. Available after the job is `succeeded`  # noqa: E501

        :return: The trained_tokens of this PlatformFineTuningJob.  # noqa: E501
        :rtype: int
        """
        return self._trained_tokens

    @trained_tokens.setter
    def trained_tokens(self, trained_tokens):
        """Sets the trained_tokens of this PlatformFineTuningJob.

        Number of tokens trained on. Available after the job is `succeeded`  # noqa: E501

        :param trained_tokens: The trained_tokens of this PlatformFineTuningJob.  # noqa: E501
        :type: int
        """

        self._trained_tokens = trained_tokens

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

        Hyperparameters used for fine-tuning.  # noqa: E501

        :return: The hyperparameters of this PlatformFineTuningJob.  # noqa: E501
        :rtype: CreateFineTuningHyperparameters
        """
        return self._hyperparameters

    @hyperparameters.setter
    def hyperparameters(self, hyperparameters):
        """Sets the hyperparameters of this PlatformFineTuningJob.

        Hyperparameters used for fine-tuning.  # noqa: E501

        :param hyperparameters: The hyperparameters of this PlatformFineTuningJob.  # noqa: E501
        :type: CreateFineTuningHyperparameters
        """

        self._hyperparameters = hyperparameters

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

        ID of the .jsonl file used for training  # noqa: E501

        :return: The training_file of this PlatformFineTuningJob.  # noqa: E501
        :rtype: str
        """
        return self._training_file

    @training_file.setter
    def training_file(self, training_file):
        """Sets the training_file of this PlatformFineTuningJob.

        ID of the .jsonl file used for training  # noqa: E501

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

        self._training_file = training_file

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

        ID of the .jsonl file used for validation. Optional  # noqa: E501

        :return: The validation_file of this PlatformFineTuningJob.  # noqa: E501
        :rtype: str
        """
        return self._validation_file

    @validation_file.setter
    def validation_file(self, validation_file):
        """Sets the validation_file of this PlatformFineTuningJob.

        ID of the .jsonl file used for validation. Optional  # noqa: E501

        :param validation_file: The validation_file of this PlatformFineTuningJob.  # noqa: E501
        :type: str
        """

        self._validation_file = validation_file

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

        A supported model used as a base for fine-tuning  # noqa: E501

        :return: The model of this PlatformFineTuningJob.  # noqa: E501
        :rtype: str
        """
        return self._model

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

        A supported model used as a base for fine-tuning  # noqa: E501

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

        self._model = model

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

        The ID of the fine-tuning job  # noqa: E501

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

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

        The ID of the fine-tuning job  # noqa: E501

        :param id: The id of this PlatformFineTuningJob.  # 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 created_at(self):
        """Gets the created_at of this PlatformFineTuningJob.  # noqa: E501

        The time the job was submitted  # noqa: E501

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

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

        The time the job was submitted  # noqa: E501

        :param created_at: The created_at of this PlatformFineTuningJob.  # 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 finished_at(self):
        """Gets the finished_at of this PlatformFineTuningJob.  # noqa: E501

        The time the job finished  # noqa: E501

        :return: The finished_at of this PlatformFineTuningJob.  # noqa: E501
        :rtype: datetime
        """
        return self._finished_at

    @finished_at.setter
    def finished_at(self, finished_at):
        """Sets the finished_at of this PlatformFineTuningJob.

        The time the job finished  # noqa: E501

        :param finished_at: The finished_at of this PlatformFineTuningJob.  # noqa: E501
        :type: datetime
        """

        self._finished_at = finished_at

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

        A generated ID of the fine-tuned model  # noqa: E501

        :return: The fine_tuned_model of this PlatformFineTuningJob.  # noqa: E501
        :rtype: str
        """
        return self._fine_tuned_model

    @fine_tuned_model.setter
    def fine_tuned_model(self, fine_tuned_model):
        """Sets the fine_tuned_model of this PlatformFineTuningJob.

        A generated ID of the fine-tuned model  # noqa: E501

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

        self._fine_tuned_model = fine_tuned_model

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

        The current status of the job  # noqa: E501

        :return: The status of this PlatformFineTuningJob.  # noqa: E501
        :rtype: FineTuningJobStatus
        """
        return self._status

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

        The current status of the job  # noqa: E501

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

        self._status = status

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

        Error message. Available if the job is `failed`  # noqa: E501

        :return: The error of this PlatformFineTuningJob.  # noqa: E501
        :rtype: str
        """
        return self._error

    @error.setter
    def error(self, error):
        """Sets the error of this PlatformFineTuningJob.

        Error message. Available if the job is `failed`  # noqa: E501

        :param error: The error of this PlatformFineTuningJob.  # noqa: E501
        :type: str
        """

        self._error = error

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

        The ID of the user who submitted the job  # noqa: E501

        :return: The creator_id of this PlatformFineTuningJob.  # noqa: E501
        :rtype: str
        """
        return self._creator_id

    @creator_id.setter
    def creator_id(self, creator_id):
        """Sets the creator_id of this PlatformFineTuningJob.

        The ID of the user who submitted the job  # noqa: E501

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

        self._creator_id = creator_id

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

        Cloud id fo the FT job  # noqa: E501

        :return: The cloud_id of this PlatformFineTuningJob.  # noqa: E501
        :rtype: str
        """
        return self._cloud_id

    @cloud_id.setter
    def cloud_id(self, cloud_id):
        """Sets the cloud_id of this PlatformFineTuningJob.

        Cloud id fo the FT job  # noqa: E501

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

        self._cloud_id = cloud_id

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

        Email of user who triggered the fine tuning job.  # noqa: E501

        :return: The creator_email of this PlatformFineTuningJob.  # noqa: E501
        :rtype: str
        """
        return self._creator_email

    @creator_email.setter
    def creator_email(self, creator_email):
        """Sets the creator_email of this PlatformFineTuningJob.

        Email of user who triggered the fine tuning job.  # noqa: E501

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

        self._creator_email = creator_email

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


        :return: The ha_job_id of this PlatformFineTuningJob.  # noqa: E501
        :rtype: str
        """
        return self._ha_job_id

    @ha_job_id.setter
    def ha_job_id(self, ha_job_id):
        """Sets the ha_job_id of this PlatformFineTuningJob.


        :param ha_job_id: The ha_job_id of this PlatformFineTuningJob.  # noqa: E501
        :type: str
        """

        self._ha_job_id = ha_job_id

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

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