# coding: utf-8

"""
    Fingerprint Pro Server API

    Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device.   # noqa: E501

    OpenAPI spec version: 3
    Contact: support@fingerprint.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class IPLocation(object):
    """
    This field is **deprecated** and will not return a result for **accounts created after December 18th, 2023**. Please use the [`ipInfo` Smart signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) for geolocation information.

    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 = {
        'accuracy_radius': 'int',
        'latitude': 'float',
        'longitude': 'float',
        'postal_code': 'str',
        'timezone': 'str',
        'city': 'IPLocationCity',
        'country': 'Location',
        'continent': 'Location',
        'subdivisions': 'list[Subdivision]'
    }

    attribute_map = {
        'accuracy_radius': 'accuracyRadius',
        'latitude': 'latitude',
        'longitude': 'longitude',
        'postal_code': 'postalCode',
        'timezone': 'timezone',
        'city': 'city',
        'country': 'country',
        'continent': 'continent',
        'subdivisions': 'subdivisions'
    }

    def __init__(self, accuracy_radius=None, latitude=None, longitude=None, postal_code=None, timezone=None, city=None, country=None, continent=None, subdivisions=None):  # noqa: E501
        """IPLocation - a model defined in Swagger"""  # noqa: E501
        self._accuracy_radius = None
        self._latitude = None
        self._longitude = None
        self._postal_code = None
        self._timezone = None
        self._city = None
        self._country = None
        self._continent = None
        self._subdivisions = None
        self.discriminator = None
        if accuracy_radius is not None:
            self.accuracy_radius = accuracy_radius
        if latitude is not None:
            self.latitude = latitude
        if longitude is not None:
            self.longitude = longitude
        if postal_code is not None:
            self.postal_code = postal_code
        if timezone is not None:
            self.timezone = timezone
        if city is not None:
            self.city = city
        if country is not None:
            self.country = country
        if continent is not None:
            self.continent = continent
        if subdivisions is not None:
            self.subdivisions = subdivisions

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

        The IP address is likely to be within this radius (in km) of the specified location.  # noqa: E501

        :return: The accuracy_radius of this IPLocation.  # noqa: E501
        :rtype: int
        """
        return self._accuracy_radius

    @accuracy_radius.setter
    def accuracy_radius(self, accuracy_radius):
        """Sets the accuracy_radius of this IPLocation.

        The IP address is likely to be within this radius (in km) of the specified location.  # noqa: E501

        :param accuracy_radius: The accuracy_radius of this IPLocation.  # noqa: E501
        :type: int
        """

        self._accuracy_radius = accuracy_radius

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


        :return: The latitude of this IPLocation.  # noqa: E501
        :rtype: float
        """
        return self._latitude

    @latitude.setter
    def latitude(self, latitude):
        """Sets the latitude of this IPLocation.


        :param latitude: The latitude of this IPLocation.  # noqa: E501
        :type: float
        """

        self._latitude = latitude

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


        :return: The longitude of this IPLocation.  # noqa: E501
        :rtype: float
        """
        return self._longitude

    @longitude.setter
    def longitude(self, longitude):
        """Sets the longitude of this IPLocation.


        :param longitude: The longitude of this IPLocation.  # noqa: E501
        :type: float
        """

        self._longitude = longitude

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


        :return: The postal_code of this IPLocation.  # noqa: E501
        :rtype: str
        """
        return self._postal_code

    @postal_code.setter
    def postal_code(self, postal_code):
        """Sets the postal_code of this IPLocation.


        :param postal_code: The postal_code of this IPLocation.  # noqa: E501
        :type: str
        """

        self._postal_code = postal_code

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


        :return: The timezone of this IPLocation.  # noqa: E501
        :rtype: str
        """
        return self._timezone

    @timezone.setter
    def timezone(self, timezone):
        """Sets the timezone of this IPLocation.


        :param timezone: The timezone of this IPLocation.  # noqa: E501
        :type: str
        """

        self._timezone = timezone

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


        :return: The city of this IPLocation.  # noqa: E501
        :rtype: IPLocationCity
        """
        return self._city

    @city.setter
    def city(self, city):
        """Sets the city of this IPLocation.


        :param city: The city of this IPLocation.  # noqa: E501
        :type: IPLocationCity
        """

        self._city = city

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


        :return: The country of this IPLocation.  # noqa: E501
        :rtype: Location
        """
        return self._country

    @country.setter
    def country(self, country):
        """Sets the country of this IPLocation.


        :param country: The country of this IPLocation.  # noqa: E501
        :type: Location
        """

        self._country = country

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


        :return: The continent of this IPLocation.  # noqa: E501
        :rtype: Location
        """
        return self._continent

    @continent.setter
    def continent(self, continent):
        """Sets the continent of this IPLocation.


        :param continent: The continent of this IPLocation.  # noqa: E501
        :type: Location
        """

        self._continent = continent

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


        :return: The subdivisions of this IPLocation.  # noqa: E501
        :rtype: list[Subdivision]
        """
        return self._subdivisions

    @subdivisions.setter
    def subdivisions(self, subdivisions):
        """Sets the subdivisions of this IPLocation.


        :param subdivisions: The subdivisions of this IPLocation.  # noqa: E501
        :type: list[Subdivision]
        """

        self._subdivisions = subdivisions

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

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