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

"""
    test_meraki

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

import test_meraki.models.wan_11
import test_meraki.models.wan_21
import test_meraki.models.cellular

class BandwidthLimits6(object):

    """Implementation of the 'BandwidthLimits6' model.

    A mapping of uplinks to their bandwidth settings (be sure to check which
    uplinks are supported for your network)

    Attributes:
        wan_1 (Wan11): The bandwidth settings for the 'wan1' uplink
        wan_2 (Wan21): The bandwidth settings for the 'wan2' uplink
        cellular (Cellular): The bandwidth settings for the 'cellular' uplink

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "wan_1":'wan1',
        "wan_2":'wan2',
        "cellular":'cellular'
    }

    def __init__(self,
                 wan_1=None,
                 wan_2=None,
                 cellular=None):
        """Constructor for the BandwidthLimits6 class"""

        # Initialize members of the class
        self.wan_1 = wan_1
        self.wan_2 = wan_2
        self.cellular = cellular


    @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
        wan_1 = test_meraki.models.wan_11.Wan11.from_dictionary(dictionary.get('wan1')) if dictionary.get('wan1') else None
        wan_2 = test_meraki.models.wan_21.Wan21.from_dictionary(dictionary.get('wan2')) if dictionary.get('wan2') else None
        cellular = test_meraki.models.cellular.Cellular.from_dictionary(dictionary.get('cellular')) if dictionary.get('cellular') else None

        # Return an object of this model
        return cls(wan_1,
                   wan_2,
                   cellular)


