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

"""
    apimaticcalculatorlatest

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

import apimaticcalculatorlatest.models.beds

class Bedroom(object):

    """Implementation of the 'Bedroom' model.

    TODO: type model description here.

    Attributes:
        beds (Beds): TODO: type description here.
        mtype (BedroomTypeEnum): TODO: type description here.
        private_bathroom (bool): Room have private bathroom

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "beds":'beds',
        "mtype":'type',
        "private_bathroom":'privateBathroom'
    }

    def __init__(self,
                 beds=None,
                 mtype=None,
                 private_bathroom=None):
        """Constructor for the Bedroom class"""

        # Initialize members of the class
        self.beds = beds
        self.mtype = mtype
        self.private_bathroom = private_bathroom


    @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
        beds = apimaticcalculatorlatest.models.beds.Beds.from_dictionary(dictionary.get('beds')) if dictionary.get('beds') else None
        mtype = dictionary.get('type')
        private_bathroom = dictionary.get('privateBathroom')

        # Return an object of this model
        return cls(beds,
                   mtype,
                   private_bathroom)


