# coding: utf-8

"""
    Cyclos 4.11.5 API

    The REST API for Cyclos 4.11.5  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from swagger_client.configuration import Configuration


class UserAddressesListData(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 = {
        'can_manage': 'bool',
        'can_create': 'bool',
        'max_addresses': 'int',
        'availability': 'AvailabilityEnum',
        'addresses': 'list[AddressResult]'
    }

    attribute_map = {
        'can_manage': 'canManage',
        'can_create': 'canCreate',
        'max_addresses': 'maxAddresses',
        'availability': 'availability',
        'addresses': 'addresses'
    }

    def __init__(self, can_manage=None, can_create=None, max_addresses=None, availability=None, addresses=None, _configuration=None):  # noqa: E501
        """UserAddressesListData - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._can_manage = None
        self._can_create = None
        self._max_addresses = None
        self._availability = None
        self._addresses = None
        self.discriminator = None

        if can_manage is not None:
            self.can_manage = can_manage
        if can_create is not None:
            self.can_create = can_create
        if max_addresses is not None:
            self.max_addresses = max_addresses
        if availability is not None:
            self.availability = availability
        if addresses is not None:
            self.addresses = addresses

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

        Indicates whether the addresses can be managed by the authenticated user   # noqa: E501

        :return: The can_manage of this UserAddressesListData.  # noqa: E501
        :rtype: bool
        """
        return self._can_manage

    @can_manage.setter
    def can_manage(self, can_manage):
        """Sets the can_manage of this UserAddressesListData.

        Indicates whether the addresses can be managed by the authenticated user   # noqa: E501

        :param can_manage: The can_manage of this UserAddressesListData.  # noqa: E501
        :type: bool
        """

        self._can_manage = can_manage

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

        Indicates whether the authenticated user can create a new address for this user   # noqa: E501

        :return: The can_create of this UserAddressesListData.  # noqa: E501
        :rtype: bool
        """
        return self._can_create

    @can_create.setter
    def can_create(self, can_create):
        """Sets the can_create of this UserAddressesListData.

        Indicates whether the authenticated user can create a new address for this user   # noqa: E501

        :param can_create: The can_create of this UserAddressesListData.  # noqa: E501
        :type: bool
        """

        self._can_create = can_create

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

        Indicates the maximum number of addresses the user can have   # noqa: E501

        :return: The max_addresses of this UserAddressesListData.  # noqa: E501
        :rtype: int
        """
        return self._max_addresses

    @max_addresses.setter
    def max_addresses(self, max_addresses):
        """Sets the max_addresses of this UserAddressesListData.

        Indicates the maximum number of addresses the user can have   # noqa: E501

        :param max_addresses: The max_addresses of this UserAddressesListData.  # noqa: E501
        :type: int
        """

        self._max_addresses = max_addresses

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

        The availability for addresses Possible values are: * disabled: The data is disabled * optional: The data is enabled and optional * required: The data is enabled and required   # noqa: E501

        :return: The availability of this UserAddressesListData.  # noqa: E501
        :rtype: AvailabilityEnum
        """
        return self._availability

    @availability.setter
    def availability(self, availability):
        """Sets the availability of this UserAddressesListData.

        The availability for addresses Possible values are: * disabled: The data is disabled * optional: The data is enabled and optional * required: The data is enabled and required   # noqa: E501

        :param availability: The availability of this UserAddressesListData.  # noqa: E501
        :type: AvailabilityEnum
        """

        self._availability = availability

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

        The address list  # noqa: E501

        :return: The addresses of this UserAddressesListData.  # noqa: E501
        :rtype: list[AddressResult]
        """
        return self._addresses

    @addresses.setter
    def addresses(self, addresses):
        """Sets the addresses of this UserAddressesListData.

        The address list  # noqa: E501

        :param addresses: The addresses of this UserAddressesListData.  # noqa: E501
        :type: list[AddressResult]
        """

        self._addresses = addresses

    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
        if issubclass(UserAddressesListData, dict):
            for key, value in self.items():
                result[key] = 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, UserAddressesListData):
            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, UserAddressesListData):
            return True

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