# coding: utf-8

"""
    Allegro REST API

    https://developer.allegro.pl/about  # noqa: E501

    OpenAPI spec version: latest
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class AdditionalServiceRequest(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 = {
        'definition': 'AdditionalServiceDefinitionRequest',
        'description': 'str',
        'configurations': 'list[Configuration]'
    }

    attribute_map = {
        'definition': 'definition',
        'description': 'description',
        'configurations': 'configurations'
    }

    def __init__(self, definition=None, description=None, configurations=None):  # noqa: E501
        """AdditionalServiceRequest - a model defined in OpenAPI"""  # noqa: E501

        self._definition = None
        self._description = None
        self._configurations = None
        self.discriminator = None

        self.definition = definition
        self.description = description
        self.configurations = configurations

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


        :return: The definition of this AdditionalServiceRequest.  # noqa: E501
        :rtype: AdditionalServiceDefinitionRequest
        """
        return self._definition

    @definition.setter
    def definition(self, definition):
        """Sets the definition of this AdditionalServiceRequest.


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

        self._definition = definition

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


        :return: The description of this AdditionalServiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this AdditionalServiceRequest.


        :param description: The description of this AdditionalServiceRequest.  # noqa: E501
        :type: str
        """
        if description is None:
            raise ValueError("Invalid value for `description`, must not be `None`")  # noqa: E501
        if description is not None and len(description) > 1000:
            raise ValueError("Invalid value for `description`, length must be less than or equal to `1000`")  # noqa: E501

        self._description = description

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


        :return: The configurations of this AdditionalServiceRequest.  # noqa: E501
        :rtype: list[Configuration]
        """
        return self._configurations

    @configurations.setter
    def configurations(self, configurations):
        """Sets the configurations of this AdditionalServiceRequest.


        :param configurations: The configurations of this AdditionalServiceRequest.  # noqa: E501
        :type: list[Configuration]
        """
        if configurations is None:
            raise ValueError("Invalid value for `configurations`, must not be `None`")  # noqa: E501

        self._configurations = configurations

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

        return self.__dict__ == other.__dict__

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