# coding: utf-8

"""
    Aron API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from vessl.openapi_client.configuration import Configuration


class V1ImportForm(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 = {
        'artifact': 'V1ImportableArtifactRefForm',
        'dataset': 'V1DatasetRefForm',
        'git': 'V1GitRefForm',
        'gs': 'V1GSRefForm',
        'hf': 'V1HuggingfaceRefForm',
        'model': 'V1ModelRefForm',
        'ref_type': 'str',
        's3': 'V1S3RefForm',
        'volume': 'V1VolumeV2ImportForm'
    }

    attribute_map = {
        'artifact': 'artifact',
        'dataset': 'dataset',
        'git': 'git',
        'gs': 'gs',
        'hf': 'hf',
        'model': 'model',
        'ref_type': 'ref_type',
        's3': 's3',
        'volume': 'volume'
    }

    def __init__(self, artifact=None, dataset=None, git=None, gs=None, hf=None, model=None, ref_type=None, s3=None, volume=None, local_vars_configuration=None):  # noqa: E501
        """V1ImportForm - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._artifact = None
        self._dataset = None
        self._git = None
        self._gs = None
        self._hf = None
        self._model = None
        self._ref_type = None
        self._s3 = None
        self._volume = None
        self.discriminator = None

        if artifact is not None:
            self.artifact = artifact
        if dataset is not None:
            self.dataset = dataset
        if git is not None:
            self.git = git
        if gs is not None:
            self.gs = gs
        if hf is not None:
            self.hf = hf
        if model is not None:
            self.model = model
        if ref_type is not None:
            self.ref_type = ref_type
        if s3 is not None:
            self.s3 = s3
        if volume is not None:
            self.volume = volume

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


        :return: The artifact of this V1ImportForm.  # noqa: E501
        :rtype: V1ImportableArtifactRefForm
        """
        return self._artifact

    @artifact.setter
    def artifact(self, artifact):
        """Sets the artifact of this V1ImportForm.


        :param artifact: The artifact of this V1ImportForm.  # noqa: E501
        :type artifact: V1ImportableArtifactRefForm
        """

        self._artifact = artifact

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


        :return: The dataset of this V1ImportForm.  # noqa: E501
        :rtype: V1DatasetRefForm
        """
        return self._dataset

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


        :param dataset: The dataset of this V1ImportForm.  # noqa: E501
        :type dataset: V1DatasetRefForm
        """

        self._dataset = dataset

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


        :return: The git of this V1ImportForm.  # noqa: E501
        :rtype: V1GitRefForm
        """
        return self._git

    @git.setter
    def git(self, git):
        """Sets the git of this V1ImportForm.


        :param git: The git of this V1ImportForm.  # noqa: E501
        :type git: V1GitRefForm
        """

        self._git = git

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


        :return: The gs of this V1ImportForm.  # noqa: E501
        :rtype: V1GSRefForm
        """
        return self._gs

    @gs.setter
    def gs(self, gs):
        """Sets the gs of this V1ImportForm.


        :param gs: The gs of this V1ImportForm.  # noqa: E501
        :type gs: V1GSRefForm
        """

        self._gs = gs

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


        :return: The hf of this V1ImportForm.  # noqa: E501
        :rtype: V1HuggingfaceRefForm
        """
        return self._hf

    @hf.setter
    def hf(self, hf):
        """Sets the hf of this V1ImportForm.


        :param hf: The hf of this V1ImportForm.  # noqa: E501
        :type hf: V1HuggingfaceRefForm
        """

        self._hf = hf

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


        :return: The model of this V1ImportForm.  # noqa: E501
        :rtype: V1ModelRefForm
        """
        return self._model

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


        :param model: The model of this V1ImportForm.  # noqa: E501
        :type model: V1ModelRefForm
        """

        self._model = model

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


        :return: The ref_type of this V1ImportForm.  # noqa: E501
        :rtype: str
        """
        return self._ref_type

    @ref_type.setter
    def ref_type(self, ref_type):
        """Sets the ref_type of this V1ImportForm.


        :param ref_type: The ref_type of this V1ImportForm.  # noqa: E501
        :type ref_type: str
        """
        allowed_values = ["git", "hf", "dataset", "model", "s3", "gs", "artifact", "volume-v2"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and ref_type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `ref_type` ({0}), must be one of {1}"  # noqa: E501
                .format(ref_type, allowed_values)
            )

        self._ref_type = ref_type

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


        :return: The s3 of this V1ImportForm.  # noqa: E501
        :rtype: V1S3RefForm
        """
        return self._s3

    @s3.setter
    def s3(self, s3):
        """Sets the s3 of this V1ImportForm.


        :param s3: The s3 of this V1ImportForm.  # noqa: E501
        :type s3: V1S3RefForm
        """

        self._s3 = s3

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


        :return: The volume of this V1ImportForm.  # noqa: E501
        :rtype: V1VolumeV2ImportForm
        """
        return self._volume

    @volume.setter
    def volume(self, volume):
        """Sets the volume of this V1ImportForm.


        :param volume: The volume of this V1ImportForm.  # noqa: E501
        :type volume: V1VolumeV2ImportForm
        """

        self._volume = volume

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, V1ImportForm):
            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, V1ImportForm):
            return True

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