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

"""
ctddocumentation

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


class GetLicenseDetailsResponse(object):

    """Implementation of the 'GetLicenseDetailsResponse' model.

    TODO: type model description here.

    Attributes:
        machine_uuid (string): TODO: type description here.
        expiration_date (string): TODO: type description here.
        status (StatusEnum): TODO: type description here.
        existing_license_key (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "machine_uuid": 'machine_uuid',
        "expiration_date": 'expiration_date',
        "status": 'status',
        "existing_license_key": 'existing_license_key'
    }

    _optionals = [
        'expiration_date',
        'status',
        'existing_license_key',
    ]

    def __init__(self,
                 machine_uuid=None,
                 expiration_date=APIHelper.SKIP,
                 status=APIHelper.SKIP,
                 existing_license_key=APIHelper.SKIP):
        """Constructor for the GetLicenseDetailsResponse class"""

        # Initialize members of the class
        self.machine_uuid = machine_uuid 
        if expiration_date is not APIHelper.SKIP:
            self.expiration_date = expiration_date 
        if status is not APIHelper.SKIP:
            self.status = status 
        if existing_license_key is not APIHelper.SKIP:
            self.existing_license_key = existing_license_key 

    @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

        machine_uuid = dictionary.get("machine_uuid") if dictionary.get("machine_uuid") else None
        expiration_date = dictionary.get("expiration_date") if dictionary.get("expiration_date") else APIHelper.SKIP
        status = dictionary.get("status") if dictionary.get("status") else APIHelper.SKIP
        existing_license_key = dictionary.get("existing_license_key") if dictionary.get("existing_license_key") else APIHelper.SKIP
        # Return an object of this model
        return cls(machine_uuid,
                   expiration_date,
                   status,
                   existing_license_key)
