# 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 CreateFineTuningJobProductRequest(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 = {
        'training_file': 'str',
        'validation_file': 'str',
        'hyperparameters': 'CreateFineTuningHyperparameters',
        'model': 'str',
        'suffix': 'str',
        'cloud_id': 'str',
        'version': 'str',
        'instance_type': 'str',
        'batch_size_per_device': 'int'
    }

    attribute_map = {
        'training_file': 'training_file',
        'validation_file': 'validation_file',
        'hyperparameters': 'hyperparameters',
        'model': 'model',
        'suffix': 'suffix',
        'cloud_id': 'cloud_id',
        'version': 'version',
        'instance_type': 'instance_type',
        'batch_size_per_device': 'batch_size_per_device'
    }

    def __init__(self, training_file=None, validation_file=None, hyperparameters=None, model=None, suffix=None, cloud_id=None, version=None, instance_type=None, batch_size_per_device=None, local_vars_configuration=None):  # noqa: E501
        """CreateFineTuningJobProductRequest - 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._training_file = None
        self._validation_file = None
        self._hyperparameters = None
        self._model = None
        self._suffix = None
        self._cloud_id = None
        self._version = None
        self._instance_type = None
        self._batch_size_per_device = None
        self.discriminator = None

        self.training_file = training_file
        if validation_file is not None:
            self.validation_file = validation_file
        if hyperparameters is not None:
            self.hyperparameters = hyperparameters
        self.model = model
        if suffix is not None:
            self.suffix = suffix
        self.cloud_id = cloud_id
        if version is not None:
            self.version = version
        if instance_type is not None:
            self.instance_type = instance_type
        if batch_size_per_device is not None:
            self.batch_size_per_device = batch_size_per_device

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

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

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

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

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

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

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

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

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

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

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

        self._validation_file = validation_file

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

        Hyperparameters used for fine-tuning.  # noqa: E501

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

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

        Hyperparameters used for fine-tuning.  # noqa: E501

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

        self._hyperparameters = hyperparameters

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

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

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

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

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

        :param model: The model of this CreateFineTuningJobProductRequest.  # 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 suffix(self):
        """Gets the suffix of this CreateFineTuningJobProductRequest.  # noqa: E501

        A suffix (along with a hash) that will be appended to the model to create `fine_tuned_model`. Optional.  # noqa: E501

        :return: The suffix of this CreateFineTuningJobProductRequest.  # noqa: E501
        :rtype: str
        """
        return self._suffix

    @suffix.setter
    def suffix(self, suffix):
        """Sets the suffix of this CreateFineTuningJobProductRequest.

        A suffix (along with a hash) that will be appended to the model to create `fine_tuned_model`. Optional.  # noqa: E501

        :param suffix: The suffix of this CreateFineTuningJobProductRequest.  # noqa: E501
        :type: str
        """

        self._suffix = suffix

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


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

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


        :param cloud_id: The cloud_id of this CreateFineTuningJobProductRequest.  # 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 version(self):
        """Gets the version of this CreateFineTuningJobProductRequest.  # noqa: E501

        The version of llmforge to use. If not specified, the latest version will be used. This version dictates the minimum Endpoint version needed to serve the produced fine-tuned model.  # noqa: E501

        :return: The version of this CreateFineTuningJobProductRequest.  # noqa: E501
        :rtype: str
        """
        return self._version

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

        The version of llmforge to use. If not specified, the latest version will be used. This version dictates the minimum Endpoint version needed to serve the produced fine-tuned model.  # noqa: E501

        :param version: The version of this CreateFineTuningJobProductRequest.  # noqa: E501
        :type: str
        """

        self._version = version

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

        The instance type to use for the fine-tuning job.  # noqa: E501

        :return: The instance_type of this CreateFineTuningJobProductRequest.  # noqa: E501
        :rtype: str
        """
        return self._instance_type

    @instance_type.setter
    def instance_type(self, instance_type):
        """Sets the instance_type of this CreateFineTuningJobProductRequest.

        The instance type to use for the fine-tuning job.  # noqa: E501

        :param instance_type: The instance_type of this CreateFineTuningJobProductRequest.  # noqa: E501
        :type: str
        """
        allowed_values = ["p4de.24xlarge", "p4d.24xlarge", "g5.12xlarge", "g5.4xlarge"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and instance_type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `instance_type` ({0}), must be one of {1}"  # noqa: E501
                .format(instance_type, allowed_values)
            )

        self._instance_type = instance_type

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

        The number of samples that are processed by the model in a single iteration in training and evaluation.  # noqa: E501

        :return: The batch_size_per_device of this CreateFineTuningJobProductRequest.  # noqa: E501
        :rtype: int
        """
        return self._batch_size_per_device

    @batch_size_per_device.setter
    def batch_size_per_device(self, batch_size_per_device):
        """Sets the batch_size_per_device of this CreateFineTuningJobProductRequest.

        The number of samples that are processed by the model in a single iteration in training and evaluation.  # noqa: E501

        :param batch_size_per_device: The batch_size_per_device of this CreateFineTuningJobProductRequest.  # noqa: E501
        :type: int
        """

        self._batch_size_per_device = batch_size_per_device

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

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