class SubscriptionOptionAndIdValueType extends BasicDataType<SubscriptionOptionAndId> {

        @Override
        public int getMemory(SubscriptionOptionAndId obj) {
            return 4 + // integer, subscription identifier
                SubscriptionOptionValueType.INSTANCE.getMemory(obj.option);
        }

        @Override
        public void write(WriteBuffer buff, SubscriptionOptionAndId obj) {
            if (obj.subscriptionIdentifier != null) {
                buff.putInt(obj.subscriptionIdentifier.intValue());
            } else {
                buff.putInt(-1);
            }
            SubscriptionOptionValueType.INSTANCE.write(buff, obj.option);
        }

        @Override
        public SubscriptionOptionAndId read(ByteBuffer buff) {<FILL_FUNCTION_BODY>}

        @Override
        public SubscriptionOptionAndId[] createStorage(int size) {
            return new SubscriptionOptionAndId[size];
        }
    }

            int subId = buff.getInt();
            MqttSubscriptionOption option = SubscriptionOptionValueType.INSTANCE.read(buff);
            if (subId != -1) {
                return new SubscriptionOptionAndId(option, subId);
            } else {
                return new SubscriptionOptionAndId(option);
            }
        
<no_super_class>