package org.gnode.nix;

import org.bytedeco.javacpp.Loader;
import org.bytedeco.javacpp.Pointer;
import org.bytedeco.javacpp.annotation.Namespace;
import org.bytedeco.javacpp.annotation.Platform;

@Platform(value = "linux",
        include = {"<nix/Block.hpp>"},
        link = {"nix"})
@Namespace("nix")
public class Block extends Pointer {

    static {
        Loader.load();
    }

    /**
     * Constructor that creates an uninitialized Block.
     * <p/>
     * Calling any method on an uninitialized block will throw a {@link java.lang.RuntimeException}.
     */
    public Block() {
        allocate();
    }

    private native void allocate();

}
@@ -129,25 +129,17 @@
 otation.
-Namespace
+*
 ;%0Aimport
@@ -147,44 +147,56 @@
 org.
-bytedeco.javacpp.annotation.Platform
+gnode.nix.internal.Utils;%0A%0Aimport java.util.Date
 ;%0A%0A@
@@ -612,24 +612,24 @@
 e();%0A    %7D%0A%0A
-
     private 
@@ -653,9 +653,1792 @@
 ate();%0A%0A
+    //--------------------------------------------------%0A    // Base class methods%0A    //--------------------------------------------------%0A%0A    private native%0A    @Cast(%22bool%22)%0A    boolean isNone();%0A%0A    /**%0A     * Checks if block is initialized%0A     *%0A     * @return true if initialized, False otherwise%0A     */%0A    public boolean isInitialized() %7B%0A        return !isNone();%0A    %7D%0A%0A    /**%0A     * Get id of the block%0A     *%0A     * @return id string%0A     */%0A    public native%0A    @Name(%22id%22)%0A    @StdString%0A    String getId();%0A%0A    private native%0A    @Cast(%22time_t%22)%0A    long createdAt();%0A%0A    /**%0A     * Get the creation date of the block.%0A     *%0A     * @return The creation date of the block.%0A     */%0A    public Date getCreatedAt() %7B%0A        return Utils.convertSecondsToDate(createdAt());%0A    %7D%0A%0A    private native%0A    @Cast(%22time_t%22)%0A    long updatedAt();%0A%0A    /**%0A     * Get the date of the last update.%0A     *%0A     * @return The date of the last update.%0A     */%0A    public Date getUpdatedAt() %7B%0A        return Utils.convertSecondsToDate(updatedAt());%0A    %7D%0A%0A    /**%0A     * Sets the time of the last update to the current time if the field is not set.%0A     */%0A    public native void setUpdatedAt();%0A%0A    /**%0A     * Sets the time of the last update to the current time.%0A     */%0A    public native void forceUpdatedAt();%0A%0A    /**%0A     * Sets the creation time to the current time if the field is not set.%0A     */%0A    public native void setCreatedAt();%0A%0A    private native void forceCreatedAt(@Cast(%22time_t%22) long time);%0A%0A    /**%0A     * Sets the creation date to the provided value even if the attribute is set.%0A     *%0A     * @param date The creation date to set.%0A     */%0A    public void forceCreatedAt(Date date) %7B%0A        forceCreatedAt(Utils.convertDateToSeconds(date));%0A    %7D%0A%0A
 %7D

add entity related funcs to Block