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

"""
    apimaticcalculatorlatest

    This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
"""


class ParkingPolicy(object):

    """Implementation of the 'ParkingPolicy' model.

    TODO: type model description here.

    Attributes:
        access_parking (bool): Access parking into properties {true,false}
        located_parking (LocatedParkingTypeEnum): TODO: type description
            here.
        private_parking (bool): Parking is private or no. {true,false}
        charge_parking (string): Charge parking. Example: “Free”, “$ 100”.
        time_cost_parking (TimeCostParkingEnum): TODO: type description here.
        necessary_reservation_parking (ReservationParkingTypeEnum): TODO: type
            description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "access_parking":'accessParking',
        "located_parking":'locatedParking',
        "private_parking":'privateParking',
        "charge_parking":'chargeParking',
        "time_cost_parking":'timeCostParking',
        "necessary_reservation_parking":'necessaryReservationParking'
    }

    def __init__(self,
                 access_parking=None,
                 located_parking=None,
                 private_parking=None,
                 charge_parking=None,
                 time_cost_parking=None,
                 necessary_reservation_parking=None):
        """Constructor for the ParkingPolicy class"""

        # Initialize members of the class
        self.access_parking = access_parking
        self.located_parking = located_parking
        self.private_parking = private_parking
        self.charge_parking = charge_parking
        self.time_cost_parking = time_cost_parking
        self.necessary_reservation_parking = necessary_reservation_parking


    @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 dictionary is None:
            return None

        # Extract variables from the dictionary
        access_parking = dictionary.get('accessParking')
        located_parking = dictionary.get('locatedParking')
        private_parking = dictionary.get('privateParking')
        charge_parking = dictionary.get('chargeParking')
        time_cost_parking = dictionary.get('timeCostParking')
        necessary_reservation_parking = dictionary.get('necessaryReservationParking')

        # Return an object of this model
        return cls(access_parking,
                   located_parking,
                   private_parking,
                   charge_parking,
                   time_cost_parking,
                   necessary_reservation_parking)


