# -*- coding: utf-8 -*-

"""
shelldatareportingapis

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""
from shelldatareportingapis.api_helper import APIHelper


class ExceptionSiteLocation(object):

    """Implementation of the 'ExceptionSiteLocation' model.

    Geography Location entity for Site Location

    Attributes:
        lat (str): Latitude for the Site Geographic Location
        lng (str): Longitude for the Site Geographic Location

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "lat": 'Lat',
        "lng": 'Lng'
    }

    _optionals = [
        'lat',
        'lng',
    ]

    _nullables = [
        'lat',
        'lng',
    ]

    def __init__(self,
                 lat=APIHelper.SKIP,
                 lng=APIHelper.SKIP):
        """Constructor for the ExceptionSiteLocation class"""

        # Initialize members of the class
        if lat is not APIHelper.SKIP:
            self.lat = lat 
        if lng is not APIHelper.SKIP:
            self.lng = lng 

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Creates an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """

        if not isinstance(dictionary, dict) or dictionary is None:
            return None

        # Extract variables from the dictionary
        lat = dictionary.get("Lat") if "Lat" in dictionary.keys() else APIHelper.SKIP
        lng = dictionary.get("Lng") if "Lng" in dictionary.keys() else APIHelper.SKIP
        # Return an object of this model
        return cls(lat,
                   lng)
