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

"""
ctddocumentation

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


class Createanewtask(object):

    """Implementation of the 'Createanewtask' model.

    TODO: type model description here.

    Attributes:
        site_id (int): TODO: type description here.
        params (NewTaskobject): TODO: type description here.

    """

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

    def __init__(self,
                 site_id=None,
                 params=None):
        """Constructor for the Createanewtask class"""

        # Initialize members of the class
        self.site_id = site_id 
        self.params = params 

    @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

        site_id = dictionary.get("site_id") if dictionary.get("site_id") else None
        params = NewTaskobject.from_dictionary(dictionary.get('params')) if dictionary.get('params') else None
        # Return an object of this model
        return cls(site_id,
                   params)
