# coding: utf-8

"""
    Location API

    Geolocation, Geocoding and Maps  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class GeolocationResponseSchema(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 = {
        'status': 'str',
        'message': 'str',
        'balance': 'int',
        'balance_slots': 'int',
        'lat': 'float',
        'lon': 'float',
        'accuracy': 'int',
        'address': 'str',
        'address_details': 'AddressDetailsSchema',
        'aged': 'int',
        'fallback': 'FallbackSchema'
    }

    attribute_map = {
        'status': 'status',
        'message': 'message',
        'balance': 'balance',
        'balance_slots': 'balance_slots',
        'lat': 'lat',
        'lon': 'lon',
        'accuracy': 'accuracy',
        'address': 'address',
        'address_details': 'address_details',
        'aged': 'aged',
        'fallback': 'fallback'
    }

    def __init__(self, status=None, message=None, balance=None, balance_slots=None, lat=None, lon=None, accuracy=None, address=None, address_details=None, aged=None, fallback=None):  # noqa: E501
        """GeolocationResponseSchema - a model defined in OpenAPI"""  # noqa: E501

        self._status = None
        self._message = None
        self._balance = None
        self._balance_slots = None
        self._lat = None
        self._lon = None
        self._accuracy = None
        self._address = None
        self._address_details = None
        self._aged = None
        self._fallback = None
        self.discriminator = None

        if status is not None:
            self.status = status
        if message is not None:
            self.message = message
        if balance is not None:
            self.balance = balance
        if balance_slots is not None:
            self.balance_slots = balance_slots
        if lat is not None:
            self.lat = lat
        if lon is not None:
            self.lon = lon
        if accuracy is not None:
            self.accuracy = accuracy
        if address is not None:
            self.address = address
        if address_details is not None:
            self.address_details = address_details
        if aged is not None:
            self.aged = aged
        if fallback is not None:
            self.fallback = fallback

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

        If the request is successful, ok is returned. Otherwise error is returned  # noqa: E501

        :return: The status of this GeolocationResponseSchema.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this GeolocationResponseSchema.

        If the request is successful, ok is returned. Otherwise error is returned  # noqa: E501

        :param status: The status of this GeolocationResponseSchema.  # noqa: E501
        :type: str
        """

        self._status = status

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

        Any additional information from the server is returned here  # noqa: E501

        :return: The message of this GeolocationResponseSchema.  # noqa: E501
        :rtype: str
        """
        return self._message

    @message.setter
    def message(self, message):
        """Sets the message of this GeolocationResponseSchema.

        Any additional information from the server is returned here  # noqa: E501

        :param message: The message of this GeolocationResponseSchema.  # noqa: E501
        :type: str
        """

        self._message = message

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

        This represents the remaining balance on the API token. Requests that return error are not charged and do not affect balance  # noqa: E501

        :return: The balance of this GeolocationResponseSchema.  # noqa: E501
        :rtype: int
        """
        return self._balance

    @balance.setter
    def balance(self, balance):
        """Sets the balance of this GeolocationResponseSchema.

        This represents the remaining balance on the API token. Requests that return error are not charged and do not affect balance  # noqa: E501

        :param balance: The balance of this GeolocationResponseSchema.  # noqa: E501
        :type: int
        """

        self._balance = balance

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

        This represents the remaining balance of device slots. Requests that return error are not charged and do not affect balance. If -1 is returned, then observe it as an error while calculating slots balance. This element will only exist if you are on a device plan.  # noqa: E501

        :return: The balance_slots of this GeolocationResponseSchema.  # noqa: E501
        :rtype: int
        """
        return self._balance_slots

    @balance_slots.setter
    def balance_slots(self, balance_slots):
        """Sets the balance_slots of this GeolocationResponseSchema.

        This represents the remaining balance of device slots. Requests that return error are not charged and do not affect balance. If -1 is returned, then observe it as an error while calculating slots balance. This element will only exist if you are on a device plan.  # noqa: E501

        :param balance_slots: The balance_slots of this GeolocationResponseSchema.  # noqa: E501
        :type: int
        """

        self._balance_slots = balance_slots

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

        The latitude representing the location  # noqa: E501

        :return: The lat of this GeolocationResponseSchema.  # noqa: E501
        :rtype: float
        """
        return self._lat

    @lat.setter
    def lat(self, lat):
        """Sets the lat of this GeolocationResponseSchema.

        The latitude representing the location  # noqa: E501

        :param lat: The lat of this GeolocationResponseSchema.  # noqa: E501
        :type: float
        """

        self._lat = lat

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

        The longitude representing the location  # noqa: E501

        :return: The lon of this GeolocationResponseSchema.  # noqa: E501
        :rtype: float
        """
        return self._lon

    @lon.setter
    def lon(self, lon):
        """Sets the lon of this GeolocationResponseSchema.

        The longitude representing the location  # noqa: E501

        :param lon: The lon of this GeolocationResponseSchema.  # noqa: E501
        :type: float
        """

        self._lon = lon

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

        The accuracy of the position is returned in meters  # noqa: E501

        :return: The accuracy of this GeolocationResponseSchema.  # noqa: E501
        :rtype: int
        """
        return self._accuracy

    @accuracy.setter
    def accuracy(self, accuracy):
        """Sets the accuracy of this GeolocationResponseSchema.

        The accuracy of the position is returned in meters  # noqa: E501

        :param accuracy: The accuracy of this GeolocationResponseSchema.  # noqa: E501
        :type: int
        """

        self._accuracy = accuracy

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

        The physical address of the location  # noqa: E501

        :return: The address of this GeolocationResponseSchema.  # noqa: E501
        :rtype: str
        """
        return self._address

    @address.setter
    def address(self, address):
        """Sets the address of this GeolocationResponseSchema.

        The physical address of the location  # noqa: E501

        :param address: The address of this GeolocationResponseSchema.  # noqa: E501
        :type: str
        """

        self._address = address

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


        :return: The address_details of this GeolocationResponseSchema.  # noqa: E501
        :rtype: AddressDetailsSchema
        """
        return self._address_details

    @address_details.setter
    def address_details(self, address_details):
        """Sets the address_details of this GeolocationResponseSchema.


        :param address_details: The address_details of this GeolocationResponseSchema.  # noqa: E501
        :type: AddressDetailsSchema
        """

        self._address_details = address_details

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

        Shown when the location is based on a single measurement or those older than 90 days or is an LAC fallback  # noqa: E501

        :return: The aged of this GeolocationResponseSchema.  # noqa: E501
        :rtype: int
        """
        return self._aged

    @aged.setter
    def aged(self, aged):
        """Sets the aged of this GeolocationResponseSchema.

        Shown when the location is based on a single measurement or those older than 90 days or is an LAC fallback  # noqa: E501

        :param aged: The aged of this GeolocationResponseSchema.  # noqa: E501
        :type: int
        """

        self._aged = aged

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


        :return: The fallback of this GeolocationResponseSchema.  # noqa: E501
        :rtype: FallbackSchema
        """
        return self._fallback

    @fallback.setter
    def fallback(self, fallback):
        """Sets the fallback of this GeolocationResponseSchema.


        :param fallback: The fallback of this GeolocationResponseSchema.  # noqa: E501
        :type: FallbackSchema
        """

        self._fallback = fallback

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

        return self.__dict__ == other.__dict__

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