# coding: utf-8

"""
    Nexus Repository Manager REST API

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

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


import pprint
import re  # noqa: F401

import six

from nexus_api_python_client.configuration import Configuration


class UploadDefinitionXO(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 = {
        'format': 'str',
        'multiple_upload': 'bool',
        'component_fields': 'list[UploadFieldDefinitionXO]',
        'asset_fields': 'list[UploadFieldDefinitionXO]'
    }

    attribute_map = {
        'format': 'format',
        'multiple_upload': 'multipleUpload',
        'component_fields': 'componentFields',
        'asset_fields': 'assetFields'
    }

    def __init__(self, format=None, multiple_upload=None, component_fields=None, asset_fields=None, local_vars_configuration=None):  # noqa: E501
        """UploadDefinitionXO - 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._format = None
        self._multiple_upload = None
        self._component_fields = None
        self._asset_fields = None
        self.discriminator = None

        if format is not None:
            self.format = format
        if multiple_upload is not None:
            self.multiple_upload = multiple_upload
        if component_fields is not None:
            self.component_fields = component_fields
        if asset_fields is not None:
            self.asset_fields = asset_fields

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


        :return: The format of this UploadDefinitionXO.  # noqa: E501
        :rtype: str
        """
        return self._format

    @format.setter
    def format(self, format):
        """Sets the format of this UploadDefinitionXO.


        :param format: The format of this UploadDefinitionXO.  # noqa: E501
        :type: str
        """

        self._format = format

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


        :return: The multiple_upload of this UploadDefinitionXO.  # noqa: E501
        :rtype: bool
        """
        return self._multiple_upload

    @multiple_upload.setter
    def multiple_upload(self, multiple_upload):
        """Sets the multiple_upload of this UploadDefinitionXO.


        :param multiple_upload: The multiple_upload of this UploadDefinitionXO.  # noqa: E501
        :type: bool
        """

        self._multiple_upload = multiple_upload

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


        :return: The component_fields of this UploadDefinitionXO.  # noqa: E501
        :rtype: list[UploadFieldDefinitionXO]
        """
        return self._component_fields

    @component_fields.setter
    def component_fields(self, component_fields):
        """Sets the component_fields of this UploadDefinitionXO.


        :param component_fields: The component_fields of this UploadDefinitionXO.  # noqa: E501
        :type: list[UploadFieldDefinitionXO]
        """

        self._component_fields = component_fields

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


        :return: The asset_fields of this UploadDefinitionXO.  # noqa: E501
        :rtype: list[UploadFieldDefinitionXO]
        """
        return self._asset_fields

    @asset_fields.setter
    def asset_fields(self, asset_fields):
        """Sets the asset_fields of this UploadDefinitionXO.


        :param asset_fields: The asset_fields of this UploadDefinitionXO.  # noqa: E501
        :type: list[UploadFieldDefinitionXO]
        """

        self._asset_fields = asset_fields

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

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