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

"""
ctddocumentation

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


class CreateanewtaskResponse(object):

    """Implementation of the 'CreateanewtaskResponse' model.

    TODO: type model description here.

    Attributes:
        success (bool): TODO: type description here.
        data (string): TODO: type description here.

    """

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

    def __init__(self,
                 success=None,
                 data=None):
        """Constructor for the CreateanewtaskResponse class"""

        # Initialize members of the class
        self.success = success 
        self.data = data 

    @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

        success = dictionary.get("success") if "success" in dictionary.keys() else None
        data = dictionary.get("data") if dictionary.get("data") else None
        # Return an object of this model
        return cls(success,
                   data)
