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

"""
ctddocumentation

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


class DestinationVirtualZone(object):

    """Implementation of the 'DestinationVirtualZone' model.

    TODO: type model description here.

    Attributes:
        name (string): TODO: type description here.
        num_assets (int): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "name": 'name',
        "num_assets": 'num_assets'
    }

    _optionals = [
        'name',
        'num_assets',
    ]

    def __init__(self,
                 name=APIHelper.SKIP,
                 num_assets=APIHelper.SKIP):
        """Constructor for the DestinationVirtualZone class"""

        # Initialize members of the class
        if name is not APIHelper.SKIP:
            self.name = name 
        if num_assets is not APIHelper.SKIP:
            self.num_assets = num_assets 

    @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") if dictionary.get("name") else APIHelper.SKIP
        num_assets = dictionary.get("num_assets") if dictionary.get("num_assets") else APIHelper.SKIP
        # Return an object of this model
        return cls(name,
                   num_assets)
