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

"""
ctddocumentation

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


class Authenticate(object):

    """Implementation of the 'Authenticate' model.

    TODO: type model description here.

    Attributes:
        username (string): TODO: type description here.
        password (string): TODO: type description here.

    """

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

    def __init__(self,
                 username=None,
                 password=None):
        """Constructor for the Authenticate class"""

        # Initialize members of the class
        self.username = username 
        self.password = password 

    @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

        username = dictionary.get("username") if dictionary.get("username") else None
        password = dictionary.get("password") if dictionary.get("password") else None
        # Return an object of this model
        return cls(username,
                   password)
