class BooleanType extends PGType<Boolean> {

    public static final BooleanType INSTANCE = new BooleanType();
    static final int OID = 16;

    private static final int TYPE_LEN = 1;
    private static final int TYPE_MOD = -1;

    private static final byte[] TEXT_TRUE = new byte[]{'t'};
    private static final byte[] TEXT_FALSE = new byte[]{'f'};

    private static final Collection<ByteBuffer> TRUTH_VALUES = Set.of(
        ByteBuffer.wrap(new byte[]{'1'}),
        ByteBuffer.wrap(new byte[]{'t'}),
        ByteBuffer.wrap(new byte[]{'T'}),
        ByteBuffer.wrap(new byte[]{'t', 'r', 'u', 'e'}),
        ByteBuffer.wrap(new byte[]{'T', 'R', 'U', 'E'})
    );

    private BooleanType() {
        super(OID, TYPE_LEN, TYPE_MOD, "bool");
    }

    @Override
    public int typArray() {
        return PGArray.BOOL_ARRAY.oid();
    }

    @Override
    public String typeCategory() {
        return TypeCategory.NUMERIC.code();
    }

    @Override
    public String type() {
        return Type.BASE.code();
    }

    @Override
    public int writeAsBinary(ByteBuf buffer, @NotNull Boolean value) {<FILL_FUNCTION_BODY>}

    @Override
    byte[] encodeAsUTF8Text(@NotNull Boolean value) {
        return value ? TEXT_TRUE : TEXT_FALSE;
    }

    @Override
    public Boolean readBinaryValue(ByteBuf buffer, int valueLength) {
        assert valueLength == TYPE_LEN : "length should be " + TYPE_LEN +
                                         " because boolean is just a byte. Actual length: " + valueLength;
        byte value = buffer.readByte();
        switch (value) {
            case 0:
                return false;
            case 1:
                return true;
            default:
                throw new IllegalArgumentException("Unsupported binary bool: " + value);
        }
    }

    @Override
    Boolean decodeUTF8Text(byte[] bytes) {
        return TRUTH_VALUES.contains(ByteBuffer.wrap(bytes));
    }
}

        byte byteValue = (byte) (value ? 1 : 0);
        buffer.writeInt(TYPE_LEN);
        buffer.writeByte(byteValue);
        return INT32_BYTE_SIZE + TYPE_LEN;
    
<methods>public int oid() ,public abstract java.lang.Boolean readBinaryValue(ByteBuf, int) ,public java.lang.Boolean readTextValue(ByteBuf, int) ,public abstract int typArray() ,public java.lang.String typDelim() ,public int typElem() ,public io.crate.types.Regproc typInput() ,public java.lang.String typName() ,public io.crate.types.Regproc typOutput() ,public io.crate.types.Regproc typReceive() ,public io.crate.types.Regproc typSend() ,public abstract java.lang.String type() ,public abstract java.lang.String typeCategory() ,public short typeLen() ,public int typeMod() ,public abstract int writeAsBinary(ByteBuf, java.lang.Boolean) ,public int writeAsText(ByteBuf, java.lang.Boolean) <variables>static final int INT32_BYTE_SIZE,private static final Logger LOGGER,private final non-sealed int oid,private final non-sealed java.lang.String typName,private final non-sealed int typeLen,private final non-sealed int typeMod