% AdditionalPropertiesMemento - class for constructing AdditionalProperties object

% Copyright 2016 The MathWorks, Inc.

classdef ( Hidden ) AdditionalPropertiesMemento < parallel.internal.display.Memento
    
    properties ( SetAccess = immutable, GetAccess = private )
        % The data struct necessary to create the AdditionalProperties instance.
        Data
    end
    
    methods       
        function obj = AdditionalPropertiesMemento(additionalProperties)
            validateattributes( additionalProperties, {'parallel.cluster.AdditionalProperties'}, {} );
            obj.Data = additionalProperties.getAsStruct();
        end
        
        function c = createObjectFromMemento(obj)
            c = parallel.cluster.AdditionalProperties.createFromStruct(obj.Data);
        end   
    end
end