#!/usr/bin/python
#
# Copyright 2023 Kaggle Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# coding: utf-8

"""
    Kaggle API

    API for kaggle.com  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from kaggle.models.upload_file import UploadFile  # noqa: F401,E501


class ModelNewInstanceRequest(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 = {
        'instance_slug': 'str',
        'framework': 'str',
        'overview': 'str',
        'usage': 'str',
        'license_name': 'str',
        'fine_tunable': 'bool',
        'training_data': 'list[str]',
        'files': 'list[UploadFile]'
    }

    attribute_map = {
        'instance_slug': 'instanceSlug',
        'framework': 'framework',
        'overview': 'overview',
        'usage': 'usage',
        'license_name': 'licenseName',
        'fine_tunable': 'fineTunable',
        'training_data': 'trainingData',
        'files': 'files'
    }

    def __init__(self, instance_slug=None, framework=None, overview=None, usage=None, license_name='Apache 2.0', fine_tunable=True, training_data=None, files=None):  # noqa: E501
        """ModelNewInstanceRequest - a model defined in Swagger"""  # noqa: E501

        self._instance_slug = None
        self._framework = None
        self._overview = None
        self._usage = None
        self._license_name = None
        self._fine_tunable = None
        self._training_data = None
        self._files = None
        self.discriminator = None

        self.instance_slug = instance_slug
        self.framework = framework
        if overview is not None:
            self.overview = overview
        if usage is not None:
            self.usage = usage
        self.license_name = license_name
        if fine_tunable is not None:
            self.fine_tunable = fine_tunable
        if training_data is not None:
            self.training_data = training_data
        if files is not None:
            self.files = files

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

        The slug that the model instance should be created with  # noqa: E501

        :return: The instance_slug of this ModelNewInstanceRequest.  # noqa: E501
        :rtype: str
        """
        return self._instance_slug

    @instance_slug.setter
    def instance_slug(self, instance_slug):
        """Sets the instance_slug of this ModelNewInstanceRequest.

        The slug that the model instance should be created with  # noqa: E501

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

        self._instance_slug = instance_slug

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

        The framework of the model instance  # noqa: E501

        :return: The framework of this ModelNewInstanceRequest.  # noqa: E501
        :rtype: str
        """
        return self._framework

    @framework.setter
    def framework(self, framework):
        """Sets the framework of this ModelNewInstanceRequest.

        The framework of the model instance  # noqa: E501

        :param framework: The framework of this ModelNewInstanceRequest.  # noqa: E501
        :type: str
        """
        if framework is None:
            raise ValueError("Invalid value for `framework`, must not be `None`")  # noqa: E501
        allowed_values = ["tensorFlow1", "tensorFlow2", "tfLite", "tfJs", "pyTorch", "jax", "coral", "scikitLearn", "mxnet", "onnx"]  # noqa: E501
        if framework not in allowed_values:
            raise ValueError(
                "Invalid value for `framework` ({0}), must be one of {1}"  # noqa: E501
                .format(framework, allowed_values)
            )

        self._framework = framework

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

        The overview of the model instance (markdown)  # noqa: E501

        :return: The overview of this ModelNewInstanceRequest.  # noqa: E501
        :rtype: str
        """
        return self._overview

    @overview.setter
    def overview(self, overview):
        """Sets the overview of this ModelNewInstanceRequest.

        The overview of the model instance (markdown)  # noqa: E501

        :param overview: The overview of this ModelNewInstanceRequest.  # noqa: E501
        :type: str
        """

        self._overview = overview

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

        The description of how to use the model instance (markdown)  # noqa: E501

        :return: The usage of this ModelNewInstanceRequest.  # noqa: E501
        :rtype: str
        """
        return self._usage

    @usage.setter
    def usage(self, usage):
        """Sets the usage of this ModelNewInstanceRequest.

        The description of how to use the model instance (markdown)  # noqa: E501

        :param usage: The usage of this ModelNewInstanceRequest.  # noqa: E501
        :type: str
        """

        self._usage = usage

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

        The license that should be associated with the model  # noqa: E501

        :return: The license_name of this ModelNewInstanceRequest.  # noqa: E501
        :rtype: str
        """
        return self._license_name

    @license_name.setter
    def license_name(self, license_name):
        """Sets the license_name of this ModelNewInstanceRequest.

        The license that should be associated with the model  # noqa: E501

        :param license_name: The license_name of this ModelNewInstanceRequest.  # noqa: E501
        :type: str
        """
        if license_name is None:
            raise ValueError("Invalid value for `license_name`, must not be `None`")  # noqa: E501
        allowed_values = ["CC BY-NC-SA 4.0", "CC BY-SA 4.0", "GPL 2", "CC BY-SA 3.0", "Attribution 4.0 International (CC BY 4.0)", "Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)", "ODC Public Domain Dedication and Licence (PDDL)", "Attribution 3.0 Unported (CC BY 3.0)", "Attribution 3.0 IGO (CC BY 3.0 IGO)", "Attribution-NonCommercial-ShareAlike 3.0 IGO (CC BY-NC-SA 3.0 IGO)", "Community Data License Agreement - Permissive - Version 1.0", "Community Data License Agreement - Sharing - Version 1.0", "Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)", "Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)", "ODC Attribution License (ODC-By)", "GNU Lesser General Public License 3.0", "GNU Affero General Public License 3.0", "GNU Free Documentation License 1.3", "Apache 2.0", "MIT", "BSD-3-Clause"]  # noqa: E501
        if license_name not in allowed_values:
            raise ValueError(
                "Invalid value for `license_name` ({0}), must be one of {1}"  # noqa: E501
                .format(license_name, allowed_values)
            )

        self._license_name = license_name

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

        Whether the model instance is fine tunable  # noqa: E501

        :return: The fine_tunable of this ModelNewInstanceRequest.  # noqa: E501
        :rtype: bool
        """
        return self._fine_tunable

    @fine_tunable.setter
    def fine_tunable(self, fine_tunable):
        """Sets the fine_tunable of this ModelNewInstanceRequest.

        Whether the model instance is fine tunable  # noqa: E501

        :param fine_tunable: The fine_tunable of this ModelNewInstanceRequest.  # noqa: E501
        :type: bool
        """

        self._fine_tunable = fine_tunable

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

        A list of training data (urls or names)  # noqa: E501

        :return: The training_data of this ModelNewInstanceRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._training_data

    @training_data.setter
    def training_data(self, training_data):
        """Sets the training_data of this ModelNewInstanceRequest.

        A list of training data (urls or names)  # noqa: E501

        :param training_data: The training_data of this ModelNewInstanceRequest.  # noqa: E501
        :type: list[str]
        """

        self._training_data = training_data

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

        A list of files that should be associated with the model instance version  # noqa: E501

        :return: The files of this ModelNewInstanceRequest.  # noqa: E501
        :rtype: list[UploadFile]
        """
        return self._files

    @files.setter
    def files(self, files):
        """Sets the files of this ModelNewInstanceRequest.

        A list of files that should be associated with the model instance version  # noqa: E501

        :param files: The files of this ModelNewInstanceRequest.  # noqa: E501
        :type: list[UploadFile]
        """

        self._files = files

    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

        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, ModelNewInstanceRequest):
            return False

        return self.__dict__ == other.__dict__

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