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

"""
ctddocumentation

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


class Taskextraparams(object):

    """Implementation of the 'Taskextraparams' model.

    TODO: type model description here.

    Attributes:
        query_discovered_devices (bool): TODO: type description here.
        port (int): TODO: type description here.
        sub_query (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "query_discovered_devices": 'Query_Discovered_Devices',
        "port": 'port',
        "sub_query": 'sub_query'
    }

    _optionals = [
        'query_discovered_devices',
        'port',
        'sub_query',
    ]

    def __init__(self,
                 query_discovered_devices=APIHelper.SKIP,
                 port=APIHelper.SKIP,
                 sub_query=APIHelper.SKIP):
        """Constructor for the Taskextraparams class"""

        # Initialize members of the class
        if query_discovered_devices is not APIHelper.SKIP:
            self.query_discovered_devices = query_discovered_devices 
        if port is not APIHelper.SKIP:
            self.port = port 
        if sub_query is not APIHelper.SKIP:
            self.sub_query = sub_query 

    @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

        query_discovered_devices = dictionary.get("Query_Discovered_Devices") if "Query_Discovered_Devices" in dictionary.keys() else APIHelper.SKIP
        port = dictionary.get("port") if dictionary.get("port") else APIHelper.SKIP
        sub_query = dictionary.get("sub_query") if dictionary.get("sub_query") else APIHelper.SKIP
        # Return an object of this model
        return cls(query_discovered_devices,
                   port,
                   sub_query)
