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

"""
shelldatareportingapis

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


class FeeRuleLocation(object):

    """Implementation of the 'FeeRuleLocation' model.

    TODO: type model description here.

    Attributes:
        delco_id (str): Delco Identifier.
        country (str): Country name.
        country_code (str): ISO Code of country.
        fuel_network_id (int): Fuel Network Identifier.
        network_name (str): Network Name.
        site_group_id (int): Site-Group ID
        site_group_name (str): Site-Group name.
        site_code (int): Site Code
        site_id (int): Site Identifier
        site_name (str): Site Name

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "delco_id": 'DelcoId',
        "country": 'Country',
        "country_code": 'CountryCode',
        "fuel_network_id": 'FuelNetworkId',
        "network_name": 'NetworkName',
        "site_group_id": 'SiteGroupId',
        "site_group_name": 'SiteGroupName',
        "site_code": 'SiteCode',
        "site_id": 'SiteId',
        "site_name": 'SiteName'
    }

    _optionals = [
        'delco_id',
        'country',
        'country_code',
        'fuel_network_id',
        'network_name',
        'site_group_id',
        'site_group_name',
        'site_code',
        'site_id',
        'site_name',
    ]

    _nullables = [
        'delco_id',
        'country',
        'country_code',
        'fuel_network_id',
        'network_name',
        'site_group_id',
        'site_group_name',
        'site_code',
        'site_id',
        'site_name',
    ]

    def __init__(self,
                 delco_id=APIHelper.SKIP,
                 country=APIHelper.SKIP,
                 country_code=APIHelper.SKIP,
                 fuel_network_id=APIHelper.SKIP,
                 network_name=APIHelper.SKIP,
                 site_group_id=APIHelper.SKIP,
                 site_group_name=APIHelper.SKIP,
                 site_code=APIHelper.SKIP,
                 site_id=APIHelper.SKIP,
                 site_name=APIHelper.SKIP):
        """Constructor for the FeeRuleLocation class"""

        # Initialize members of the class
        if delco_id is not APIHelper.SKIP:
            self.delco_id = delco_id 
        if country is not APIHelper.SKIP:
            self.country = country 
        if country_code is not APIHelper.SKIP:
            self.country_code = country_code 
        if fuel_network_id is not APIHelper.SKIP:
            self.fuel_network_id = fuel_network_id 
        if network_name is not APIHelper.SKIP:
            self.network_name = network_name 
        if site_group_id is not APIHelper.SKIP:
            self.site_group_id = site_group_id 
        if site_group_name is not APIHelper.SKIP:
            self.site_group_name = site_group_name 
        if site_code is not APIHelper.SKIP:
            self.site_code = site_code 
        if site_id is not APIHelper.SKIP:
            self.site_id = site_id 
        if site_name is not APIHelper.SKIP:
            self.site_name = site_name 

    @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
        delco_id = dictionary.get("DelcoId") if "DelcoId" in dictionary.keys() else APIHelper.SKIP
        country = dictionary.get("Country") if "Country" in dictionary.keys() else APIHelper.SKIP
        country_code = dictionary.get("CountryCode") if "CountryCode" in dictionary.keys() else APIHelper.SKIP
        fuel_network_id = dictionary.get("FuelNetworkId") if "FuelNetworkId" in dictionary.keys() else APIHelper.SKIP
        network_name = dictionary.get("NetworkName") if "NetworkName" in dictionary.keys() else APIHelper.SKIP
        site_group_id = dictionary.get("SiteGroupId") if "SiteGroupId" in dictionary.keys() else APIHelper.SKIP
        site_group_name = dictionary.get("SiteGroupName") if "SiteGroupName" in dictionary.keys() else APIHelper.SKIP
        site_code = dictionary.get("SiteCode") if "SiteCode" in dictionary.keys() else APIHelper.SKIP
        site_id = dictionary.get("SiteId") if "SiteId" in dictionary.keys() else APIHelper.SKIP
        site_name = dictionary.get("SiteName") if "SiteName" in dictionary.keys() else APIHelper.SKIP
        # Return an object of this model
        return cls(delco_id,
                   country,
                   country_code,
                   fuel_network_id,
                   network_name,
                   site_group_id,
                   site_group_name,
                   site_code,
                   site_id,
                   site_name)
