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

"""
    test_meraki

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

import test_meraki.models.scheduling
import test_meraki.models.bandwidth
import test_meraki.models.firewall_and_traffic_shaping
import test_meraki.models.content_filtering
import test_meraki.models.vlan_tagging
import test_meraki.models.bonjour_forwarding

class CreateNetworkGroupPolicy(object):

    """Implementation of the 'createNetworkGroupPolicy' model.

    TODO: type model description here.

    Attributes:
        name (string): The name for your group policy. Required.
        scheduling (Scheduling): The schedule for the group policy. Schedules
            are applied to days of the week.
        bandwidth (Bandwidth): The bandwidth settings for clients bound to
            your group policy.
        firewall_and_traffic_shaping (FirewallAndTrafficShaping): The firewall
            and traffic shaping rules and settings for your policy.
        content_filtering (ContentFiltering): The content filtering settings
            for your group policy
        splash_auth_settings (SplashAuthSettingsEnum): Whether clients bound
            to your policy will bypass splash authorization or behave
            according to the network's rules. Can be one of 'network default'
            or 'bypass'. Only available if your network has a wireless
            configuration.
        vlan_tagging (VlanTagging): The VLAN tagging settings for your group
            policy. Only available if your network has a wireless
            configuration.
        bonjour_forwarding (BonjourForwarding): The Bonjour settings for your
            group policy. Only valid if your network has a wireless
            configuration.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "name":'name',
        "scheduling":'scheduling',
        "bandwidth":'bandwidth',
        "firewall_and_traffic_shaping":'firewallAndTrafficShaping',
        "content_filtering":'contentFiltering',
        "splash_auth_settings":'splashAuthSettings',
        "vlan_tagging":'vlanTagging',
        "bonjour_forwarding":'bonjourForwarding'
    }

    def __init__(self,
                 name=None,
                 scheduling=None,
                 bandwidth=None,
                 firewall_and_traffic_shaping=None,
                 content_filtering=None,
                 splash_auth_settings=None,
                 vlan_tagging=None,
                 bonjour_forwarding=None):
        """Constructor for the CreateNetworkGroupPolicy class"""

        # Initialize members of the class
        self.name = name
        self.scheduling = scheduling
        self.bandwidth = bandwidth
        self.firewall_and_traffic_shaping = firewall_and_traffic_shaping
        self.content_filtering = content_filtering
        self.splash_auth_settings = splash_auth_settings
        self.vlan_tagging = vlan_tagging
        self.bonjour_forwarding = bonjour_forwarding


    @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
        name = dictionary.get('name')
        scheduling = test_meraki.models.scheduling.Scheduling.from_dictionary(dictionary.get('scheduling')) if dictionary.get('scheduling') else None
        bandwidth = test_meraki.models.bandwidth.Bandwidth.from_dictionary(dictionary.get('bandwidth')) if dictionary.get('bandwidth') else None
        firewall_and_traffic_shaping = test_meraki.models.firewall_and_traffic_shaping.FirewallAndTrafficShaping.from_dictionary(dictionary.get('firewallAndTrafficShaping')) if dictionary.get('firewallAndTrafficShaping') else None
        content_filtering = test_meraki.models.content_filtering.ContentFiltering.from_dictionary(dictionary.get('contentFiltering')) if dictionary.get('contentFiltering') else None
        splash_auth_settings = dictionary.get('splashAuthSettings')
        vlan_tagging = test_meraki.models.vlan_tagging.VlanTagging.from_dictionary(dictionary.get('vlanTagging')) if dictionary.get('vlanTagging') else None
        bonjour_forwarding = test_meraki.models.bonjour_forwarding.BonjourForwarding.from_dictionary(dictionary.get('bonjourForwarding')) if dictionary.get('bonjourForwarding') else None

        # Return an object of this model
        return cls(name,
                   scheduling,
                   bandwidth,
                   firewall_and_traffic_shaping,
                   content_filtering,
                   splash_auth_settings,
                   vlan_tagging,
                   bonjour_forwarding)


