[go][fidl] Write unions as xunions when enabled in context

Also switches to using JSON data for decoding

Test: fx run-tests go_fidl_tests
Change-Id: I7169c26cc8c1ebf7c01b25db2e6336f4e1bd9e10
diff --git a/src/syscall/zx/fidl/bindingstest/impl.go b/src/syscall/zx/fidl/bindingstest/impl.go
index 4f5ecd8..3520df6 100644
--- a/src/syscall/zx/fidl/bindingstest/impl.go
+++ b/src/syscall/zx/fidl/bindingstest/impl.go
@@ -20,7 +20,7 @@
 )
 
 type TestSimple struct {
-	_ struct{} `fidl:"s,8,8" fidl2:"s,8,8"`
+	_ struct{} `fidl:"s,8,8" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"8"`
 	X int64    `fidl:"0"`
 }
 
@@ -31,7 +31,7 @@
 }
 
 type TestSimpleBool struct {
-	_ struct{} `fidl:"s,1,1" fidl2:"s,1,1"`
+	_ struct{} `fidl:"s,1,1" fidl_size_v1_no_ee:"1" fidl_alignment_v1_no_ee:"1"`
 	X bool     `fidl:"0"`
 }
 
@@ -42,7 +42,7 @@
 }
 
 type TestAlignment1 struct {
-	_ struct{} `fidl:"s,8,4" fidl2:"s,8,4"`
+	_ struct{} `fidl:"s,8,4" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"4"`
 	X int8     `fidl:"0"`
 	Y int8     `fidl:"1"`
 	Z uint32   `fidl:"4"`
@@ -55,7 +55,7 @@
 }
 
 type TestAlignment2 struct {
-	_ struct{} `fidl:"s,20,4" fidl2:"s,20,4"`
+	_ struct{} `fidl:"s,20,4" fidl_size_v1_no_ee:"20" fidl_alignment_v1_no_ee:"4"`
 	A uint32   `fidl:"0"`
 	B uint32   `fidl:"4"`
 	C int8     `fidl:"8"`
@@ -74,7 +74,7 @@
 }
 
 type TestFloat1 struct {
-	_ struct{} `fidl:"s,4,4" fidl2:"s,4,4"`
+	_ struct{} `fidl:"s,4,4" fidl_size_v1_no_ee:"4" fidl_alignment_v1_no_ee:"4"`
 	A float32  `fidl:"0"`
 }
 
@@ -85,7 +85,7 @@
 }
 
 type TestFloat2 struct {
-	_ struct{} `fidl:"s,8,8" fidl2:"s,8,8"`
+	_ struct{} `fidl:"s,8,8" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"8"`
 	A float64  `fidl:"0"`
 }
 
@@ -96,7 +96,7 @@
 }
 
 type TestFloat3 struct {
-	_ struct{} `fidl:"s,32,8" fidl2:"s,32,8"`
+	_ struct{} `fidl:"s,32,8" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"8"`
 	A float32  `fidl:"0"`
 	B float64  `fidl:"8"`
 	C uint64   `fidl:"16"`
@@ -110,7 +110,7 @@
 }
 
 type TestArray1 struct {
-	_ struct{} `fidl:"s,5,1" fidl2:"s,5,1"`
+	_ struct{} `fidl:"s,5,1" fidl_size_v1_no_ee:"5" fidl_alignment_v1_no_ee:"1"`
 	A [5]int8  `fidl:"0"`
 }
 
@@ -121,7 +121,7 @@
 }
 
 type TestArray2 struct {
-	_ struct{}   `fidl:"s,16,8" fidl2:"s,16,8"`
+	_ struct{}   `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
 	A float64    `fidl:"0"`
 	B [1]float32 `fidl:"8"`
 }
@@ -133,7 +133,7 @@
 }
 
 type TestArray3 struct {
-	_ struct{}  `fidl:"s,24,8" fidl2:"s,24,8"`
+	_ struct{}  `fidl:"s,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	A int32     `fidl:"0"`
 	B [3]uint16 `fidl:"4"`
 	C uint64    `fidl:"16"`
@@ -146,7 +146,7 @@
 }
 
 type TestArray4 struct {
-	_ struct{} `fidl:"s,9,1" fidl2:"s,9,1"`
+	_ struct{} `fidl:"s,9,1" fidl_size_v1_no_ee:"9" fidl_alignment_v1_no_ee:"1"`
 	A [9]bool  `fidl:"0"`
 }
 
@@ -157,7 +157,7 @@
 }
 
 type TestString1 struct {
-	_ struct{} `fidl:"s,32,8" fidl2:"s,32,8"`
+	_ struct{} `fidl:"s,32,8" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"8"`
 	A string   `fidl:"0,"`
 	B *string  `fidl:"16,"`
 }
@@ -169,7 +169,7 @@
 }
 
 type TestString2 struct {
-	_ struct{}  `fidl:"s,32,8" fidl2:"s,32,8"`
+	_ struct{}  `fidl:"s,32,8" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"8"`
 	A [2]string `fidl:"0,"`
 }
 
@@ -180,7 +180,7 @@
 }
 
 type TestString3 struct {
-	_ struct{}   `fidl:"s,64,8" fidl2:"s,64,8"`
+	_ struct{}   `fidl:"s,64,8" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"8"`
 	A [2]string  `fidl:"0,4" fidl2:"4"`
 	B [2]*string `fidl:"32,4" fidl2:"4"`
 }
@@ -192,7 +192,7 @@
 }
 
 type TestStringWithBound struct {
-	_ struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
+	_ struct{} `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
 	A string   `fidl:"0,8" fidl2:"8"`
 }
 
@@ -203,7 +203,7 @@
 }
 
 type TestOptStringWithBound struct {
-	_ struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
+	_ struct{} `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
 	A *string  `fidl:"0,8" fidl2:"8"`
 }
 
@@ -214,7 +214,7 @@
 }
 
 type TestVector1 struct {
-	_ struct{} `fidl:"s,64,8" fidl2:"s,64,8"`
+	_ struct{} `fidl:"s,64,8" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"8"`
 	A []int8   `fidl:"0,"`
 	B *[]int16 `fidl:"16,"`
 	C []int32  `fidl:"32,2" fidl2:"2"`
@@ -228,7 +228,7 @@
 }
 
 type TestVector2 struct {
-	_ struct{}    `fidl:"s,64,8" fidl2:"s,64,8"`
+	_ struct{}    `fidl:"s,64,8" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"8"`
 	A [2][]int8   `fidl:"0,"`
 	B [][]int8    `fidl:"32,2," fidl2:"2,"`
 	C []*[]string `fidl:"48,2,2,5" fidl2:"2,2,5"`
@@ -241,7 +241,7 @@
 }
 
 type TestStruct1 struct {
-	_ struct{}    `fidl:"s,16,8" fidl2:"s,16,8"`
+	_ struct{}    `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
 	A TestSimple  `fidl:"0"`
 	B *TestSimple `fidl:"8"`
 }
@@ -253,7 +253,7 @@
 }
 
 type TestStruct2 struct {
-	_ struct{}     `fidl:"s,88,8" fidl2:"s,88,8"`
+	_ struct{}     `fidl:"s,88,8" fidl_size_v1_no_ee:"88" fidl_alignment_v1_no_ee:"8"`
 	A TestArray1   `fidl:"0"`
 	B TestFloat1   `fidl:"8"`
 	C TestVector1  `fidl:"16"`
@@ -267,7 +267,7 @@
 }
 
 type EmptyStruct struct {
-	_ struct{} `fidl:"s,1,1" fidl2:"s,1,1"`
+	_ struct{} `fidl:"s,1,1" fidl_size_v1_no_ee:"1" fidl_alignment_v1_no_ee:"1"`
 }
 
 var _mEmptyStruct = _bindings.CreateLazyMarshaler(EmptyStruct{})
@@ -277,7 +277,7 @@
 }
 
 type TestUnion1 struct {
-	_ struct{} `fidl:"s,24,8" fidl2:"s,24,8"`
+	_ struct{} `fidl:"s,24,8" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"8"`
 	A Union1   `fidl:"0"`
 	B *Union1  `fidl:"16"`
 }
@@ -289,7 +289,7 @@
 }
 
 type TestUnion2 struct {
-	_ struct{}  `fidl:"s,32,8" fidl2:"s,32,8"`
+	_ struct{}  `fidl:"s,32,8" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"8"`
 	A []Union1  `fidl:"0,"`
 	B []*Union1 `fidl:"16,"`
 }
@@ -301,7 +301,7 @@
 }
 
 type XUnion1Struct struct {
-	_  struct{} `fidl:"s,24,8" fidl2:"s,24,8"`
+	_  struct{} `fidl:"s,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	Xu XUnion1  `fidl:"0"`
 }
 
@@ -312,7 +312,7 @@
 }
 
 type XUnion1AsUnionStruct struct {
-	_    struct{}       `fidl:"s,16,8" fidl2:"s,16,8"`
+	_    struct{}       `fidl:"s,16,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	Xuau XUnion1AsUnion `fidl:"0"`
 }
 
@@ -322,8 +322,30 @@
 	return _mXUnion1AsUnionStruct
 }
 
+type UnionInsideUnionStruct struct {
+	_ struct{}         `fidl:"s,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+	U UnionInsideUnion `fidl:"0"`
+}
+
+var _mUnionInsideUnionStruct = _bindings.CreateLazyMarshaler(UnionInsideUnionStruct{})
+
+func (msg *UnionInsideUnionStruct) Marshaler() _bindings.Marshaler {
+	return _mUnionInsideUnionStruct
+}
+
+type XUnionInsideXUnionStruct struct {
+	_ struct{}           `fidl:"s,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+	U XUnionInsideXUnion `fidl:"0"`
+}
+
+var _mXUnionInsideXUnionStruct = _bindings.CreateLazyMarshaler(XUnionInsideXUnionStruct{})
+
+func (msg *XUnionInsideXUnionStruct) Marshaler() _bindings.Marshaler {
+	return _mXUnionInsideXUnionStruct
+}
+
 type TestXUnion1 struct {
-	_ struct{} `fidl:"s,48,8" fidl2:"s,48,8"`
+	_ struct{} `fidl:"s,48,8" fidl_size_v1_no_ee:"48" fidl_alignment_v1_no_ee:"8"`
 	A XUnion1  `fidl:"0"`
 	B *XUnion1 `fidl:"24"`
 }
@@ -335,7 +357,7 @@
 }
 
 type TestXUnion2 struct {
-	_ struct{}   `fidl:"s,32,8" fidl2:"s,32,8"`
+	_ struct{}   `fidl:"s,32,8" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"8"`
 	A []XUnion1  `fidl:"0,"`
 	B []*XUnion1 `fidl:"16,"`
 }
@@ -347,7 +369,7 @@
 }
 
 type StrictXUnion1Struct struct {
-	_  struct{}      `fidl:"s,24,8" fidl2:"s,24,8"`
+	_  struct{}      `fidl:"s,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	Xu StrictXUnion1 `fidl:"0"`
 }
 
@@ -358,7 +380,7 @@
 }
 
 type TestStrictXUnion1 struct {
-	_ struct{}       `fidl:"s,48,8" fidl2:"s,48,8"`
+	_ struct{}       `fidl:"s,48,8" fidl_size_v1_no_ee:"48" fidl_alignment_v1_no_ee:"8"`
 	A StrictXUnion1  `fidl:"0"`
 	B *StrictXUnion1 `fidl:"24"`
 }
@@ -370,7 +392,7 @@
 }
 
 type TestStrictXUnion2 struct {
-	_ struct{}         `fidl:"s,32,8" fidl2:"s,32,8"`
+	_ struct{}         `fidl:"s,32,8" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"8"`
 	A []StrictXUnion1  `fidl:"0,"`
 	B []*StrictXUnion1 `fidl:"16,"`
 }
@@ -382,7 +404,7 @@
 }
 
 type TestHandle1 struct {
-	_ struct{}   `fidl:"s,16,4" fidl2:"s,16,4"`
+	_ struct{}   `fidl:"s,16,4" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"4"`
 	A _zx.Handle `fidl:"0,0" fidl2:"0"`
 	B _zx.Handle `fidl:"4,1" fidl2:"1"`
 	C _zx.VMO    `fidl:"8,0" fidl2:"0"`
@@ -396,7 +418,7 @@
 }
 
 type TestHandle2 struct {
-	_ struct{}     `fidl:"s,32,8" fidl2:"s,32,8"`
+	_ struct{}     `fidl:"s,32,8" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"8"`
 	A []_zx.Handle `fidl:"0,1,0" fidl2:"1,0"`
 	B []_zx.VMO    `fidl:"16,1,1" fidl2:"1,1"`
 }
@@ -408,7 +430,7 @@
 }
 
 type TestInterface1 struct {
-	_ struct{}              `fidl:"s,16,4" fidl2:"s,16,4"`
+	_ struct{}              `fidl:"s,16,4" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"4"`
 	A Test1Interface        `fidl:"0"`
 	B Test1Interface        `fidl:"4"`
 	C Test1InterfaceRequest `fidl:"8,0" fidl2:"0"`
@@ -422,7 +444,7 @@
 }
 
 type TestSimpleTable struct {
-	_     struct{}    `fidl:"s,16,8" fidl2:"s,16,8"`
+	_     struct{}    `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
 	Table SimpleTable `fidl:"0"`
 }
 
@@ -433,7 +455,7 @@
 }
 
 type TestOlderSimpleTable struct {
-	_     struct{}         `fidl:"s,16,8" fidl2:"s,16,8"`
+	_     struct{}         `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
 	Table OlderSimpleTable `fidl:"0"`
 }
 
@@ -444,7 +466,7 @@
 }
 
 type TestNewerSimpleTable struct {
-	_     struct{}         `fidl:"s,16,8" fidl2:"s,16,8"`
+	_     struct{}         `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
 	Table NewerSimpleTable `fidl:"0"`
 }
 
@@ -455,7 +477,7 @@
 }
 
 type TestWithTableAndInt struct {
-	_     struct{}    `fidl:"s,24,8" fidl2:"s,24,8"`
+	_     struct{}    `fidl:"s,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	Table SimpleTable `fidl:"0"`
 	Foo   uint64      `fidl:"16"`
 }
@@ -467,7 +489,7 @@
 }
 
 type Int64Struct struct {
-	_ struct{} `fidl:"s,8,8" fidl2:"s,8,8"`
+	_ struct{} `fidl:"s,8,8" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"8"`
 	X int64    `fidl:"0"`
 }
 
@@ -478,7 +500,7 @@
 }
 
 type TestFuchsiaIoReadAtResponse struct {
-	_    struct{} `fidl:"s,24,8" fidl2:"s,24,8"`
+	_    struct{} `fidl:"s,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	S    int32    `fidl:"0"`
 	Data []uint8  `fidl:"8,8192" fidl2:"8192"`
 }
@@ -490,7 +512,7 @@
 }
 
 type TestFuchsiaIoWriteAtRequest struct {
-	_      struct{} `fidl:"s,24,8" fidl2:"s,24,8"`
+	_      struct{} `fidl:"s,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	Data   []uint8  `fidl:"0,8192" fidl2:"8192"`
 	Offset uint64   `fidl:"16"`
 }
@@ -502,7 +524,7 @@
 }
 
 type InterfaceConfig struct {
-	_               struct{}        `fidl:"s,48,8" fidl2:"s,48,8"`
+	_               struct{}        `fidl:"s,48,8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
 	Name            string          `fidl:"0,"`
 	IpAddressConfig IpAddressConfig `fidl:"16"`
 }
@@ -514,7 +536,7 @@
 }
 
 type TestAddEthernetDeviceRequest struct {
-	_               struct{}                `fidl:"s,72,8" fidl2:"s,72,8"`
+	_               struct{}                `fidl:"s,72,8" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"8"`
 	TopologicalPath string                  `fidl:"0,"`
 	Config          InterfaceConfig         `fidl:"16"`
 	Device          EthernetDeviceInterface `fidl:"64"`
@@ -527,7 +549,7 @@
 }
 
 type TestPackageResolverResolveRequest struct {
-	_            struct{}                       `fidl:"s,40,8" fidl2:"s,40,8"`
+	_            struct{}                       `fidl:"s,40,8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
 	PackageUrl   string                         `fidl:"0,"`
 	Selectors    []string                       `fidl:"16,,"`
 	UpdatePolicy UpdatePolicy                   `fidl:"32"`
@@ -541,7 +563,7 @@
 }
 
 type UpdatePolicy struct {
-	_                struct{} `fidl:"s,2,1" fidl2:"s,2,1"`
+	_                struct{} `fidl:"s,2,1" fidl_size_v1_no_ee:"2" fidl_alignment_v1_no_ee:"1"`
 	FetchIfAbsent    bool     `fidl:"0"`
 	AllowOldVersions bool     `fidl:"1"`
 }
@@ -563,7 +585,7 @@
 )
 
 type Union1 struct {
-	I_union1Tag `fidl:"u,16,8" fidl2:"u,16,8"`
+	I_union1Tag `fidl:"u,16,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	A           [3]int8     `fidl:"1140208200"`
 	B           TestSimple  `fidl:"1101191659"`
 	C           *TestSimple `fidl:"310804024"`
@@ -628,7 +650,7 @@
 )
 
 type XUnion1AsUnion struct {
-	I_xUnion1AsUnionTag `fidl:"u,16,8" fidl2:"u,16,8"`
+	I_xUnion1AsUnionTag `fidl:"u,16,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	A                   [3]int8    `fidl:"1815116267"`
 	B                   TestSimple `fidl:"219568201"`
 	D                   float32    `fidl:"1047172132"`
@@ -671,6 +693,46 @@
 	return _u
 }
 
+type I_unionInsideUnionTag uint32
+
+const (
+	_ I_unionInsideUnionTag = iota
+	UnionInsideUnionA
+	UnionInsideUnionB
+)
+
+type UnionInsideUnion struct {
+	I_unionInsideUnionTag `fidl:"u,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+	A                     float32        `fidl:"1274799307"`
+	B                     XUnion1AsUnion `fidl:"340650192"`
+}
+
+func (u *UnionInsideUnion) Which() I_unionInsideUnionTag {
+	return u.I_unionInsideUnionTag
+}
+
+func (u *UnionInsideUnion) SetA(a float32) {
+	u.I_unionInsideUnionTag = UnionInsideUnionA
+	u.A = a
+}
+
+func UnionInsideUnionWithA(a float32) UnionInsideUnion {
+	var _u UnionInsideUnion
+	_u.SetA(a)
+	return _u
+}
+
+func (u *UnionInsideUnion) SetB(b XUnion1AsUnion) {
+	u.I_unionInsideUnionTag = UnionInsideUnionB
+	u.B = b
+}
+
+func UnionInsideUnionWithB(b XUnion1AsUnion) UnionInsideUnion {
+	var _u UnionInsideUnion
+	_u.SetB(b)
+	return _u
+}
+
 type I_simpleUnionTag uint32
 
 const (
@@ -683,7 +745,7 @@
 )
 
 type SimpleUnion struct {
-	I_simpleUnionTag `fidl:"u,24,8" fidl2:"u,24,8"`
+	I_simpleUnionTag `fidl:"u,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	I32              int32        `fidl:"2133387115"`
 	I64              int64        `fidl:"809723265"`
 	S                Int64Struct  `fidl:"1133668882"`
@@ -759,7 +821,7 @@
 )
 
 type IpAddressConfig struct {
-	I_ipAddressConfigTag `fidl:"u,28,4" fidl2:"u,28,4"`
+	I_ipAddressConfigTag `fidl:"u,28,4" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	PaddingSize24Align4  [6]uint32 `fidl:"1850696643"`
 	Dhcp                 bool      `fidl:"500027731"`
 }
@@ -800,7 +862,7 @@
 )
 
 type XUnion1 struct {
-	I_xUnion1Tag  `fidl:"x,24,8" fidl2:"x,24,8"`
+	I_xUnion1Tag  `fidl:"x,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	I_unknownData []byte
 	A             [3]int8    `fidl:"416714395" fidl2:"416714395"`
 	B             TestSimple `fidl:"863456686" fidl2:"863456686"`
@@ -857,6 +919,58 @@
 	return _u
 }
 
+type I_xUnionInsideXUnionTag uint32
+
+const (
+	XUnionInsideXUnion_unknownData = 0          // 0x00000000
+	XUnionInsideXUnionA            = 1100463121 // 0x4197bc11
+	XUnionInsideXUnionB            = 796211677  // 0x2f7539dd
+)
+
+type XUnionInsideXUnion struct {
+	I_xUnionInsideXUnionTag `fidl:"x,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+	I_unknownData           []byte
+	A                       float32 `fidl:"1100463121" fidl2:"1100463121"`
+	B                       XUnion1 `fidl:"796211677" fidl2:"796211677"`
+}
+
+func (_m *XUnionInsideXUnion) Which() I_xUnionInsideXUnionTag {
+	switch _m.I_xUnionInsideXUnionTag {
+	case 1100463121:
+		return XUnionInsideXUnionA
+	case 796211677:
+		return XUnionInsideXUnionB
+	default:
+		return XUnionInsideXUnion_unknownData
+	}
+}
+
+func (_m *XUnionInsideXUnion) Ordinal() uint32 {
+	return uint32(_m.I_xUnionInsideXUnionTag)
+}
+
+func (_m *XUnionInsideXUnion) SetA(a float32) {
+	_m.I_xUnionInsideXUnionTag = XUnionInsideXUnionA
+	_m.A = a
+}
+
+func XUnionInsideXUnionWithA(a float32) XUnionInsideXUnion {
+	var _u XUnionInsideXUnion
+	_u.SetA(a)
+	return _u
+}
+
+func (_m *XUnionInsideXUnion) SetB(b XUnion1) {
+	_m.I_xUnionInsideXUnionTag = XUnionInsideXUnionB
+	_m.B = b
+}
+
+func XUnionInsideXUnionWithB(b XUnion1) XUnionInsideXUnion {
+	var _u XUnionInsideXUnion
+	_u.SetB(b)
+	return _u
+}
+
 type I_strictXUnion1Tag uint32
 
 const (
@@ -866,8 +980,7 @@
 )
 
 type StrictXUnion1 struct {
-	I_strictXUnion1Tag `fidl:"x!,24,8" fidl2:"x!,24,8"`
-	I_unknownData      []byte
+	I_strictXUnion1Tag `fidl:"x!,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	A                  [3]int8    `fidl:"1988029217" fidl2:"1988029217"`
 	B                  TestSimple `fidl:"1259078458" fidl2:"1259078458"`
 	D                  float32    `fidl:"881204552" fidl2:"881204552"`
@@ -915,7 +1028,7 @@
 }
 
 type SimpleTable struct {
-	_        struct{} `fidl:"t,16,8" fidl2:"t,16,8"`
+	_        struct{} `fidl:"t,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
 	X        int64    `fidl:"1" fidl2:"1"`
 	XPresent bool
 	Y        int64 `fidl:"5" fidl2:"5"`
@@ -971,7 +1084,7 @@
 }
 
 type OlderSimpleTable struct {
-	_        struct{} `fidl:"t,16,8" fidl2:"t,16,8"`
+	_        struct{} `fidl:"t,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
 	X        int64    `fidl:"1" fidl2:"1"`
 	XPresent bool
 }
@@ -1001,7 +1114,7 @@
 }
 
 type NewerSimpleTable struct {
-	_        struct{} `fidl:"t,16,8" fidl2:"t,16,8"`
+	_        struct{} `fidl:"t,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
 	X        int64    `fidl:"1" fidl2:"1"`
 	XPresent bool
 	Y        int64 `fidl:"5" fidl2:"5"`
@@ -1094,7 +1207,7 @@
 )
 
 type test1EchoRequest struct {
-	_  struct{} `fidl:"s,16,0" fidl2:"s,16,0"`
+	_  struct{} `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	In *string  `fidl:"0,"`
 }
 
@@ -1105,7 +1218,7 @@
 }
 
 type test1EchoResponse struct {
-	_   struct{} `fidl:"s,16,0" fidl2:"s,16,0"`
+	_   struct{} `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	Out *string  `fidl:"0,"`
 }
 
@@ -1116,7 +1229,7 @@
 }
 
 type test1SurpriseResponse struct {
-	_   struct{} `fidl:"s,16,0" fidl2:"s,16,0"`
+	_   struct{} `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	Foo string   `fidl:"0,"`
 }
 
diff --git a/src/syscall/zx/fidl/bindingstest/test.test.fidl b/src/syscall/zx/fidl/bindingstest/test.test.fidl
index c60bc85..e03fbb2 100644
--- a/src/syscall/zx/fidl/bindingstest/test.test.fidl
+++ b/src/syscall/zx/fidl/bindingstest/test.test.fidl
@@ -152,6 +152,24 @@
     XUnion1AsUnion xuau;
 };
 
+union UnionInsideUnion {
+    float32 a;
+    XUnion1AsUnion b;
+};
+
+struct UnionInsideUnionStruct {
+    UnionInsideUnion u;
+};
+
+xunion XUnionInsideXUnion {
+    float32 a;
+    XUnion1 b;
+};
+
+struct XUnionInsideXUnionStruct {
+    XUnionInsideXUnion u;
+};
+
 struct TestXUnion1 {
     XUnion1 a;
     XUnion1? b;
diff --git a/src/syscall/zx/fidl/conformance/impl.go b/src/syscall/zx/fidl/conformance/impl.go
index 39bc0c4..a5adbc1 100644
--- a/src/syscall/zx/fidl/conformance/impl.go
+++ b/src/syscall/zx/fidl/conformance/impl.go
@@ -16,8 +16,333 @@
 	_bindings "syscall/zx/fidl"
 )
 
+type MyBool struct {
+	_     struct{} `fidl:"s,1,1" fidl_size_v1_no_ee:"1" fidl_alignment_v1_no_ee:"1"`
+	Value bool     `fidl:"0"`
+}
+
+var _mMyBool = _bindings.CreateLazyMarshaler(MyBool{})
+
+func (msg *MyBool) Marshaler() _bindings.Marshaler {
+	return _mMyBool
+}
+
+type MyByte struct {
+	_     struct{} `fidl:"s,1,1" fidl_size_v1_no_ee:"1" fidl_alignment_v1_no_ee:"1"`
+	Value uint8    `fidl:"0"`
+}
+
+var _mMyByte = _bindings.CreateLazyMarshaler(MyByte{})
+
+func (msg *MyByte) Marshaler() _bindings.Marshaler {
+	return _mMyByte
+}
+
+type MyInt8 struct {
+	_     struct{} `fidl:"s,1,1" fidl_size_v1_no_ee:"1" fidl_alignment_v1_no_ee:"1"`
+	Value int8     `fidl:"0"`
+}
+
+var _mMyInt8 = _bindings.CreateLazyMarshaler(MyInt8{})
+
+func (msg *MyInt8) Marshaler() _bindings.Marshaler {
+	return _mMyInt8
+}
+
+type MyInt16 struct {
+	_     struct{} `fidl:"s,2,2" fidl_size_v1_no_ee:"2" fidl_alignment_v1_no_ee:"2"`
+	Value int16    `fidl:"0"`
+}
+
+var _mMyInt16 = _bindings.CreateLazyMarshaler(MyInt16{})
+
+func (msg *MyInt16) Marshaler() _bindings.Marshaler {
+	return _mMyInt16
+}
+
+type MyInt32 struct {
+	_     struct{} `fidl:"s,4,4" fidl_size_v1_no_ee:"4" fidl_alignment_v1_no_ee:"4"`
+	Value int32    `fidl:"0"`
+}
+
+var _mMyInt32 = _bindings.CreateLazyMarshaler(MyInt32{})
+
+func (msg *MyInt32) Marshaler() _bindings.Marshaler {
+	return _mMyInt32
+}
+
+type MyInt64 struct {
+	_     struct{} `fidl:"s,8,8" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"8"`
+	Value int64    `fidl:"0"`
+}
+
+var _mMyInt64 = _bindings.CreateLazyMarshaler(MyInt64{})
+
+func (msg *MyInt64) Marshaler() _bindings.Marshaler {
+	return _mMyInt64
+}
+
+type MyUint8 struct {
+	_     struct{} `fidl:"s,1,1" fidl_size_v1_no_ee:"1" fidl_alignment_v1_no_ee:"1"`
+	Value uint8    `fidl:"0"`
+}
+
+var _mMyUint8 = _bindings.CreateLazyMarshaler(MyUint8{})
+
+func (msg *MyUint8) Marshaler() _bindings.Marshaler {
+	return _mMyUint8
+}
+
+type MyUint16 struct {
+	_     struct{} `fidl:"s,2,2" fidl_size_v1_no_ee:"2" fidl_alignment_v1_no_ee:"2"`
+	Value uint16   `fidl:"0"`
+}
+
+var _mMyUint16 = _bindings.CreateLazyMarshaler(MyUint16{})
+
+func (msg *MyUint16) Marshaler() _bindings.Marshaler {
+	return _mMyUint16
+}
+
+type MyUint32 struct {
+	_     struct{} `fidl:"s,4,4" fidl_size_v1_no_ee:"4" fidl_alignment_v1_no_ee:"4"`
+	Value uint32   `fidl:"0"`
+}
+
+var _mMyUint32 = _bindings.CreateLazyMarshaler(MyUint32{})
+
+func (msg *MyUint32) Marshaler() _bindings.Marshaler {
+	return _mMyUint32
+}
+
+type MyUint64 struct {
+	_     struct{} `fidl:"s,8,8" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"8"`
+	Value uint64   `fidl:"0"`
+}
+
+var _mMyUint64 = _bindings.CreateLazyMarshaler(MyUint64{})
+
+func (msg *MyUint64) Marshaler() _bindings.Marshaler {
+	return _mMyUint64
+}
+
+type MyFloat32 struct {
+	_     struct{} `fidl:"s,4,4" fidl_size_v1_no_ee:"4" fidl_alignment_v1_no_ee:"4"`
+	Value float32  `fidl:"0"`
+}
+
+var _mMyFloat32 = _bindings.CreateLazyMarshaler(MyFloat32{})
+
+func (msg *MyFloat32) Marshaler() _bindings.Marshaler {
+	return _mMyFloat32
+}
+
+type MyFloat64 struct {
+	_     struct{} `fidl:"s,8,8" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"8"`
+	Value float64  `fidl:"0"`
+}
+
+var _mMyFloat64 = _bindings.CreateLazyMarshaler(MyFloat64{})
+
+func (msg *MyFloat64) Marshaler() _bindings.Marshaler {
+	return _mMyFloat64
+}
+
+type ThreeByte struct {
+	_     struct{} `fidl:"s,3,1" fidl_size_v1_no_ee:"3" fidl_alignment_v1_no_ee:"1"`
+	Elem1 uint8    `fidl:"0"`
+	Elem2 uint8    `fidl:"1"`
+	Elem3 uint8    `fidl:"2"`
+}
+
+var _mThreeByte = _bindings.CreateLazyMarshaler(ThreeByte{})
+
+func (msg *ThreeByte) Marshaler() _bindings.Marshaler {
+	return _mThreeByte
+}
+
+type FiveByte struct {
+	_     struct{} `fidl:"s,8,4" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"4"`
+	Elem1 uint32   `fidl:"0"`
+	Elem2 uint8    `fidl:"4"`
+}
+
+var _mFiveByte = _bindings.CreateLazyMarshaler(FiveByte{})
+
+func (msg *FiveByte) Marshaler() _bindings.Marshaler {
+	return _mFiveByte
+}
+
+type ThreeByteInStruct struct {
+	_     struct{}  `fidl:"s,9,1" fidl_size_v1_no_ee:"9" fidl_alignment_v1_no_ee:"1"`
+	Elem1 ThreeByte `fidl:"0"`
+	Elem2 ThreeByte `fidl:"3"`
+	Elem3 ThreeByte `fidl:"6"`
+}
+
+var _mThreeByteInStruct = _bindings.CreateLazyMarshaler(ThreeByteInStruct{})
+
+func (msg *ThreeByteInStruct) Marshaler() _bindings.Marshaler {
+	return _mThreeByteInStruct
+}
+
+type FiveByteInStruct struct {
+	_     struct{} `fidl:"s,24,4" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"4"`
+	Elem1 FiveByte `fidl:"0"`
+	Elem2 FiveByte `fidl:"8"`
+	Elem3 FiveByte `fidl:"16"`
+}
+
+var _mFiveByteInStruct = _bindings.CreateLazyMarshaler(FiveByteInStruct{})
+
+func (msg *FiveByteInStruct) Marshaler() _bindings.Marshaler {
+	return _mFiveByteInStruct
+}
+
+type ThreeByteInVector struct {
+	_     struct{}    `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+	Elems []ThreeByte `fidl:"0,"`
+}
+
+var _mThreeByteInVector = _bindings.CreateLazyMarshaler(ThreeByteInVector{})
+
+func (msg *ThreeByteInVector) Marshaler() _bindings.Marshaler {
+	return _mThreeByteInVector
+}
+
+type FiveByteInVector struct {
+	_     struct{}   `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+	Elems []FiveByte `fidl:"0,"`
+}
+
+var _mFiveByteInVector = _bindings.CreateLazyMarshaler(FiveByteInVector{})
+
+func (msg *FiveByteInVector) Marshaler() _bindings.Marshaler {
+	return _mFiveByteInVector
+}
+
+type ThreeByteInArray struct {
+	_     struct{}     `fidl:"s,9,1" fidl_size_v1_no_ee:"9" fidl_alignment_v1_no_ee:"1"`
+	Elems [3]ThreeByte `fidl:"0"`
+}
+
+var _mThreeByteInArray = _bindings.CreateLazyMarshaler(ThreeByteInArray{})
+
+func (msg *ThreeByteInArray) Marshaler() _bindings.Marshaler {
+	return _mThreeByteInArray
+}
+
+type FiveByteInArray struct {
+	_     struct{}    `fidl:"s,24,4" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"4"`
+	Elems [3]FiveByte `fidl:"0"`
+}
+
+var _mFiveByteInArray = _bindings.CreateLazyMarshaler(FiveByteInArray{})
+
+func (msg *FiveByteInArray) Marshaler() _bindings.Marshaler {
+	return _mFiveByteInArray
+}
+
+type Int64Struct struct {
+	_ struct{} `fidl:"s,8,8" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"8"`
+	X int64    `fidl:"0"`
+}
+
+var _mInt64Struct = _bindings.CreateLazyMarshaler(Int64Struct{})
+
+func (msg *Int64Struct) Marshaler() _bindings.Marshaler {
+	return _mInt64Struct
+}
+
+type TestInlineXUnionInStruct struct {
+	_      struct{}     `fidl:"s,56,8" fidl_size_v1_no_ee:"56" fidl_alignment_v1_no_ee:"8"`
+	Before string       `fidl:"0,"`
+	Xu     SampleXUnion `fidl:"16"`
+	After  string       `fidl:"40,"`
+}
+
+var _mTestInlineXUnionInStruct = _bindings.CreateLazyMarshaler(TestInlineXUnionInStruct{})
+
+func (msg *TestInlineXUnionInStruct) Marshaler() _bindings.Marshaler {
+	return _mTestInlineXUnionInStruct
+}
+
+type TestOptionalXUnionInStruct struct {
+	_      struct{}      `fidl:"s,56,8" fidl_size_v1_no_ee:"56" fidl_alignment_v1_no_ee:"8"`
+	Before string        `fidl:"0,"`
+	Xu     *SampleXUnion `fidl:"16"`
+	After  string        `fidl:"40,"`
+}
+
+var _mTestOptionalXUnionInStruct = _bindings.CreateLazyMarshaler(TestOptionalXUnionInStruct{})
+
+func (msg *TestOptionalXUnionInStruct) Marshaler() _bindings.Marshaler {
+	return _mTestOptionalXUnionInStruct
+}
+
+type TestStrictXUnionInStruct struct {
+	_  struct{}           `fidl:"s,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+	Xu SampleStrictXUnion `fidl:"0"`
+}
+
+var _mTestStrictXUnionInStruct = _bindings.CreateLazyMarshaler(TestStrictXUnionInStruct{})
+
+func (msg *TestStrictXUnionInStruct) Marshaler() _bindings.Marshaler {
+	return _mTestStrictXUnionInStruct
+}
+
+type TestFlexibleXUnionInStruct struct {
+	_  struct{}     `fidl:"s,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+	Xu SampleXUnion `fidl:"0"`
+}
+
+var _mTestFlexibleXUnionInStruct = _bindings.CreateLazyMarshaler(TestFlexibleXUnionInStruct{})
+
+func (msg *TestFlexibleXUnionInStruct) Marshaler() _bindings.Marshaler {
+	return _mTestFlexibleXUnionInStruct
+}
+
+type Length2StringWrapper struct {
+	_             struct{} `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+	Length2String string   `fidl:"0,2" fidl2:"2"`
+}
+
+var _mLength2StringWrapper = _bindings.CreateLazyMarshaler(Length2StringWrapper{})
+
+func (msg *Length2StringWrapper) Marshaler() _bindings.Marshaler {
+	return _mLength2StringWrapper
+}
+
+type StringWrapper struct {
+	_   struct{} `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+	Str string   `fidl:"0,"`
+}
+
+var _mStringWrapper = _bindings.CreateLazyMarshaler(StringWrapper{})
+
+func (msg *StringWrapper) Marshaler() _bindings.Marshaler {
+	return _mStringWrapper
+}
+
+type StructWithOptionals struct {
+	_   struct{}               `fidl:"s,104,8" fidl_size_v1_no_ee:"112" fidl_alignment_v1_no_ee:"8"`
+	S   EmptyStruct            `fidl:"0"`
+	S2  *EmptyStruct           `fidl:"8"`
+	T   TableWithEmptyStruct   `fidl:"16"`
+	Xu  XUnionWithEmptyStruct  `fidl:"32"`
+	Xu2 *XUnionWithEmptyStruct `fidl:"56"`
+	U   UnionWithEmptyStruct   `fidl:"80"`
+	U2  *UnionWithEmptyStruct  `fidl:"96"`
+}
+
+var _mStructWithOptionals = _bindings.CreateLazyMarshaler(StructWithOptionals{})
+
+func (msg *StructWithOptionals) Marshaler() _bindings.Marshaler {
+	return _mStructWithOptionals
+}
+
 type TestXUnionInTable struct {
-	_     struct{}      `fidl:"s,16,8" fidl2:"s,16,8"`
+	_     struct{}      `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
 	Value XUnionInTable `fidl:"0"`
 }
 
@@ -28,7 +353,7 @@
 }
 
 type InterfaceConfig struct {
-	_               struct{}        `fidl:"s,48,8" fidl2:"s,48,8"`
+	_               struct{}        `fidl:"s,48,8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
 	Name            string          `fidl:"0,"`
 	IpAddressConfig IpAddressConfig `fidl:"16"`
 }
@@ -40,7 +365,7 @@
 }
 
 type TestAddEthernetDeviceRequest struct {
-	_                   struct{}        `fidl:"s,72,8" fidl2:"s,72,8"`
+	_                   struct{}        `fidl:"s,72,8" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"8"`
 	TopologicalPath     string          `fidl:"0,"`
 	Config              InterfaceConfig `fidl:"16"`
 	ThisShouldBeAHandle uint32          `fidl:"64"`
@@ -53,7 +378,7 @@
 }
 
 type NodeAttributes struct {
-	_                struct{} `fidl:"s,56,8" fidl2:"s,56,8"`
+	_                struct{} `fidl:"s,56,8" fidl_size_v1_no_ee:"56" fidl_alignment_v1_no_ee:"8"`
 	Mode             uint32   `fidl:"0"`
 	Id               uint64   `fidl:"8"`
 	ContentSize      uint64   `fidl:"16"`
@@ -70,7 +395,7 @@
 }
 
 type FileGetAttrResponse struct {
-	_          struct{}       `fidl:"s,64,8" fidl2:"s,64,8"`
+	_          struct{}       `fidl:"s,64,8" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"8"`
 	S          int32          `fidl:"0"`
 	Attributes NodeAttributes `fidl:"8"`
 }
@@ -82,7 +407,7 @@
 }
 
 type UnionWithBoundStringStruct struct {
-	_ struct{}             `fidl:"s,24,8" fidl2:"s,24,8"`
+	_ struct{}             `fidl:"s,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	V UnionWithBoundString `fidl:"0"`
 }
 
@@ -92,8 +417,93 @@
 	return _mUnionWithBoundStringStruct
 }
 
+type EmptyStruct struct {
+	_ struct{} `fidl:"s,1,1" fidl_size_v1_no_ee:"1" fidl_alignment_v1_no_ee:"1"`
+}
+
+var _mEmptyStruct = _bindings.CreateLazyMarshaler(EmptyStruct{})
+
+func (msg *EmptyStruct) Marshaler() _bindings.Marshaler {
+	return _mEmptyStruct
+}
+
+type EmptyStructSandwich struct {
+	_      struct{}    `fidl:"s,40,8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
+	Before string      `fidl:"0,"`
+	Es     EmptyStruct `fidl:"16"`
+	After  string      `fidl:"24,"`
+}
+
+var _mEmptyStructSandwich = _bindings.CreateLazyMarshaler(EmptyStructSandwich{})
+
+func (msg *EmptyStructSandwich) Marshaler() _bindings.Marshaler {
+	return _mEmptyStructSandwich
+}
+
+type Uint8Uint16Uint32Uint64 struct {
+	_  struct{} `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+	F1 uint8    `fidl:"0"`
+	F2 uint16   `fidl:"2"`
+	F3 uint32   `fidl:"4"`
+	F4 uint64   `fidl:"8"`
+}
+
+var _mUint8Uint16Uint32Uint64 = _bindings.CreateLazyMarshaler(Uint8Uint16Uint32Uint64{})
+
+func (msg *Uint8Uint16Uint32Uint64) Marshaler() _bindings.Marshaler {
+	return _mUint8Uint16Uint32Uint64
+}
+
+type Uint64Uint32Uint16Uint8 struct {
+	_  struct{} `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+	F1 uint64   `fidl:"0"`
+	F2 uint32   `fidl:"8"`
+	F3 uint16   `fidl:"12"`
+	F4 uint8    `fidl:"14"`
+}
+
+var _mUint64Uint32Uint16Uint8 = _bindings.CreateLazyMarshaler(Uint64Uint32Uint16Uint8{})
+
+func (msg *Uint64Uint32Uint16Uint8) Marshaler() _bindings.Marshaler {
+	return _mUint64Uint32Uint16Uint8
+}
+
+type StructOfSimpleTable struct {
+	_     struct{}    `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+	Table SimpleTable `fidl:"0"`
+}
+
+var _mStructOfSimpleTable = _bindings.CreateLazyMarshaler(StructOfSimpleTable{})
+
+func (msg *StructOfSimpleTable) Marshaler() _bindings.Marshaler {
+	return _mStructOfSimpleTable
+}
+
+type SimpleTableThenUint64 struct {
+	_      struct{}    `fidl:"s,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+	Table  SimpleTable `fidl:"0"`
+	Number uint64      `fidl:"16"`
+}
+
+var _mSimpleTableThenUint64 = _bindings.CreateLazyMarshaler(SimpleTableThenUint64{})
+
+func (msg *SimpleTableThenUint64) Marshaler() _bindings.Marshaler {
+	return _mSimpleTableThenUint64
+}
+
+type StructOfTableWithStringAndVector struct {
+	_     struct{}                 `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+	Table TableWithStringAndVector `fidl:"0"`
+}
+
+var _mStructOfTableWithStringAndVector = _bindings.CreateLazyMarshaler(StructOfTableWithStringAndVector{})
+
+func (msg *StructOfTableWithStringAndVector) Marshaler() _bindings.Marshaler {
+	return _mStructOfTableWithStringAndVector
+}
+
 type StructWithInt struct {
-	_ struct{} `fidl:"s,4,4" fidl2:"s,4,4"`
+	_ struct{} `fidl:"s,4,4" fidl_size_v1_no_ee:"4" fidl_alignment_v1_no_ee:"4"`
 	X int32    `fidl:"0"`
 }
 
@@ -104,7 +514,7 @@
 }
 
 type StructWithArrays struct {
-	_                 struct{}          `fidl:"s,120,8" fidl2:"s,120,8"`
+	_                 struct{}          `fidl:"s,120,8" fidl_size_v1_no_ee:"120" fidl_alignment_v1_no_ee:"8"`
 	ArrInt            [2]int32          `fidl:"0"`
 	ArrString         [2]string         `fidl:"8,"`
 	ArrNullableString [2]*string        `fidl:"40,"`
@@ -120,7 +530,7 @@
 }
 
 type StructWithVectors struct {
-	_                 struct{}         `fidl:"s,112,8" fidl2:"s,112,8"`
+	_                 struct{}         `fidl:"s,112,8" fidl_size_v1_no_ee:"112" fidl_alignment_v1_no_ee:"8"`
 	VecEmpty          []int32          `fidl:"0,"`
 	VecInt            []int32          `fidl:"16,"`
 	VecString         []string         `fidl:"32,,"`
@@ -136,523 +546,6 @@
 	return _mStructWithVectors
 }
 
-type EmptyStruct struct {
-	_ struct{} `fidl:"s,1,1" fidl2:"s,1,1"`
-}
-
-var _mEmptyStruct = _bindings.CreateLazyMarshaler(EmptyStruct{})
-
-func (msg *EmptyStruct) Marshaler() _bindings.Marshaler {
-	return _mEmptyStruct
-}
-
-type EmptyStructSandwich struct {
-	_      struct{}    `fidl:"s,40,8" fidl2:"s,40,8"`
-	Before string      `fidl:"0,"`
-	Es     EmptyStruct `fidl:"16"`
-	After  string      `fidl:"24,"`
-}
-
-var _mEmptyStructSandwich = _bindings.CreateLazyMarshaler(EmptyStructSandwich{})
-
-func (msg *EmptyStructSandwich) Marshaler() _bindings.Marshaler {
-	return _mEmptyStructSandwich
-}
-
-type Uint8Uint16Uint32Uint64 struct {
-	_  struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
-	F1 uint8    `fidl:"0"`
-	F2 uint16   `fidl:"2"`
-	F3 uint32   `fidl:"4"`
-	F4 uint64   `fidl:"8"`
-}
-
-var _mUint8Uint16Uint32Uint64 = _bindings.CreateLazyMarshaler(Uint8Uint16Uint32Uint64{})
-
-func (msg *Uint8Uint16Uint32Uint64) Marshaler() _bindings.Marshaler {
-	return _mUint8Uint16Uint32Uint64
-}
-
-type Uint64Uint32Uint16Uint8 struct {
-	_  struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
-	F1 uint64   `fidl:"0"`
-	F2 uint32   `fidl:"8"`
-	F3 uint16   `fidl:"12"`
-	F4 uint8    `fidl:"14"`
-}
-
-var _mUint64Uint32Uint16Uint8 = _bindings.CreateLazyMarshaler(Uint64Uint32Uint16Uint8{})
-
-func (msg *Uint64Uint32Uint16Uint8) Marshaler() _bindings.Marshaler {
-	return _mUint64Uint32Uint16Uint8
-}
-
-type Length2StringWrapper struct {
-	_             struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
-	Length2String string   `fidl:"0,2" fidl2:"2"`
-}
-
-var _mLength2StringWrapper = _bindings.CreateLazyMarshaler(Length2StringWrapper{})
-
-func (msg *Length2StringWrapper) Marshaler() _bindings.Marshaler {
-	return _mLength2StringWrapper
-}
-
-type StringWrapper struct {
-	_   struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
-	Str string   `fidl:"0,"`
-}
-
-var _mStringWrapper = _bindings.CreateLazyMarshaler(StringWrapper{})
-
-func (msg *StringWrapper) Marshaler() _bindings.Marshaler {
-	return _mStringWrapper
-}
-
-type StructOfSimpleTable struct {
-	_     struct{}    `fidl:"s,16,8" fidl2:"s,16,8"`
-	Table SimpleTable `fidl:"0"`
-}
-
-var _mStructOfSimpleTable = _bindings.CreateLazyMarshaler(StructOfSimpleTable{})
-
-func (msg *StructOfSimpleTable) Marshaler() _bindings.Marshaler {
-	return _mStructOfSimpleTable
-}
-
-type SimpleTableThenUint64 struct {
-	_      struct{}    `fidl:"s,24,8" fidl2:"s,24,8"`
-	Table  SimpleTable `fidl:"0"`
-	Number uint64      `fidl:"16"`
-}
-
-var _mSimpleTableThenUint64 = _bindings.CreateLazyMarshaler(SimpleTableThenUint64{})
-
-func (msg *SimpleTableThenUint64) Marshaler() _bindings.Marshaler {
-	return _mSimpleTableThenUint64
-}
-
-type StructOfTableWithStringAndVector struct {
-	_     struct{}                 `fidl:"s,16,8" fidl2:"s,16,8"`
-	Table TableWithStringAndVector `fidl:"0"`
-}
-
-var _mStructOfTableWithStringAndVector = _bindings.CreateLazyMarshaler(StructOfTableWithStringAndVector{})
-
-func (msg *StructOfTableWithStringAndVector) Marshaler() _bindings.Marshaler {
-	return _mStructOfTableWithStringAndVector
-}
-
-type ThreeByte struct {
-	_     struct{} `fidl:"s,3,1" fidl2:"s,3,1"`
-	Elem1 uint8    `fidl:"0"`
-	Elem2 uint8    `fidl:"1"`
-	Elem3 uint8    `fidl:"2"`
-}
-
-var _mThreeByte = _bindings.CreateLazyMarshaler(ThreeByte{})
-
-func (msg *ThreeByte) Marshaler() _bindings.Marshaler {
-	return _mThreeByte
-}
-
-type FiveByte struct {
-	_     struct{} `fidl:"s,8,4" fidl2:"s,8,4"`
-	Elem1 uint32   `fidl:"0"`
-	Elem2 uint8    `fidl:"4"`
-}
-
-var _mFiveByte = _bindings.CreateLazyMarshaler(FiveByte{})
-
-func (msg *FiveByte) Marshaler() _bindings.Marshaler {
-	return _mFiveByte
-}
-
-type ThreeByteInStruct struct {
-	_     struct{}  `fidl:"s,9,1" fidl2:"s,9,1"`
-	Elem1 ThreeByte `fidl:"0"`
-	Elem2 ThreeByte `fidl:"3"`
-	Elem3 ThreeByte `fidl:"6"`
-}
-
-var _mThreeByteInStruct = _bindings.CreateLazyMarshaler(ThreeByteInStruct{})
-
-func (msg *ThreeByteInStruct) Marshaler() _bindings.Marshaler {
-	return _mThreeByteInStruct
-}
-
-type FiveByteInStruct struct {
-	_     struct{} `fidl:"s,24,4" fidl2:"s,24,4"`
-	Elem1 FiveByte `fidl:"0"`
-	Elem2 FiveByte `fidl:"8"`
-	Elem3 FiveByte `fidl:"16"`
-}
-
-var _mFiveByteInStruct = _bindings.CreateLazyMarshaler(FiveByteInStruct{})
-
-func (msg *FiveByteInStruct) Marshaler() _bindings.Marshaler {
-	return _mFiveByteInStruct
-}
-
-type ThreeByteInVector struct {
-	_     struct{}    `fidl:"s,16,8" fidl2:"s,16,8"`
-	Elems []ThreeByte `fidl:"0,"`
-}
-
-var _mThreeByteInVector = _bindings.CreateLazyMarshaler(ThreeByteInVector{})
-
-func (msg *ThreeByteInVector) Marshaler() _bindings.Marshaler {
-	return _mThreeByteInVector
-}
-
-type FiveByteInVector struct {
-	_     struct{}   `fidl:"s,16,8" fidl2:"s,16,8"`
-	Elems []FiveByte `fidl:"0,"`
-}
-
-var _mFiveByteInVector = _bindings.CreateLazyMarshaler(FiveByteInVector{})
-
-func (msg *FiveByteInVector) Marshaler() _bindings.Marshaler {
-	return _mFiveByteInVector
-}
-
-type ThreeByteInArray struct {
-	_     struct{}     `fidl:"s,9,1" fidl2:"s,9,1"`
-	Elems [3]ThreeByte `fidl:"0"`
-}
-
-var _mThreeByteInArray = _bindings.CreateLazyMarshaler(ThreeByteInArray{})
-
-func (msg *ThreeByteInArray) Marshaler() _bindings.Marshaler {
-	return _mThreeByteInArray
-}
-
-type FiveByteInArray struct {
-	_     struct{}    `fidl:"s,24,4" fidl2:"s,24,4"`
-	Elems [3]FiveByte `fidl:"0"`
-}
-
-var _mFiveByteInArray = _bindings.CreateLazyMarshaler(FiveByteInArray{})
-
-func (msg *FiveByteInArray) Marshaler() _bindings.Marshaler {
-	return _mFiveByteInArray
-}
-
-type MyBool struct {
-	_     struct{} `fidl:"s,1,1" fidl2:"s,1,1"`
-	Value bool     `fidl:"0"`
-}
-
-var _mMyBool = _bindings.CreateLazyMarshaler(MyBool{})
-
-func (msg *MyBool) Marshaler() _bindings.Marshaler {
-	return _mMyBool
-}
-
-type MyByte struct {
-	_     struct{} `fidl:"s,1,1" fidl2:"s,1,1"`
-	Value uint8    `fidl:"0"`
-}
-
-var _mMyByte = _bindings.CreateLazyMarshaler(MyByte{})
-
-func (msg *MyByte) Marshaler() _bindings.Marshaler {
-	return _mMyByte
-}
-
-type MyInt8 struct {
-	_     struct{} `fidl:"s,1,1" fidl2:"s,1,1"`
-	Value int8     `fidl:"0"`
-}
-
-var _mMyInt8 = _bindings.CreateLazyMarshaler(MyInt8{})
-
-func (msg *MyInt8) Marshaler() _bindings.Marshaler {
-	return _mMyInt8
-}
-
-type MyInt16 struct {
-	_     struct{} `fidl:"s,2,2" fidl2:"s,2,2"`
-	Value int16    `fidl:"0"`
-}
-
-var _mMyInt16 = _bindings.CreateLazyMarshaler(MyInt16{})
-
-func (msg *MyInt16) Marshaler() _bindings.Marshaler {
-	return _mMyInt16
-}
-
-type MyInt32 struct {
-	_     struct{} `fidl:"s,4,4" fidl2:"s,4,4"`
-	Value int32    `fidl:"0"`
-}
-
-var _mMyInt32 = _bindings.CreateLazyMarshaler(MyInt32{})
-
-func (msg *MyInt32) Marshaler() _bindings.Marshaler {
-	return _mMyInt32
-}
-
-type MyInt64 struct {
-	_     struct{} `fidl:"s,8,8" fidl2:"s,8,8"`
-	Value int64    `fidl:"0"`
-}
-
-var _mMyInt64 = _bindings.CreateLazyMarshaler(MyInt64{})
-
-func (msg *MyInt64) Marshaler() _bindings.Marshaler {
-	return _mMyInt64
-}
-
-type MyUint8 struct {
-	_     struct{} `fidl:"s,1,1" fidl2:"s,1,1"`
-	Value uint8    `fidl:"0"`
-}
-
-var _mMyUint8 = _bindings.CreateLazyMarshaler(MyUint8{})
-
-func (msg *MyUint8) Marshaler() _bindings.Marshaler {
-	return _mMyUint8
-}
-
-type MyUint16 struct {
-	_     struct{} `fidl:"s,2,2" fidl2:"s,2,2"`
-	Value uint16   `fidl:"0"`
-}
-
-var _mMyUint16 = _bindings.CreateLazyMarshaler(MyUint16{})
-
-func (msg *MyUint16) Marshaler() _bindings.Marshaler {
-	return _mMyUint16
-}
-
-type MyUint32 struct {
-	_     struct{} `fidl:"s,4,4" fidl2:"s,4,4"`
-	Value uint32   `fidl:"0"`
-}
-
-var _mMyUint32 = _bindings.CreateLazyMarshaler(MyUint32{})
-
-func (msg *MyUint32) Marshaler() _bindings.Marshaler {
-	return _mMyUint32
-}
-
-type MyUint64 struct {
-	_     struct{} `fidl:"s,8,8" fidl2:"s,8,8"`
-	Value uint64   `fidl:"0"`
-}
-
-var _mMyUint64 = _bindings.CreateLazyMarshaler(MyUint64{})
-
-func (msg *MyUint64) Marshaler() _bindings.Marshaler {
-	return _mMyUint64
-}
-
-type MyFloat32 struct {
-	_     struct{} `fidl:"s,4,4" fidl2:"s,4,4"`
-	Value float32  `fidl:"0"`
-}
-
-var _mMyFloat32 = _bindings.CreateLazyMarshaler(MyFloat32{})
-
-func (msg *MyFloat32) Marshaler() _bindings.Marshaler {
-	return _mMyFloat32
-}
-
-type MyFloat64 struct {
-	_     struct{} `fidl:"s,8,8" fidl2:"s,8,8"`
-	Value float64  `fidl:"0"`
-}
-
-var _mMyFloat64 = _bindings.CreateLazyMarshaler(MyFloat64{})
-
-func (msg *MyFloat64) Marshaler() _bindings.Marshaler {
-	return _mMyFloat64
-}
-
-type StructWithOptionals struct {
-	_   struct{}               `fidl:"s,104,8" fidl2:"s,104,8"`
-	S   EmptyStruct            `fidl:"0"`
-	S2  *EmptyStruct           `fidl:"8"`
-	T   TableWithEmptyStruct   `fidl:"16"`
-	Xu  XUnionWithEmptyStruct  `fidl:"32"`
-	Xu2 *XUnionWithEmptyStruct `fidl:"56"`
-	U   UnionWithEmptyStruct   `fidl:"80"`
-	U2  *UnionWithEmptyStruct  `fidl:"96"`
-}
-
-var _mStructWithOptionals = _bindings.CreateLazyMarshaler(StructWithOptionals{})
-
-func (msg *StructWithOptionals) Marshaler() _bindings.Marshaler {
-	return _mStructWithOptionals
-}
-
-type Int64Struct struct {
-	_ struct{} `fidl:"s,8,8" fidl2:"s,8,8"`
-	X int64    `fidl:"0"`
-}
-
-var _mInt64Struct = _bindings.CreateLazyMarshaler(Int64Struct{})
-
-func (msg *Int64Struct) Marshaler() _bindings.Marshaler {
-	return _mInt64Struct
-}
-
-type TestInlineXUnionInStruct struct {
-	_      struct{}     `fidl:"s,56,8" fidl2:"s,56,8"`
-	Before string       `fidl:"0,"`
-	Xu     SampleXUnion `fidl:"16"`
-	After  string       `fidl:"40,"`
-}
-
-var _mTestInlineXUnionInStruct = _bindings.CreateLazyMarshaler(TestInlineXUnionInStruct{})
-
-func (msg *TestInlineXUnionInStruct) Marshaler() _bindings.Marshaler {
-	return _mTestInlineXUnionInStruct
-}
-
-type TestOptionalXUnionInStruct struct {
-	_      struct{}      `fidl:"s,56,8" fidl2:"s,56,8"`
-	Before string        `fidl:"0,"`
-	Xu     *SampleXUnion `fidl:"16"`
-	After  string        `fidl:"40,"`
-}
-
-var _mTestOptionalXUnionInStruct = _bindings.CreateLazyMarshaler(TestOptionalXUnionInStruct{})
-
-func (msg *TestOptionalXUnionInStruct) Marshaler() _bindings.Marshaler {
-	return _mTestOptionalXUnionInStruct
-}
-
-type TestStrictXUnionInStruct struct {
-	_  struct{}           `fidl:"s,24,8" fidl2:"s,24,8"`
-	Xu SampleStrictXUnion `fidl:"0"`
-}
-
-var _mTestStrictXUnionInStruct = _bindings.CreateLazyMarshaler(TestStrictXUnionInStruct{})
-
-func (msg *TestStrictXUnionInStruct) Marshaler() _bindings.Marshaler {
-	return _mTestStrictXUnionInStruct
-}
-
-type TestFlexibleXUnionInStruct struct {
-	_  struct{}     `fidl:"s,24,8" fidl2:"s,24,8"`
-	Xu SampleXUnion `fidl:"0"`
-}
-
-var _mTestFlexibleXUnionInStruct = _bindings.CreateLazyMarshaler(TestFlexibleXUnionInStruct{})
-
-func (msg *TestFlexibleXUnionInStruct) Marshaler() _bindings.Marshaler {
-	return _mTestFlexibleXUnionInStruct
-}
-
-type I_ipAddressConfigTag uint32
-
-const (
-	_ I_ipAddressConfigTag = iota
-	IpAddressConfigPaddingSize24Align4
-	IpAddressConfigDhcp
-)
-
-type IpAddressConfig struct {
-	I_ipAddressConfigTag `fidl:"u,28,4" fidl2:"u,28,4"`
-	PaddingSize24Align4  [6]uint32 `fidl:"1136452149"`
-	Dhcp                 bool      `fidl:"1619238975"`
-}
-
-func (u *IpAddressConfig) Which() I_ipAddressConfigTag {
-	return u.I_ipAddressConfigTag
-}
-
-func (u *IpAddressConfig) SetPaddingSize24Align4(paddingSize24Align4 [6]uint32) {
-	u.I_ipAddressConfigTag = IpAddressConfigPaddingSize24Align4
-	u.PaddingSize24Align4 = paddingSize24Align4
-}
-
-func IpAddressConfigWithPaddingSize24Align4(paddingSize24Align4 [6]uint32) IpAddressConfig {
-	var _u IpAddressConfig
-	_u.SetPaddingSize24Align4(paddingSize24Align4)
-	return _u
-}
-
-func (u *IpAddressConfig) SetDhcp(dhcp bool) {
-	u.I_ipAddressConfigTag = IpAddressConfigDhcp
-	u.Dhcp = dhcp
-}
-
-func IpAddressConfigWithDhcp(dhcp bool) IpAddressConfig {
-	var _u IpAddressConfig
-	_u.SetDhcp(dhcp)
-	return _u
-}
-
-type I_unionWithBoundStringTag uint32
-
-const (
-	_ I_unionWithBoundStringTag = iota
-	UnionWithBoundStringBoundFiveStr
-)
-
-type UnionWithBoundString struct {
-	I_unionWithBoundStringTag `fidl:"u,24,8" fidl2:"u,24,8"`
-	BoundFiveStr              string `fidl:"921366385,5"`
-}
-
-func (u *UnionWithBoundString) Which() I_unionWithBoundStringTag {
-	return u.I_unionWithBoundStringTag
-}
-
-func (u *UnionWithBoundString) SetBoundFiveStr(boundFiveStr string) {
-	u.I_unionWithBoundStringTag = UnionWithBoundStringBoundFiveStr
-	u.BoundFiveStr = boundFiveStr
-}
-
-func UnionWithBoundStringWithBoundFiveStr(boundFiveStr string) UnionWithBoundString {
-	var _u UnionWithBoundString
-	_u.SetBoundFiveStr(boundFiveStr)
-	return _u
-}
-
-type I_unionWithEmptyStructTag uint32
-
-const (
-	_ I_unionWithEmptyStructTag = iota
-	UnionWithEmptyStructS
-	UnionWithEmptyStructForceAlignmentOf8
-)
-
-type UnionWithEmptyStruct struct {
-	I_unionWithEmptyStructTag `fidl:"u,16,8" fidl2:"u,16,8"`
-	S                         EmptyStruct `fidl:"2012545430"`
-	ForceAlignmentOf8         uint64      `fidl:"919083790"`
-}
-
-func (u *UnionWithEmptyStruct) Which() I_unionWithEmptyStructTag {
-	return u.I_unionWithEmptyStructTag
-}
-
-func (u *UnionWithEmptyStruct) SetS(s EmptyStruct) {
-	u.I_unionWithEmptyStructTag = UnionWithEmptyStructS
-	u.S = s
-}
-
-func UnionWithEmptyStructWithS(s EmptyStruct) UnionWithEmptyStruct {
-	var _u UnionWithEmptyStruct
-	_u.SetS(s)
-	return _u
-}
-
-func (u *UnionWithEmptyStruct) SetForceAlignmentOf8(forceAlignmentOf8 uint64) {
-	u.I_unionWithEmptyStructTag = UnionWithEmptyStructForceAlignmentOf8
-	u.ForceAlignmentOf8 = forceAlignmentOf8
-}
-
-func UnionWithEmptyStructWithForceAlignmentOf8(forceAlignmentOf8 uint64) UnionWithEmptyStruct {
-	var _u UnionWithEmptyStruct
-	_u.SetForceAlignmentOf8(forceAlignmentOf8)
-	return _u
-}
-
 type I_simpleUnionTag uint32
 
 const (
@@ -660,15 +553,17 @@
 	SimpleUnionI32
 	SimpleUnionI64
 	SimpleUnionS
+	SimpleUnionOs
 	SimpleUnionStr
 )
 
 type SimpleUnion struct {
-	I_simpleUnionTag `fidl:"u,24,8" fidl2:"u,24,8"`
-	I32              int32       `fidl:"1667828146"`
-	I64              int64       `fidl:"1110539033"`
-	S                Int64Struct `fidl:"684890561"`
-	Str              string      `fidl:"498325473,"`
+	I_simpleUnionTag `fidl:"u,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+	I32              int32        `fidl:"1667828146"`
+	I64              int64        `fidl:"1110539033"`
+	S                Int64Struct  `fidl:"684890561"`
+	Os               *Int64Struct `fidl:"1501363482"`
+	Str              string       `fidl:"498325473,"`
 }
 
 func (u *SimpleUnion) Which() I_simpleUnionTag {
@@ -708,6 +603,17 @@
 	return _u
 }
 
+func (u *SimpleUnion) SetOs(os *Int64Struct) {
+	u.I_simpleUnionTag = SimpleUnionOs
+	u.Os = os
+}
+
+func SimpleUnionWithOs(os *Int64Struct) SimpleUnion {
+	var _u SimpleUnion
+	_u.SetOs(os)
+	return _u
+}
+
 func (u *SimpleUnion) SetStr(str string) {
 	u.I_simpleUnionTag = SimpleUnionStr
 	u.Str = str
@@ -719,43 +625,113 @@
 	return _u
 }
 
-type I_xUnionWithEmptyStructTag uint32
+type I_unionWithEmptyStructTag uint32
 
 const (
-	XUnionWithEmptyStruct_unknownData = 0          // 0x00000000
-	XUnionWithEmptyStructS            = 1956241662 // 0x7499e0fe
+	_ I_unionWithEmptyStructTag = iota
+	UnionWithEmptyStructS
+	UnionWithEmptyStructS2
 )
 
-type XUnionWithEmptyStruct struct {
-	I_xUnionWithEmptyStructTag `fidl:"x,24,8" fidl2:"x,24,8"`
-	I_unknownData              []byte
-	S                          EmptyStruct `fidl:"1956241662" fidl2:"1956241662"`
+type UnionWithEmptyStruct struct {
+	I_unionWithEmptyStructTag `fidl:"u,16,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+	S                         EmptyStruct  `fidl:"2012545430"`
+	S2                        *EmptyStruct `fidl:"1404939714"`
 }
 
-func (_m *XUnionWithEmptyStruct) Which() I_xUnionWithEmptyStructTag {
-	switch _m.I_xUnionWithEmptyStructTag {
-	case 1956241662:
-		return XUnionWithEmptyStructS
-	default:
-		return XUnionWithEmptyStruct_unknownData
-	}
+func (u *UnionWithEmptyStruct) Which() I_unionWithEmptyStructTag {
+	return u.I_unionWithEmptyStructTag
 }
 
-func (_m *XUnionWithEmptyStruct) Ordinal() uint32 {
-	return uint32(_m.I_xUnionWithEmptyStructTag)
+func (u *UnionWithEmptyStruct) SetS(s EmptyStruct) {
+	u.I_unionWithEmptyStructTag = UnionWithEmptyStructS
+	u.S = s
 }
 
-func (_m *XUnionWithEmptyStruct) SetS(s EmptyStruct) {
-	_m.I_xUnionWithEmptyStructTag = XUnionWithEmptyStructS
-	_m.S = s
-}
-
-func XUnionWithEmptyStructWithS(s EmptyStruct) XUnionWithEmptyStruct {
-	var _u XUnionWithEmptyStruct
+func UnionWithEmptyStructWithS(s EmptyStruct) UnionWithEmptyStruct {
+	var _u UnionWithEmptyStruct
 	_u.SetS(s)
 	return _u
 }
 
+func (u *UnionWithEmptyStruct) SetS2(s2 *EmptyStruct) {
+	u.I_unionWithEmptyStructTag = UnionWithEmptyStructS2
+	u.S2 = s2
+}
+
+func UnionWithEmptyStructWithS2(s2 *EmptyStruct) UnionWithEmptyStruct {
+	var _u UnionWithEmptyStruct
+	_u.SetS2(s2)
+	return _u
+}
+
+type I_ipAddressConfigTag uint32
+
+const (
+	_ I_ipAddressConfigTag = iota
+	IpAddressConfigPaddingSize24Align4
+	IpAddressConfigDhcp
+)
+
+type IpAddressConfig struct {
+	I_ipAddressConfigTag `fidl:"u,28,4" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+	PaddingSize24Align4  [6]uint32 `fidl:"1136452149"`
+	Dhcp                 bool      `fidl:"1619238975"`
+}
+
+func (u *IpAddressConfig) Which() I_ipAddressConfigTag {
+	return u.I_ipAddressConfigTag
+}
+
+func (u *IpAddressConfig) SetPaddingSize24Align4(paddingSize24Align4 [6]uint32) {
+	u.I_ipAddressConfigTag = IpAddressConfigPaddingSize24Align4
+	u.PaddingSize24Align4 = paddingSize24Align4
+}
+
+func IpAddressConfigWithPaddingSize24Align4(paddingSize24Align4 [6]uint32) IpAddressConfig {
+	var _u IpAddressConfig
+	_u.SetPaddingSize24Align4(paddingSize24Align4)
+	return _u
+}
+
+func (u *IpAddressConfig) SetDhcp(dhcp bool) {
+	u.I_ipAddressConfigTag = IpAddressConfigDhcp
+	u.Dhcp = dhcp
+}
+
+func IpAddressConfigWithDhcp(dhcp bool) IpAddressConfig {
+	var _u IpAddressConfig
+	_u.SetDhcp(dhcp)
+	return _u
+}
+
+type I_unionWithBoundStringTag uint32
+
+const (
+	_ I_unionWithBoundStringTag = iota
+	UnionWithBoundStringBoundFiveStr
+)
+
+type UnionWithBoundString struct {
+	I_unionWithBoundStringTag `fidl:"u,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+	BoundFiveStr              string `fidl:"921366385,5"`
+}
+
+func (u *UnionWithBoundString) Which() I_unionWithBoundStringTag {
+	return u.I_unionWithBoundStringTag
+}
+
+func (u *UnionWithBoundString) SetBoundFiveStr(boundFiveStr string) {
+	u.I_unionWithBoundStringTag = UnionWithBoundStringBoundFiveStr
+	u.BoundFiveStr = boundFiveStr
+}
+
+func UnionWithBoundStringWithBoundFiveStr(boundFiveStr string) UnionWithBoundString {
+	var _u UnionWithBoundString
+	_u.SetBoundFiveStr(boundFiveStr)
+	return _u
+}
+
 type I_sampleXUnionTag uint32
 
 const (
@@ -766,7 +742,7 @@
 )
 
 type SampleXUnion struct {
-	I_sampleXUnionTag `fidl:"x,24,8" fidl2:"x,24,8"`
+	I_sampleXUnionTag `fidl:"x,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	I_unknownData     []byte
 	U                 uint32      `fidl:"949769906" fidl2:"949769906"`
 	Su                SimpleUnion `fidl:"2033143581" fidl2:"2033143581"`
@@ -832,7 +808,7 @@
 )
 
 type SampleStrictXUnion struct {
-	I_sampleStrictXUnionTag `fidl:"x!,24,8" fidl2:"x!,24,8"`
+	I_sampleStrictXUnionTag `fidl:"x!,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	U                       uint32      `fidl:"149088882" fidl2:"149088882"`
 	Su                      SimpleUnion `fidl:"670279483" fidl2:"670279483"`
 	St                      SimpleTable `fidl:"925062383" fidl2:"925062383"`
@@ -879,8 +855,75 @@
 	return _u
 }
 
+type I_xUnionWithEmptyStructTag uint32
+
+const (
+	XUnionWithEmptyStruct_unknownData = 0          // 0x00000000
+	XUnionWithEmptyStructS            = 1956241662 // 0x7499e0fe
+)
+
+type XUnionWithEmptyStruct struct {
+	I_xUnionWithEmptyStructTag `fidl:"x,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+	I_unknownData              []byte
+	S                          EmptyStruct `fidl:"1956241662" fidl2:"1956241662"`
+}
+
+func (_m *XUnionWithEmptyStruct) Which() I_xUnionWithEmptyStructTag {
+	switch _m.I_xUnionWithEmptyStructTag {
+	case 1956241662:
+		return XUnionWithEmptyStructS
+	default:
+		return XUnionWithEmptyStruct_unknownData
+	}
+}
+
+func (_m *XUnionWithEmptyStruct) Ordinal() uint32 {
+	return uint32(_m.I_xUnionWithEmptyStructTag)
+}
+
+func (_m *XUnionWithEmptyStruct) SetS(s EmptyStruct) {
+	_m.I_xUnionWithEmptyStructTag = XUnionWithEmptyStructS
+	_m.S = s
+}
+
+func XUnionWithEmptyStructWithS(s EmptyStruct) XUnionWithEmptyStruct {
+	var _u XUnionWithEmptyStruct
+	_u.SetS(s)
+	return _u
+}
+
+type TableWithEmptyStruct struct {
+	_        struct{}    `fidl:"t,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+	S        EmptyStruct `fidl:"1" fidl2:"1"`
+	SPresent bool
+}
+
+func (u *TableWithEmptyStruct) SetS(s EmptyStruct) {
+	u.S = s
+	u.SPresent = true
+}
+
+func (u *TableWithEmptyStruct) GetS() EmptyStruct {
+	return u.S
+}
+
+func (u *TableWithEmptyStruct) GetSWithDefault(_default EmptyStruct) EmptyStruct {
+	if !u.HasS() {
+		return _default
+	}
+	return u.S
+}
+
+func (u *TableWithEmptyStruct) HasS() bool {
+	return u.SPresent
+}
+
+func (u *TableWithEmptyStruct) ClearS() {
+	u.SPresent = false
+}
+
 type XUnionInTable struct {
-	_             struct{} `fidl:"t,16,8" fidl2:"t,16,8"`
+	_             struct{} `fidl:"t,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
 	Before        string   `fidl:"1," fidl2:"1,"`
 	BeforePresent bool
 	Xu            SampleXUnion `fidl:"2" fidl2:"2"`
@@ -962,7 +1005,7 @@
 }
 
 type SimpleTable struct {
-	_        struct{} `fidl:"t,16,8" fidl2:"t,16,8"`
+	_        struct{} `fidl:"t,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
 	X        int64    `fidl:"1" fidl2:"1"`
 	XPresent bool
 	Y        int64 `fidl:"5" fidl2:"5"`
@@ -1018,7 +1061,7 @@
 }
 
 type TableWithStringAndVector struct {
-	_          struct{} `fidl:"t,16,8" fidl2:"t,16,8"`
+	_          struct{} `fidl:"t,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
 	Foo        string   `fidl:"1," fidl2:"1,"`
 	FooPresent bool
 	Bar        int32 `fidl:"2" fidl2:"2"`
@@ -1099,36 +1142,6 @@
 	u.BazPresent = false
 }
 
-type TableWithEmptyStruct struct {
-	_        struct{}    `fidl:"t,16,8" fidl2:"t,16,8"`
-	S        EmptyStruct `fidl:"1" fidl2:"1"`
-	SPresent bool
-}
-
-func (u *TableWithEmptyStruct) SetS(s EmptyStruct) {
-	u.S = s
-	u.SPresent = true
-}
-
-func (u *TableWithEmptyStruct) GetS() EmptyStruct {
-	return u.S
-}
-
-func (u *TableWithEmptyStruct) GetSWithDefault(_default EmptyStruct) EmptyStruct {
-	if !u.HasS() {
-		return _default
-	}
-	return u.S
-}
-
-func (u *TableWithEmptyStruct) HasS() bool {
-	return u.SPresent
-}
-
-func (u *TableWithEmptyStruct) ClearS() {
-	u.SPresent = false
-}
-
 type EthernetDeviceInterface _bindings.ChannelProxy
 
 type EthernetDevice interface {
diff --git a/src/syscall/zx/fidl/encoding_new.go b/src/syscall/zx/fidl/encoding_new.go
index 69e73f3..4bb11a9 100644
--- a/src/syscall/zx/fidl/encoding_new.go
+++ b/src/syscall/zx/fidl/encoding_new.go
@@ -71,9 +71,14 @@
 	m.delegate = MustCreateMarshaler(m.sample)
 }
 
-func (m *lazyMarshaler) getSize() int {
+func (m *lazyMarshaler) getMarshalSize(ctx MarshalerContext) int {
 	m.once.Do(m.init)
-	return m.delegate.getSize()
+	return m.delegate.getMarshalSize(ctx)
+}
+
+func (m *lazyMarshaler) getUnmarshalSize(ctx MarshalerContext) int {
+	m.once.Do(m.init)
+	return m.delegate.getUnmarshalSize(ctx)
 }
 
 func (m *lazyMarshaler) marshal(ctx MarshalerContext, v reflect.Value, out *encoder) error {
@@ -88,21 +93,25 @@
 
 // Marshal marshals (or encodes) a message into the data and handles slices.
 func Marshal(message Message, data []byte, handles []zx.Handle) (int, int, error) {
+	return MarshalWithContext(MarshalerContext{}, message, data, handles)
+}
+
+// Marshal marshals (or encodes) a message into the data and handles slices.
+func MarshalWithContext(ctx MarshalerContext, message Message, data []byte, handles []zx.Handle) (int, int, error) {
 	// By construction, we know that message is a pointer to a struct since
 	// we only generate pointer receiver methods for top-level messages.
 	// Should one implement the interface differently, and call into this
 	// code, it would fail in an obsure way withing relfection. Just don't do
 	// that.
 	var (
-		v   = reflect.ValueOf(message).Elem()
-		m   = message.Marshaler()
-		ctx = MarshalerContext{}
+		v = reflect.ValueOf(message).Elem()
+		m = message.Marshaler()
 	)
 
 	// Now, let's get the value of s, marshal the header into a starting
 	// buffer, and then marshal the rest of the payload in s.
 	out := &encoder{buffer: data[:0], handles: handles[:0]}
-	out.head = out.newObject(m.getSize())
+	out.head = out.newObject(m.getMarshalSize(ctx))
 	if err := m.marshal(ctx, v, out); err != nil {
 		return 0, 0, err
 	}
@@ -115,8 +124,6 @@
 	return UnmarshalWithContext(MarshalerContext{}, data, handles, message)
 }
 
-// UnmarshalWithConext is currently used only for transitioning from union to xunion.
-// The context, however, may be useful at a later date.
 func UnmarshalWithContext(ctx MarshalerContext, data []byte, handles []zx.Handle, message Message) (int, int, error) {
 	// By construction, we know that message is a pointer to a struct since
 	// we only generate pointer receiver methods for top-level messages.
@@ -129,7 +136,7 @@
 	)
 
 	// Get the payload's value and unmarshal it.
-	nextObject := align(m.getSize(), 8)
+	nextObject := align(m.getUnmarshalSize(ctx), 8)
 	in := &decoder{
 		buffer:     data,
 		handles:    handles,
@@ -142,6 +149,8 @@
 }
 
 const tagKey = "fidl"
+const tagSizeV1NoEE = "fidl_size_v1_no_ee"
+const tagAlignmentV1NoEE = "fidl_alignment_v1_no_ee"
 
 type tagKind int
 
@@ -174,14 +183,15 @@
 
 func createMarshaler(typ reflect.Type) (Marshaler, error) {
 	// field 0 holds the tag
-	marshalerKind, marshalerBounds := readTag(typ.Field(0))
+	tagField := typ.Field(0)
+	marshalerKind, marshalerBounds := readTag(tagField)
 	var (
-		kind      = marshalerKind
-		size      = marshalerBounds[0]
-		alignment = marshalerBounds[1]
-		fields    []mField
-		ordinals  []int
-		offsets   []int
+		kind         = marshalerKind
+		sizeOld      = marshalerBounds[0]
+		alignmentOld = marshalerBounds[1]
+		fields       []mField
+		ordinals     []int
+		offsets      []int
 	)
 	// field 1 and up are the actual data fields
 	// - structs, unions, and xunions have fields one after the other;
@@ -213,6 +223,15 @@
 		}
 	}
 
+	sizeV1NoEE, err := readIntTag(tagField, tagSizeV1NoEE)
+	if err != nil {
+		return nil, errors.New("error creating marshaller for " + typ.String() + ": " + err.Error())
+	}
+	alignmentV1NoEE, err := readIntTag(tagField, tagAlignmentV1NoEE)
+	if err != nil {
+		return nil, errors.New("error creating marshaller for " + typ.String() + ": " + err.Error())
+	}
+
 	switch kind {
 	case structTag:
 		if len(fields) == 0 {
@@ -227,16 +246,20 @@
 			})
 		}
 		return mStruct{
-			fields:    structFields,
-			size:      size,
-			alignment: alignment,
+			fields:          structFields,
+			sizeOld:         sizeOld,
+			alignmentOld:    alignmentOld,
+			sizeV1NoEE:      sizeV1NoEE,
+			alignmentV1NoEE: alignmentV1NoEE,
 		}, nil
 	case unionTag:
 		return mUnion{
-			fields:    fields,
-			ordinals:  ordinals,
-			size:      size,
-			alignment: alignment,
+			fields:          fields,
+			ordinals:        ordinals,
+			sizeOld:         sizeOld,
+			alignmentOld:    alignmentOld,
+			sizeV1NoEE:      sizeV1NoEE,
+			alignmentV1NoEE: alignmentV1NoEE,
 		}, nil
 	case xunionTag, strictXunionTag:
 		strictness := strictness(kind == strictXunionTag)
@@ -246,23 +269,39 @@
 			ordinalToFields[ordinals[i]] = fields[i]
 		}
 		return mXUnion{
-			fields:     ordinalToFields,
-			size:       size,
-			alignment:  alignment,
-			strictness: strictness,
+			fields:          ordinalToFields,
+			sizeOld:         sizeOld,
+			alignmentOld:    alignmentOld,
+			sizeV1NoEE:      sizeV1NoEE,
+			alignmentV1NoEE: alignmentV1NoEE,
+			strictness:      strictness,
 		}, nil
 	case tableTag:
 		return mTable{
-			fields:    fields,
-			size:      size,
-			alignment: alignment,
-			ordinals:  ordinals,
+			fields:          fields,
+			sizeOld:         sizeOld,
+			alignmentOld:    alignmentOld,
+			sizeV1NoEE:      sizeV1NoEE,
+			alignmentV1NoEE: alignmentV1NoEE,
+			ordinals:        ordinals,
 		}, nil
 	default:
 		return nil, errors.New("missing kind marker on " + nicefmt(typ))
 	}
 }
 
+func readIntTag(field reflect.StructField, tagKey string) (int, error) {
+	content, ok := field.Tag.Lookup(tagKey)
+	if !ok {
+		return 0, errors.New("tag " + tagKey + " not found")
+	}
+	res, err := strconv.ParseInt(content, 0, 64)
+	if err != nil {
+		return 0, errors.New("error parsing int body from tag " + tagKey + " " + err.Error())
+	}
+	return int(res), nil
+}
+
 // readTag reads a fidl tag which can be one of
 //
 //     s,size,alignment   -- marking a struct, with its size, and alignment
@@ -426,11 +465,15 @@
 }
 
 type MarshalerContext struct {
-	DecodeUnionsFromXunionBytes bool
+	DecodeUnionsFromXUnionBytes bool
+	EncodeUnionsAsXUnionBytes   bool
 }
 
 type Marshaler interface {
-	getSize() int
+	// Marshal and unmarshal sizes can be different because they can be context dependent.
+	// e.g. it is possible to write a new format but still read the old format
+	getMarshalSize(ctx MarshalerContext) int
+	getUnmarshalSize(ctx MarshalerContext) int
 	marshal(ctx MarshalerContext, v reflect.Value, out *encoder) error
 	unmarshal(ctx MarshalerContext, in *decoder, v reflect.Value) error
 }
@@ -467,41 +510,70 @@
 }
 
 type mStruct struct {
-	fields          []mFieldWithOffset
-	size, alignment int
+	fields                      []mFieldWithOffset
+	sizeOld, alignmentOld       int
+	sizeV1NoEE, alignmentV1NoEE int
 }
 
-func (m mStruct) getSize() int {
-	return m.size
+func (m mStruct) getMarshalSize(ctx MarshalerContext) int {
+	if ctx.EncodeUnionsAsXUnionBytes {
+		return m.sizeV1NoEE
+	}
+	return m.sizeOld
+}
+
+func (m mStruct) getUnmarshalSize(ctx MarshalerContext) int {
+	if ctx.DecodeUnionsFromXUnionBytes {
+		return m.sizeV1NoEE
+	}
+	return m.sizeOld
+}
+
+func (m mStruct) getMarshalAlignment(ctx MarshalerContext) int {
+	if ctx.EncodeUnionsAsXUnionBytes {
+		return m.alignmentV1NoEE
+	}
+	return m.alignmentOld
+}
+
+func (m mStruct) getUnmarshalAlignment(ctx MarshalerContext) int {
+	if ctx.DecodeUnionsFromXUnionBytes {
+		return m.alignmentV1NoEE
+	}
+	return m.alignmentOld
 }
 
 func (m mStruct) marshal(ctx MarshalerContext, v reflect.Value, out *encoder) error {
-	structStart := align(out.head, m.alignment)
+	structStart := align(out.head, m.getMarshalAlignment(ctx))
 	for _, field := range m.fields {
 		out.head = structStart + field.offset
 		if err := field.Marshaler.marshal(ctx, v.Field(field.index), out); err != nil {
 			return err
 		}
 	}
-	out.head = align(out.head, m.alignment)
+	out.head = align(out.head, m.getMarshalAlignment(ctx))
 	return nil
 }
 
 func (m mStruct) unmarshal(ctx MarshalerContext, in *decoder, v reflect.Value) error {
-	structStart := align(in.head, m.alignment)
+	structStart := align(in.head, m.getUnmarshalAlignment(ctx))
 	for _, field := range m.fields {
 		in.head = structStart + field.offset
 		if err := field.Marshaler.unmarshal(ctx, in, v.Field(field.index)); err != nil {
 			return err
 		}
 	}
-	in.head = align(in.head, m.alignment)
+	in.head = align(in.head, m.getUnmarshalAlignment(ctx))
 	return nil
 }
 
 type mEmptyStruct struct{}
 
-func (_ mEmptyStruct) getSize() int {
+func (_ mEmptyStruct) getMarshalSize(ctx MarshalerContext) int {
+	return 1
+}
+
+func (_ mEmptyStruct) getUnmarshalSize(ctx MarshalerContext) int {
 	return 1
 }
 
@@ -522,16 +594,45 @@
 }
 
 type mUnion struct {
-	fields          []mField
-	ordinals        []int
-	size, alignment int
+	fields                      []mField
+	ordinals                    []int
+	sizeOld, alignmentOld       int
+	sizeV1NoEE, alignmentV1NoEE int
 }
 
-func (m mUnion) getSize() int {
-	return m.size
+func (m mUnion) getMarshalSize(ctx MarshalerContext) int {
+	if ctx.EncodeUnionsAsXUnionBytes {
+		return m.sizeV1NoEE
+	}
+	return m.sizeOld
+}
+
+func (m mUnion) getUnmarshalSize(ctx MarshalerContext) int {
+	if ctx.DecodeUnionsFromXUnionBytes {
+		return m.sizeV1NoEE
+	}
+	return m.sizeOld
+}
+
+func (m mUnion) getMarshalAlignment(ctx MarshalerContext) int {
+	if ctx.EncodeUnionsAsXUnionBytes {
+		return m.alignmentV1NoEE
+	}
+	return m.alignmentOld
+}
+
+func (m mUnion) getUnmarshalAlignment(ctx MarshalerContext) int {
+	if ctx.DecodeUnionsFromXUnionBytes {
+		return m.alignmentV1NoEE
+	}
+	return m.alignmentOld
 }
 
 func (m mUnion) marshal(ctx MarshalerContext, v reflect.Value, out *encoder) error {
+	if ctx.EncodeUnionsAsXUnionBytes {
+		return m.marshalAsXUnion(ctx, v, out)
+	}
+
 	// Kind.
 	kind := int(v.Field(0).Uint()) - 1
 	if kind < 0 || len(m.fields) <= kind {
@@ -543,7 +644,7 @@
 	out.writeUint(uint64(kind), 4)
 
 	// Re-align to the union's alignment before writing its field.
-	out.head = align(out.head, m.alignment)
+	out.head = align(out.head, m.getMarshalAlignment(ctx))
 
 	// Marshal field.
 	if err := m.fields[kind].Marshaler.marshal(ctx, v.Field(kind+1), out); err != nil {
@@ -551,15 +652,29 @@
 	}
 
 	// Re-position head.
-	out.head = head + m.size
+	out.head = head + m.getMarshalSize(ctx)
 
 	return nil
 }
 
+func (m mUnion) marshalAsXUnion(ctx MarshalerContext, v reflect.Value, out *encoder) error {
+	// Ordinal.
+	fieldTag := int(v.Field(0).Uint())
+	ordinal, err := strconv.ParseInt(v.Type().Field(fieldTag).Tag.Get("fidl"), 0, 64)
+	if err != nil {
+		return errors.New("error parsing ordinal from tag: " + err.Error())
+	}
+	out.writeUint(uint64(ordinal), 8)
+	// Field.
+	field := m.fields[fieldTag-1]
+	if err := marshalEnvelopePresent(ctx, field, v.Field(field.index), out); err != nil {
+		return err
+	}
+	return nil
+}
+
 func (m mUnion) unmarshal(ctx MarshalerContext, in *decoder, v reflect.Value) error {
-	if ctx.DecodeUnionsFromXunionBytes {
-		// XUnions have 24 bytes before the first out of line element.
-		in.nextObject = in.nextObject + 24 - m.getSize()
+	if ctx.DecodeUnionsFromXUnionBytes {
 		ordinalToFields := make(map[int]mField)
 		for i := 0; i < len(m.fields); i++ {
 			ordinalToFields[m.ordinals[i]] = m.fields[i]
@@ -567,11 +682,11 @@
 		// Just use the xunion unmarshaler because the layout of union and xunion
 		// is the same in go.
 		xunion := mXUnion{
-			fields:        ordinalToFields,
-			unionToXunion: true,
-			size:          m.size,
-			alignment:     m.alignment,
-			strictness:    true,
+			fields:          ordinalToFields,
+			unionToXunion:   true,
+			sizeV1NoEE:      m.sizeV1NoEE,
+			alignmentV1NoEE: m.alignmentV1NoEE,
+			strictness:      true,
 		}
 		return xunion.unmarshal(ctx, in, v)
 	}
@@ -590,7 +705,7 @@
 	v.Field(0).SetUint(kind + 1)
 
 	// Re-align to the union's alignement before writing its field.
-	in.head = align(in.head, m.alignment)
+	in.head = align(in.head, m.getUnmarshalAlignment(ctx))
 
 	// Unmarshal field.
 	ikind := int(kind)
@@ -599,20 +714,31 @@
 	}
 
 	// Re-position head.
-	in.head = head + m.size
+	in.head = head + m.getUnmarshalSize(ctx)
 
 	return nil
 }
 
 type mXUnion struct {
-	fields          map[int]mField
-	unionToXunion   bool
-	size, alignment int
+	fields                      map[int]mField
+	unionToXunion               bool
+	sizeOld, alignmentOld       int
+	sizeV1NoEE, alignmentV1NoEE int
 	strictness
 }
 
-func (m mXUnion) getSize() int {
-	return m.size
+func (m mXUnion) getMarshalSize(ctx MarshalerContext) int {
+	if ctx.EncodeUnionsAsXUnionBytes {
+		return m.sizeV1NoEE
+	}
+	return m.sizeOld
+}
+
+func (m mXUnion) getUnmarshalSize(ctx MarshalerContext) int {
+	if ctx.DecodeUnionsFromXUnionBytes {
+		return m.sizeV1NoEE
+	}
+	return m.sizeOld
 }
 
 func (m mXUnion) marshal(ctx MarshalerContext, v reflect.Value, out *encoder) error {
@@ -735,8 +861,12 @@
 	typ reflect.Type
 }
 
-func (m mOptXUnion) getSize() int {
-	return m.size
+func (m mOptXUnion) getMarshalSize(ctx MarshalerContext) int {
+	return m.mXUnion.getMarshalSize(ctx)
+}
+
+func (m mOptXUnion) getUnmarshalSize(ctx MarshalerContext) int {
+	return m.mXUnion.getUnmarshalSize(ctx)
 }
 
 func (m mOptXUnion) marshal(ctx MarshalerContext, v reflect.Value, out *encoder) error {
@@ -754,13 +884,24 @@
 }
 
 type mTable struct {
-	fields          []mField
-	size, alignment int
-	ordinals        []int
+	fields                      []mField
+	ordinals                    []int
+	sizeOld, alignmentOld       int
+	sizeV1NoEE, alignmentV1NoEE int
 }
 
-func (m mTable) getSize() int {
-	return m.size
+func (m mTable) getMarshalSize(ctx MarshalerContext) int {
+	if ctx.EncodeUnionsAsXUnionBytes {
+		return m.sizeV1NoEE
+	}
+	return m.sizeOld
+}
+
+func (m mTable) getUnmarshalSize(ctx MarshalerContext) int {
+	if ctx.DecodeUnionsFromXUnionBytes {
+		return m.sizeV1NoEE
+	}
+	return m.sizeOld
 }
 
 const envelopeSize = 16
@@ -779,7 +920,7 @@
 	numHandles := len(out.handles)
 	numBytes := len(out.buffer)
 	head := out.head
-	out.head = out.newObject(m.getSize())
+	out.head = out.newObject(m.getMarshalSize(ctx))
 	if err := m.marshal(ctx, v, out); err != nil {
 		return err
 	}
@@ -876,7 +1017,7 @@
 func unmarshalEnvelopeContent(ctx MarshalerContext, header envelopeHeader, m Marshaler, in *decoder, v reflect.Value, mode unmarshalEnvelopeMode) (bool, error) {
 	savedHead := in.head
 	in.head = in.nextObject
-	in.nextObject += align(m.getSize(), 8)
+	in.nextObject += align(m.getUnmarshalSize(ctx), 8)
 	if err := m.unmarshal(ctx, in, v); err != nil {
 		return false, err
 	}
@@ -1040,7 +1181,11 @@
 	elemTyp reflect.Type
 }
 
-func (m mOptStructUnion) getSize() int {
+func (m mOptStructUnion) getMarshalSize(ctx MarshalerContext) int {
+	return 8
+}
+
+func (m mOptStructUnion) getUnmarshalSize(ctx MarshalerContext) int {
 	return 8
 }
 
@@ -1056,7 +1201,7 @@
 
 	// Set up the out-of-line space and the head.
 	oldHead := out.head
-	out.head = out.newObject(align(m.Marshaler.getSize(), 8))
+	out.head = out.newObject(align(m.Marshaler.getMarshalSize(ctx), 8))
 
 	// Marshal field.
 	if err := m.Marshaler.marshal(ctx, v.Elem(), out); err != nil {
@@ -1091,7 +1236,7 @@
 	// Set up the out-of-line space and the head.
 	oldHead := in.head
 	in.head = in.nextObject
-	in.nextObject += align(m.Marshaler.getSize(), 8)
+	in.nextObject += align(m.Marshaler.getUnmarshalSize(ctx), 8)
 
 	// Unmarshal field.
 	if err := m.Marshaler.unmarshal(ctx, in, v.Elem()); err != nil {
@@ -1109,8 +1254,11 @@
 	size int
 }
 
-func (m mArray) getSize() int {
-	return m.size * m.Marshaler.getSize()
+func (m mArray) getMarshalSize(ctx MarshalerContext) int {
+	return m.size * m.Marshaler.getMarshalSize(ctx)
+}
+func (m mArray) getUnmarshalSize(ctx MarshalerContext) int {
+	return m.size * m.Marshaler.getUnmarshalSize(ctx)
 }
 
 func (m mArray) marshal(ctx MarshalerContext, v reflect.Value, out *encoder) error {
@@ -1138,7 +1286,10 @@
 	isVectorUint8 bool
 }
 
-func (m mVector) getSize() int {
+func (m mVector) getMarshalSize(ctx MarshalerContext) int {
+	return 16
+}
+func (m mVector) getUnmarshalSize(ctx MarshalerContext) int {
 	return 16
 }
 
@@ -1160,7 +1311,7 @@
 
 	// Encode in the out-of-line object.
 	oldHead := out.head
-	out.head = out.newObject(vLen * m.Marshaler.getSize())
+	out.head = out.newObject(vLen * m.Marshaler.getMarshalSize(ctx))
 
 	// Marshal elements.
 	if m.isVectorUint8 {
@@ -1206,7 +1357,7 @@
 	// Unmarshal in the out-of-line object.
 	oldHead := in.head
 	in.head = in.nextObject
-	elemSize := m.Marshaler.getSize()
+	elemSize := m.Marshaler.getUnmarshalSize(ctx)
 	in.nextObject += align(size*elemSize, 8)
 
 	// Unmarshal elements.
@@ -1231,7 +1382,10 @@
 
 type mOptVector mVector
 
-func (m mOptVector) getSize() int {
+func (m mOptVector) getMarshalSize(ctx MarshalerContext) int {
+	return 16
+}
+func (m mOptVector) getUnmarshalSize(ctx MarshalerContext) int {
 	return 16
 }
 
@@ -1268,7 +1422,10 @@
 
 type mBool struct{}
 
-func (m mBool) getSize() int {
+func (m mBool) getMarshalSize(ctx MarshalerContext) int {
+	return 1
+}
+func (m mBool) getUnmarshalSize(ctx MarshalerContext) int {
 	return 1
 }
 
@@ -1298,7 +1455,10 @@
 // int is size (1 for int8, 2 for int16, etc.)
 type mInt int
 
-func (m mInt) getSize() int {
+func (m mInt) getMarshalSize(ctx MarshalerContext) int {
+	return int(m)
+}
+func (m mInt) getUnmarshalSize(ctx MarshalerContext) int {
 	return int(m)
 }
 
@@ -1321,7 +1481,10 @@
 // uint is size (1 for uint8, 2 f   or uint16, etc.)
 type mUint int
 
-func (m mUint) getSize() int {
+func (m mUint) getMarshalSize(ctx MarshalerContext) int {
+	return int(m)
+}
+func (m mUint) getUnmarshalSize(ctx MarshalerContext) int {
 	return int(m)
 }
 
@@ -1343,7 +1506,10 @@
 
 type mFloat32 struct{}
 
-func (m mFloat32) getSize() int {
+func (m mFloat32) getMarshalSize(ctx MarshalerContext) int {
+	return 4
+}
+func (m mFloat32) getUnmarshalSize(ctx MarshalerContext) int {
 	return 4
 }
 
@@ -1363,7 +1529,10 @@
 
 type mFloat64 struct{}
 
-func (m mFloat64) getSize() int {
+func (m mFloat64) getMarshalSize(ctx MarshalerContext) int {
+	return 8
+}
+func (m mFloat64) getUnmarshalSize(ctx MarshalerContext) int {
 	return 8
 }
 
@@ -1383,7 +1552,10 @@
 
 type mString int
 
-func (m mString) getSize() int {
+func (m mString) getMarshalSize(ctx MarshalerContext) int {
+	return 16
+}
+func (m mString) getUnmarshalSize(ctx MarshalerContext) int {
 	return 16
 }
 
@@ -1446,7 +1618,10 @@
 
 type mOptString uint64
 
-func (m mOptString) getSize() int {
+func (m mOptString) getMarshalSize(ctx MarshalerContext) int {
+	return 16
+}
+func (m mOptString) getUnmarshalSize(ctx MarshalerContext) int {
 	return 16
 }
 
@@ -1488,7 +1663,10 @@
 
 type mHandle bool
 
-func (m mHandle) getSize() int {
+func (m mHandle) getMarshalSize(ctx MarshalerContext) int {
+	return 4
+}
+func (m mHandle) getUnmarshalSize(ctx MarshalerContext) int {
 	return 4
 }
 
@@ -1542,8 +1720,11 @@
 // first field is a zx.Channel.
 type mInterface mHandle
 
-func (m mInterface) getSize() int {
-	return mHandle(m).getSize()
+func (m mInterface) getMarshalSize(ctx MarshalerContext) int {
+	return mHandle(m).getMarshalSize(ctx)
+}
+func (m mInterface) getUnmarshalSize(ctx MarshalerContext) int {
+	return mHandle(m).getUnmarshalSize(ctx)
 }
 
 func (m mInterface) marshal(ctx MarshalerContext, v reflect.Value, out *encoder) error {
diff --git a/src/syscall/zx/fidl/fidl_test/encoding_new_test.go b/src/syscall/zx/fidl/fidl_test/encoding_new_test.go
index cb06870..6847ff8 100644
--- a/src/syscall/zx/fidl/fidl_test/encoding_new_test.go
+++ b/src/syscall/zx/fidl/fidl_test/encoding_new_test.go
@@ -867,7 +867,7 @@
 }
 
 func TestUnmarshalXunionIntoUnion(t *testing.T) {
-	const expectedUnionTag = 3 // float32 field
+	const expectedUnionTag = XUnion1AsUnionD
 	const expectedFieldValue = 1.2
 	inHeader := MessageHeader{
 		Flags: [3]byte{
@@ -906,6 +906,118 @@
 	}
 }
 
+func TestUnmarshalXUnionInsideXUnionIntoUnionInsideUnion(t *testing.T) {
+	const expectedOuterUnionTag = UnionInsideUnionB
+	const expectedInnerUnionTag = XUnion1AsUnionD
+	const expectedFieldValue = 1.2
+	inHeader := MessageHeader{
+		Flags: [3]byte{
+			1, // decode unions from xunion bytes flag
+			0,
+			0,
+		},
+	}
+	var respb [zx.ChannelMaxMessageBytes]byte
+	var resph [zx.ChannelMaxMessageHandles]zx.Handle
+	input := XUnionInsideXUnionStruct{U: XUnionInsideXUnionWithB(XUnion1WithD(expectedFieldValue))}
+	if _, _, err := MarshalHeaderThenMessage(&inHeader, &input, respb[:], resph[:]); err != nil {
+		t.Fatalf("error unmarshaling: %v\n", err)
+	}
+	// Set the ordinal values since they come from a different type.
+	// These ordinals come from the generated json/go types.
+	const outerUnionStart = 16
+	respb[outerUnionStart+0] = 0xd0
+	respb[outerUnionStart+1] = 0xe8
+	respb[outerUnionStart+2] = 0x4d
+	respb[outerUnionStart+3] = 0x14
+	const innerUnionStart = outerUnionStart + 24
+	respb[innerUnionStart+0] = 0x24
+	respb[innerUnionStart+1] = 0x94
+	respb[innerUnionStart+2] = 0x6a
+	respb[innerUnionStart+3] = 0x3e
+	var union UnionInsideUnionStruct
+	var outHeader MessageHeader
+	if err := UnmarshalHeaderThenMessage(respb[:], nil, &outHeader, &union); err != nil {
+		t.Fatalf("error marshaling: %v", err)
+	}
+	if inHeader != outHeader {
+		t.Fatalf("want %v, got %v", inHeader, outHeader)
+	}
+	if union.U.I_unionInsideUnionTag != expectedOuterUnionTag {
+		t.Fatalf("want %v, got %v", expectedOuterUnionTag, union.U.I_unionInsideUnionTag)
+	}
+	if union.U.B.I_xUnion1AsUnionTag != expectedInnerUnionTag {
+		t.Fatalf("want %v, got %v", expectedInnerUnionTag, union.U.B.I_xUnion1AsUnionTag)
+	}
+	if union.U.B.D != expectedFieldValue {
+		t.Fatalf("want %v, got %v", expectedFieldValue, union.U.B.D)
+	}
+}
+
+func TestMarshalUnionIntoXUnion(t *testing.T) {
+	const expectedUnionTag = XUnion1AsUnionD
+	const expectedFieldValue = 1.2
+	var unionRespb [zx.ChannelMaxMessageBytes]byte
+	var unionResph [zx.ChannelMaxMessageHandles]zx.Handle
+	unionInput := XUnion1AsUnionStruct{Xuau: XUnion1AsUnionWithD(expectedFieldValue)}
+	ctx := MarshalerContext{EncodeUnionsAsXUnionBytes: true}
+	un, _, err := MarshalWithContext(ctx, &unionInput, unionRespb[:], unionResph[:])
+	if err != nil {
+		t.Fatalf("error marshaling: %v\n", err)
+	}
+	var xunionRespb [zx.ChannelMaxMessageBytes]byte
+	var xunionResph [zx.ChannelMaxMessageHandles]zx.Handle
+	xunionInput := XUnion1Struct{Xu: XUnion1WithD(expectedFieldValue)}
+	xun, _, err := Marshal(&xunionInput, xunionRespb[:], xunionResph[:])
+	if err != nil {
+		t.Fatalf("error unmarshaling: %v\n", err)
+	}
+	// Set the ordinal value to the value in XUnion1AsUnionStruct, since it is
+	// a different type.
+	// This value comes from the generated JSON for test.test.fidl.
+	xunionRespb[0] = 0x24
+	xunionRespb[1] = 0x94
+	xunionRespb[2] = 0x6a
+	xunionRespb[3] = 0x3e
+	if unionRespb != xunionRespb {
+		t.Fatalf("got %v, want %v", unionRespb[:un], xunionRespb[:xun])
+	}
+}
+
+func TestMarshalUnionInsideUnionIntoXUnionInsideXUnion(t *testing.T) {
+	const expectedOuterUnionTag = XUnionInsideXUnionB
+	const expectedInnerUnionTag = XUnion1AsUnionD
+	const expectedFieldValue = 1.2
+	var unionRespb [zx.ChannelMaxMessageBytes]byte
+	var unionResph [zx.ChannelMaxMessageHandles]zx.Handle
+	unionInput := UnionInsideUnionStruct{U: UnionInsideUnionWithB(XUnion1AsUnionWithD(expectedFieldValue))}
+	ctx := MarshalerContext{EncodeUnionsAsXUnionBytes: true}
+	un, _, err := MarshalWithContext(ctx, &unionInput, unionRespb[:], unionResph[:])
+	if err != nil {
+		t.Fatalf("error marshaling: %v\n", err)
+	}
+	var xunionRespb [zx.ChannelMaxMessageBytes]byte
+	var xunionResph [zx.ChannelMaxMessageHandles]zx.Handle
+	xunionInput := XUnionInsideXUnionStruct{U: XUnionInsideXUnionWithB(XUnion1WithD(expectedFieldValue))}
+	xun, _, err := Marshal(&xunionInput, xunionRespb[:], xunionResph[:])
+	if err != nil {
+		t.Fatalf("error unmarshaling: %v\n", err)
+	}
+	// The ordinals of the union and equivalent xunion differ.
+	// Set the inner and outer ordinals on the xunion object.
+	xunionRespb[0] = 0xd0
+	xunionRespb[1] = 0xe8
+	xunionRespb[2] = 0x4d
+	xunionRespb[3] = 0x14
+	xunionRespb[24] = 0x24
+	xunionRespb[25] = 0x94
+	xunionRespb[26] = 0x6a
+	xunionRespb[27] = 0x3e
+	if unionRespb != xunionRespb {
+		t.Fatalf("got %v, want %v", unionRespb[:un], xunionRespb[:xun])
+	}
+}
+
 func benchmarkMarshal(b *testing.B, ex example) {
 	b.Run(ex.name, func(b *testing.B) {
 		b.StopTimer()
diff --git a/src/syscall/zx/fidl/interface_test.go b/src/syscall/zx/fidl/interface_test.go
index 4ae95b0..c6999e5 100644
--- a/src/syscall/zx/fidl/interface_test.go
+++ b/src/syscall/zx/fidl/interface_test.go
@@ -22,7 +22,7 @@
 var _ fidl.Message = (*message)(nil)
 
 type message struct {
-	_ struct{} `fidl:"s,1,0" fidl2:"s,1,0"`
+	_ struct{} `fidl:"s,1,0" fidl_size_v1_no_ee:"1" fidl_alignment_v1_no_ee:"0"`
 }
 
 var _mMessage = fidl.MustCreateMarshaler(message{})
diff --git a/src/syscall/zx/fidl/message.go b/src/syscall/zx/fidl/message.go
index 23a4be7..9007e09 100644
--- a/src/syscall/zx/fidl/message.go
+++ b/src/syscall/zx/fidl/message.go
@@ -34,7 +34,7 @@
 
 // MessageHeader represents a transactional message header.
 type MessageHeader struct {
-	_       struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
+	_       struct{} `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
 	Txid    uint32   `fidl:"0"`
 	Flags   [3]uint8 `fidl:"4"`
 	Magic   uint8    `fidl:"7"`
@@ -43,7 +43,7 @@
 
 var mMessageHeader = MustCreateMarshaler(MessageHeader{})
 
-var MessageHeaderSize = mMessageHeader.getSize()
+var MessageHeaderSize = 16
 
 func (msg *MessageHeader) Marshaler() Marshaler {
 	return mMessageHeader
@@ -79,7 +79,7 @@
 		return nil
 	}
 	ctx := MarshalerContext{
-		DecodeUnionsFromXunionBytes: shouldDecodeUnionsFromXunionBytes(header),
+		DecodeUnionsFromXUnionBytes: shouldDecodeUnionsFromXUnionBytes(header),
 	}
 	if _, _, err := UnmarshalWithContext(ctx, data[hnb:], handles, body); err != nil {
 		return err
@@ -87,7 +87,7 @@
 	return nil
 }
 
-func shouldDecodeUnionsFromXunionBytes(header *MessageHeader) bool {
+func shouldDecodeUnionsFromXUnionBytes(header *MessageHeader) bool {
 	return headerHasFlag(header, TransactionHeaderFlag_UnionFromXunionBytes)
 }
 
diff --git a/src/syscall/zx/io/impl.go b/src/syscall/zx/io/impl.go
index dfbb44b..7f612e7 100644
--- a/src/syscall/zx/io/impl.go
+++ b/src/syscall/zx/io/impl.go
@@ -198,7 +198,7 @@
 // The default protocol, interface information must be acquired some
 // other way.
 type Service struct {
-	_ struct{} `fidl:"s,1,1" fidl2:"s,1,1"`
+	_ struct{} `fidl:"s,1,1" fidl_size_v1_no_ee:"1" fidl_alignment_v1_no_ee:"1"`
 }
 
 var _mService = _bindings.CreateLazyMarshaler(Service{})
@@ -209,7 +209,7 @@
 
 // The object may be cast to interface 'File'.
 type FileObject struct {
-	_ struct{} `fidl:"s,4,4" fidl2:"s,4,4"`
+	_ struct{} `fidl:"s,4,4" fidl_size_v1_no_ee:"4" fidl_alignment_v1_no_ee:"4"`
 	// An optional event which transmits information about an object's readability
 	// or writability. This event relays information about the underlying object, not
 	// the capability granted to client: this event may be signalled "readable" on a
@@ -227,7 +227,7 @@
 
 // The object may be cast to interface 'Directory'.
 type DirectoryObject struct {
-	_ struct{} `fidl:"s,1,1" fidl2:"s,1,1"`
+	_ struct{} `fidl:"s,1,1" fidl_size_v1_no_ee:"1" fidl_alignment_v1_no_ee:"1"`
 }
 
 var _mDirectoryObject = _bindings.CreateLazyMarshaler(DirectoryObject{})
@@ -238,7 +238,7 @@
 
 // The object is accompanied by a pipe.
 type Pipe struct {
-	_      struct{}   `fidl:"s,4,4" fidl2:"s,4,4"`
+	_      struct{}   `fidl:"s,4,4" fidl_size_v1_no_ee:"4" fidl_alignment_v1_no_ee:"4"`
 	Socket _zx.Socket `fidl:"0,0" fidl2:"0"`
 }
 
@@ -250,7 +250,7 @@
 
 // The object is accompanied by a socket.
 type Socket struct {
-	_      struct{}   `fidl:"s,4,4" fidl2:"s,4,4"`
+	_      struct{}   `fidl:"s,4,4" fidl_size_v1_no_ee:"4" fidl_alignment_v1_no_ee:"4"`
 	Socket _zx.Socket `fidl:"0,0" fidl2:"0"`
 }
 
@@ -265,7 +265,7 @@
 // may represent multiple Vmofiles. To identify the logical portion of the VMO
 // that represents the single file, an offset and length parameter are also supplied.
 type Vmofile struct {
-	_ struct{} `fidl:"s,24,8" fidl2:"s,24,8"`
+	_ struct{} `fidl:"s,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	// The VMO which backs this file.
 	Vmo _zx.VMO `fidl:"0,0" fidl2:"0"`
 	// The index into `vmo` which represents the first byte of the file.
@@ -282,7 +282,7 @@
 
 // The object may be cast to interface 'Device'.
 type Device struct {
-	_ struct{} `fidl:"s,4,4" fidl2:"s,4,4"`
+	_ struct{} `fidl:"s,4,4" fidl_size_v1_no_ee:"4" fidl_alignment_v1_no_ee:"4"`
 	// An optional event which transmits information about a device's state.
 	//
 	// The "`DEVICE_SIGNAL_`" values may be observed on this event.
@@ -297,7 +297,7 @@
 
 // The object may be cast to interface 'Tty'
 type Tty struct {
-	_     struct{}   `fidl:"s,4,4" fidl2:"s,4,4"`
+	_     struct{}   `fidl:"s,4,4" fidl_size_v1_no_ee:"4" fidl_alignment_v1_no_ee:"4"`
 	Event _zx.Handle `fidl:"0,1" fidl2:"1"`
 }
 
@@ -309,7 +309,7 @@
 
 // NodeAttributes defines generic information about a filesystem node.
 type NodeAttributes struct {
-	_ struct{} `fidl:"s,56,8" fidl2:"s,56,8"`
+	_ struct{} `fidl:"s,56,8" fidl_size_v1_no_ee:"56" fidl_alignment_v1_no_ee:"8"`
 	// Protection bits and node type information describe in 'mode'.
 	Mode uint32 `fidl:"0"`
 	// A filesystem-unique ID.
@@ -334,7 +334,7 @@
 
 // WatchedEvent describes events returned from a DirectoryWatcher.
 type WatchedEvent struct {
-	_     struct{} `fidl:"s,24,8" fidl2:"s,24,8"`
+	_     struct{} `fidl:"s,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	Event uint8    `fidl:"0"`
 	Len   uint8    `fidl:"1"`
 	Name  []uint8  `fidl:"8,255" fidl2:"255"`
@@ -347,7 +347,7 @@
 }
 
 type FilesystemInfo struct {
-	_ struct{} `fidl:"s,96,8" fidl2:"s,96,8"`
+	_ struct{} `fidl:"s,96,8" fidl_size_v1_no_ee:"96" fidl_alignment_v1_no_ee:"8"`
 	// The number of data bytes which may be stored in a filesystem.
 	TotalBytes uint64 `fidl:"0"`
 	// The number of data bytes which are in use by the filesystem.
@@ -397,7 +397,7 @@
 //
 // Refer to `Node.Describe()` and `Node.OnOpen()` for usage.
 type NodeInfo struct {
-	I_nodeInfoTag `fidl:"u,32,8" fidl2:"u,32,8"`
+	I_nodeInfoTag `fidl:"u,32,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	Service       Service         `fidl:"1116800047"`
 	File          FileObject      `fidl:"525060263"`
 	Directory     DirectoryObject `fidl:"1775777620"`
@@ -501,24 +501,28 @@
 }
 
 const (
-	NodeCloneOrdinal       uint64 = 0x17fe6a4c00000000
-	NodeCloneGenOrdinal    uint64 = 0x5a61678f293ce16f
-	NodeCloseOrdinal       uint64 = 0x52b9568700000000
-	NodeCloseGenOrdinal    uint64 = 0x5309c5bd1c33dc44
-	NodeDescribeOrdinal    uint64 = 0x1f62df5e00000000
-	NodeDescribeGenOrdinal uint64 = 0xffcec215078dea0
-	NodeOnOpenOrdinal      uint64 = 0x4700a7bd00000000
-	NodeOnOpenGenOrdinal   uint64 = 0x7fc7bbb1dbfd1972
-	NodeSyncOrdinal        uint64 = 0x62423faa00000000
-	NodeSyncGenOrdinal     uint64 = 0x189d88326c18b519
-	NodeGetAttrOrdinal     uint64 = 0x4585e7c800000000
-	NodeGetAttrGenOrdinal  uint64 = 0x78985e216314dafd
-	NodeSetAttrOrdinal     uint64 = 0xbd5559a00000000
-	NodeSetAttrGenOrdinal  uint64 = 0x4186c0f40d938f46
+	NodeCloneOrdinal           uint64 = 0x17fe6a4c00000000
+	NodeCloneGenOrdinal        uint64 = 0x5a61678f293ce16f
+	NodeCloseOrdinal           uint64 = 0x52b9568700000000
+	NodeCloseGenOrdinal        uint64 = 0x5309c5bd1c33dc44
+	NodeDescribeOrdinal        uint64 = 0x1f62df5e00000000
+	NodeDescribeGenOrdinal     uint64 = 0xffcec215078dea0
+	NodeOnOpenOrdinal          uint64 = 0x4700a7bd00000000
+	NodeOnOpenGenOrdinal       uint64 = 0x7fc7bbb1dbfd1972
+	NodeSyncOrdinal            uint64 = 0x62423faa00000000
+	NodeSyncGenOrdinal         uint64 = 0x189d88326c18b519
+	NodeGetAttrOrdinal         uint64 = 0x4585e7c800000000
+	NodeGetAttrGenOrdinal      uint64 = 0x78985e216314dafd
+	NodeSetAttrOrdinal         uint64 = 0xbd5559a00000000
+	NodeSetAttrGenOrdinal      uint64 = 0x4186c0f40d938f46
+	NodeNodeGetFlagsOrdinal    uint64 = 0x3c24c22300000000
+	NodeNodeGetFlagsGenOrdinal uint64 = 0x5b88fffb8eda3aa1
+	NodeNodeSetFlagsOrdinal    uint64 = 0x46940c1600000000
+	NodeNodeSetFlagsGenOrdinal uint64 = 0x5295b76c71fde733
 )
 
 type nodeCloneRequest struct {
-	_      struct{}             `fidl:"s,8,0" fidl2:"s,8,0"`
+	_      struct{}             `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Flags  uint32               `fidl:"0"`
 	Object NodeInterfaceRequest `fidl:"4,0" fidl2:"0"`
 }
@@ -530,7 +534,7 @@
 }
 
 type nodeCloseResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -541,7 +545,7 @@
 }
 
 type nodeDescribeResponse struct {
-	_    struct{} `fidl:"s,32,0" fidl2:"s,32,0"`
+	_    struct{} `fidl:"s,32,0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
 	Info NodeInfo `fidl:"0"`
 }
 
@@ -552,7 +556,7 @@
 }
 
 type nodeOnOpenResponse struct {
-	_    struct{}  `fidl:"s,16,0" fidl2:"s,16,0"`
+	_    struct{}  `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	S    int32     `fidl:"0"`
 	Info *NodeInfo `fidl:"8"`
 }
@@ -564,7 +568,7 @@
 }
 
 type nodeSyncResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -575,7 +579,7 @@
 }
 
 type nodeGetAttrResponse struct {
-	_          struct{}       `fidl:"s,64,0" fidl2:"s,64,0"`
+	_          struct{}       `fidl:"s,64,0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
 	S          int32          `fidl:"0"`
 	Attributes NodeAttributes `fidl:"8"`
 }
@@ -587,7 +591,7 @@
 }
 
 type nodeSetAttrRequest struct {
-	_          struct{}       `fidl:"s,64,0" fidl2:"s,64,0"`
+	_          struct{}       `fidl:"s,64,0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
 	Flags      uint32         `fidl:"0"`
 	Attributes NodeAttributes `fidl:"8"`
 }
@@ -599,7 +603,7 @@
 }
 
 type nodeSetAttrResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -609,6 +613,40 @@
 	return _mnodeSetAttrResponse
 }
 
+type nodeNodeGetFlagsResponse struct {
+	_     struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
+	S     int32    `fidl:"0"`
+	Flags uint32   `fidl:"4"`
+}
+
+var _mnodeNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(nodeNodeGetFlagsResponse{})
+
+func (msg *nodeNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
+	return _mnodeNodeGetFlagsResponse
+}
+
+type nodeNodeSetFlagsRequest struct {
+	_     struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
+	Flags uint32   `fidl:"0"`
+}
+
+var _mnodeNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(nodeNodeSetFlagsRequest{})
+
+func (msg *nodeNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
+	return _mnodeNodeSetFlagsRequest
+}
+
+type nodeNodeSetFlagsResponse struct {
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
+	S int32    `fidl:"0"`
+}
+
+var _mnodeNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(nodeNodeSetFlagsResponse{})
+
+func (msg *nodeNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
+	return _mnodeNodeSetFlagsResponse
+}
+
 type NodeInterface _bindings.ChannelProxy
 
 // Create another connection to the same remote object.
@@ -704,6 +742,34 @@
 	return resp_.S, err
 }
 
+// Acquires the `Directory.Open` rights and flags used to access this file.
+//
+// This method does not require any rights.
+// This method has the same functionality as GetFlags for File and is
+// meant as an in-progress replacement.
+func (p *NodeInterface) NodeGetFlags() (int32, uint32, error) {
+	var req_ _bindings.Message
+	resp_ := &nodeNodeGetFlagsResponse{}
+	err := ((*_bindings.ChannelProxy)(p)).Call(NodeNodeGetFlagsOrdinal, req_, resp_, NodeNodeGetFlagsOrdinal, NodeNodeGetFlagsGenOrdinal)
+	return resp_.S, resp_.Flags, err
+}
+
+// Changes the `Directory.Open` flags used to access the file.
+// Supported flags which can be turned on / off:
+// - `OPEN_FLAG_APPEND`
+//
+// This method does not require any rights.
+// This method has the same functionality as SetFlags for File and is
+// meant as an in-progress replacement.
+func (p *NodeInterface) NodeSetFlags(flags uint32) (int32, error) {
+	req_ := &nodeNodeSetFlagsRequest{
+		Flags: flags,
+	}
+	resp_ := &nodeNodeSetFlagsResponse{}
+	err := ((*_bindings.ChannelProxy)(p)).Call(NodeNodeSetFlagsOrdinal, req_, resp_, NodeNodeSetFlagsOrdinal, NodeNodeSetFlagsGenOrdinal)
+	return resp_.S, err
+}
+
 // Node defines the minimal interface for entities which can be accessed in a filesystem.
 type Node interface {
 	// Create another connection to the same remote object.
@@ -752,10 +818,31 @@
 	//
 	// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
 	SetAttr(flags uint32, attributes NodeAttributes) (int32, error)
+	// Acquires the `Directory.Open` rights and flags used to access this file.
+	//
+	// This method does not require any rights.
+	// This method has the same functionality as GetFlags for File and is
+	// meant as an in-progress replacement.
+	NodeGetFlags() (int32, uint32, error)
+	// Changes the `Directory.Open` flags used to access the file.
+	// Supported flags which can be turned on / off:
+	// - `OPEN_FLAG_APPEND`
+	//
+	// This method does not require any rights.
+	// This method has the same functionality as SetFlags for File and is
+	// meant as an in-progress replacement.
+	NodeSetFlags(flags uint32) (int32, error)
 }
 
 type NodeTransitionalBase struct{}
 
+func (_ *NodeTransitionalBase) NodeGetFlags() (int32, uint32, error) {
+	panic("Not Implemented")
+}
+func (_ *NodeTransitionalBase) NodeSetFlags(flags uint32) (int32, error) {
+	panic("Not Implemented")
+}
+
 type NodeInterfaceRequest _bindings.InterfaceRequest
 
 func NewNodeInterfaceRequest() (NodeInterfaceRequest, *NodeInterface, error) {
@@ -818,6 +905,25 @@
 		out_ := nodeSetAttrResponse{}
 		out_.S = s
 		return &out_, true, err_
+	case NodeNodeGetFlagsOrdinal:
+		fallthrough
+	case NodeNodeGetFlagsGenOrdinal:
+		s, flags, err_ := s_.Impl.NodeGetFlags()
+		out_ := nodeNodeGetFlagsResponse{}
+		out_.S = s
+		out_.Flags = flags
+		return &out_, true, err_
+	case NodeNodeSetFlagsOrdinal:
+		fallthrough
+	case NodeNodeSetFlagsGenOrdinal:
+		in_ := nodeNodeSetFlagsRequest{}
+		if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+			return nil, false, err_
+		}
+		s, err_ := s_.Impl.NodeSetFlags(in_.Flags)
+		out_ := nodeNodeSetFlagsResponse{}
+		out_.S = s
+		return &out_, true, err_
 	}
 	return nil, false, _bindings.ErrUnknownOrdinal
 }
@@ -846,42 +952,46 @@
 }
 
 const (
-	FileCloneOrdinal        uint64 = 0x17fe6a4c00000000
-	FileCloneGenOrdinal     uint64 = 0x5a61678f293ce16f
-	FileCloseOrdinal        uint64 = 0x52b9568700000000
-	FileCloseGenOrdinal     uint64 = 0x5309c5bd1c33dc44
-	FileDescribeOrdinal     uint64 = 0x1f62df5e00000000
-	FileDescribeGenOrdinal  uint64 = 0xffcec215078dea0
-	FileOnOpenOrdinal       uint64 = 0x4700a7bd00000000
-	FileOnOpenGenOrdinal    uint64 = 0x7fc7bbb1dbfd1972
-	FileSyncOrdinal         uint64 = 0x62423faa00000000
-	FileSyncGenOrdinal      uint64 = 0x189d88326c18b519
-	FileGetAttrOrdinal      uint64 = 0x4585e7c800000000
-	FileGetAttrGenOrdinal   uint64 = 0x78985e216314dafd
-	FileSetAttrOrdinal      uint64 = 0xbd5559a00000000
-	FileSetAttrGenOrdinal   uint64 = 0x4186c0f40d938f46
-	FileReadOrdinal         uint64 = 0x25f7418400000000
-	FileReadGenOrdinal      uint64 = 0x29b2b7074c95208c
-	FileReadAtOrdinal       uint64 = 0x7c724dc400000000
-	FileReadAtGenOrdinal    uint64 = 0x6527ee3fbc9c5749
-	FileWriteOrdinal        uint64 = 0x512e7a000000000
-	FileWriteGenOrdinal     uint64 = 0x3b6432f57914225b
-	FileWriteAtOrdinal      uint64 = 0x3e5522e500000000
-	FileWriteAtGenOrdinal   uint64 = 0x4b29e1582ab379e4
-	FileSeekOrdinal         uint64 = 0x782a774500000000
-	FileSeekGenOrdinal      uint64 = 0x324968e9b8a0e394
-	FileTruncateOrdinal     uint64 = 0x42ab3a3a00000000
-	FileTruncateGenOrdinal  uint64 = 0x5ec8f337359a2ddb
-	FileGetFlagsOrdinal     uint64 = 0x6416a3f600000000
-	FileGetFlagsGenOrdinal  uint64 = 0x200be82ca523ab96
-	FileSetFlagsOrdinal     uint64 = 0x3f23cc7600000000
-	FileSetFlagsGenOrdinal  uint64 = 0x713f375258671141
-	FileGetBufferOrdinal    uint64 = 0x74c3097300000000
-	FileGetBufferGenOrdinal uint64 = 0x4b93b8486666d951
+	FileCloneOrdinal           uint64 = 0x17fe6a4c00000000
+	FileCloneGenOrdinal        uint64 = 0x5a61678f293ce16f
+	FileCloseOrdinal           uint64 = 0x52b9568700000000
+	FileCloseGenOrdinal        uint64 = 0x5309c5bd1c33dc44
+	FileDescribeOrdinal        uint64 = 0x1f62df5e00000000
+	FileDescribeGenOrdinal     uint64 = 0xffcec215078dea0
+	FileOnOpenOrdinal          uint64 = 0x4700a7bd00000000
+	FileOnOpenGenOrdinal       uint64 = 0x7fc7bbb1dbfd1972
+	FileSyncOrdinal            uint64 = 0x62423faa00000000
+	FileSyncGenOrdinal         uint64 = 0x189d88326c18b519
+	FileGetAttrOrdinal         uint64 = 0x4585e7c800000000
+	FileGetAttrGenOrdinal      uint64 = 0x78985e216314dafd
+	FileSetAttrOrdinal         uint64 = 0xbd5559a00000000
+	FileSetAttrGenOrdinal      uint64 = 0x4186c0f40d938f46
+	FileNodeGetFlagsOrdinal    uint64 = 0x3c24c22300000000
+	FileNodeGetFlagsGenOrdinal uint64 = 0x5b88fffb8eda3aa1
+	FileNodeSetFlagsOrdinal    uint64 = 0x46940c1600000000
+	FileNodeSetFlagsGenOrdinal uint64 = 0x5295b76c71fde733
+	FileReadOrdinal            uint64 = 0x25f7418400000000
+	FileReadGenOrdinal         uint64 = 0x29b2b7074c95208c
+	FileReadAtOrdinal          uint64 = 0x7c724dc400000000
+	FileReadAtGenOrdinal       uint64 = 0x6527ee3fbc9c5749
+	FileWriteOrdinal           uint64 = 0x512e7a000000000
+	FileWriteGenOrdinal        uint64 = 0x3b6432f57914225b
+	FileWriteAtOrdinal         uint64 = 0x3e5522e500000000
+	FileWriteAtGenOrdinal      uint64 = 0x4b29e1582ab379e4
+	FileSeekOrdinal            uint64 = 0x782a774500000000
+	FileSeekGenOrdinal         uint64 = 0x324968e9b8a0e394
+	FileTruncateOrdinal        uint64 = 0x42ab3a3a00000000
+	FileTruncateGenOrdinal     uint64 = 0x5ec8f337359a2ddb
+	FileGetFlagsOrdinal        uint64 = 0x6416a3f600000000
+	FileGetFlagsGenOrdinal     uint64 = 0x200be82ca523ab96
+	FileSetFlagsOrdinal        uint64 = 0x3f23cc7600000000
+	FileSetFlagsGenOrdinal     uint64 = 0x713f375258671141
+	FileGetBufferOrdinal       uint64 = 0x74c3097300000000
+	FileGetBufferGenOrdinal    uint64 = 0x4b93b8486666d951
 )
 
 type fileCloneRequest struct {
-	_      struct{}             `fidl:"s,8,0" fidl2:"s,8,0"`
+	_      struct{}             `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Flags  uint32               `fidl:"0"`
 	Object NodeInterfaceRequest `fidl:"4,0" fidl2:"0"`
 }
@@ -893,7 +1003,7 @@
 }
 
 type fileCloseResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -904,7 +1014,7 @@
 }
 
 type fileDescribeResponse struct {
-	_    struct{} `fidl:"s,32,0" fidl2:"s,32,0"`
+	_    struct{} `fidl:"s,32,0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
 	Info NodeInfo `fidl:"0"`
 }
 
@@ -915,7 +1025,7 @@
 }
 
 type fileOnOpenResponse struct {
-	_    struct{}  `fidl:"s,16,0" fidl2:"s,16,0"`
+	_    struct{}  `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	S    int32     `fidl:"0"`
 	Info *NodeInfo `fidl:"8"`
 }
@@ -927,7 +1037,7 @@
 }
 
 type fileSyncResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -938,7 +1048,7 @@
 }
 
 type fileGetAttrResponse struct {
-	_          struct{}       `fidl:"s,64,0" fidl2:"s,64,0"`
+	_          struct{}       `fidl:"s,64,0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
 	S          int32          `fidl:"0"`
 	Attributes NodeAttributes `fidl:"8"`
 }
@@ -950,7 +1060,7 @@
 }
 
 type fileSetAttrRequest struct {
-	_          struct{}       `fidl:"s,64,0" fidl2:"s,64,0"`
+	_          struct{}       `fidl:"s,64,0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
 	Flags      uint32         `fidl:"0"`
 	Attributes NodeAttributes `fidl:"8"`
 }
@@ -962,7 +1072,7 @@
 }
 
 type fileSetAttrResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -972,8 +1082,42 @@
 	return _mfileSetAttrResponse
 }
 
+type fileNodeGetFlagsResponse struct {
+	_     struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
+	S     int32    `fidl:"0"`
+	Flags uint32   `fidl:"4"`
+}
+
+var _mfileNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(fileNodeGetFlagsResponse{})
+
+func (msg *fileNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
+	return _mfileNodeGetFlagsResponse
+}
+
+type fileNodeSetFlagsRequest struct {
+	_     struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
+	Flags uint32   `fidl:"0"`
+}
+
+var _mfileNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(fileNodeSetFlagsRequest{})
+
+func (msg *fileNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
+	return _mfileNodeSetFlagsRequest
+}
+
+type fileNodeSetFlagsResponse struct {
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
+	S int32    `fidl:"0"`
+}
+
+var _mfileNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(fileNodeSetFlagsResponse{})
+
+func (msg *fileNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
+	return _mfileNodeSetFlagsResponse
+}
+
 type fileReadRequest struct {
-	_     struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_     struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Count uint64   `fidl:"0"`
 }
 
@@ -984,7 +1128,7 @@
 }
 
 type fileReadResponse struct {
-	_    struct{} `fidl:"s,24,0" fidl2:"s,24,0"`
+	_    struct{} `fidl:"s,24,0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
 	S    int32    `fidl:"0"`
 	Data []uint8  `fidl:"8,8192" fidl2:"8192"`
 }
@@ -996,7 +1140,7 @@
 }
 
 type fileReadAtRequest struct {
-	_      struct{} `fidl:"s,16,0" fidl2:"s,16,0"`
+	_      struct{} `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	Count  uint64   `fidl:"0"`
 	Offset uint64   `fidl:"8"`
 }
@@ -1008,7 +1152,7 @@
 }
 
 type fileReadAtResponse struct {
-	_    struct{} `fidl:"s,24,0" fidl2:"s,24,0"`
+	_    struct{} `fidl:"s,24,0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
 	S    int32    `fidl:"0"`
 	Data []uint8  `fidl:"8,8192" fidl2:"8192"`
 }
@@ -1020,7 +1164,7 @@
 }
 
 type fileWriteRequest struct {
-	_    struct{} `fidl:"s,16,0" fidl2:"s,16,0"`
+	_    struct{} `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	Data []uint8  `fidl:"0,8192" fidl2:"8192"`
 }
 
@@ -1031,7 +1175,7 @@
 }
 
 type fileWriteResponse struct {
-	_      struct{} `fidl:"s,16,0" fidl2:"s,16,0"`
+	_      struct{} `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	S      int32    `fidl:"0"`
 	Actual uint64   `fidl:"8"`
 }
@@ -1043,7 +1187,7 @@
 }
 
 type fileWriteAtRequest struct {
-	_      struct{} `fidl:"s,24,0" fidl2:"s,24,0"`
+	_      struct{} `fidl:"s,24,0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
 	Data   []uint8  `fidl:"0,8192" fidl2:"8192"`
 	Offset uint64   `fidl:"16"`
 }
@@ -1055,7 +1199,7 @@
 }
 
 type fileWriteAtResponse struct {
-	_      struct{} `fidl:"s,16,0" fidl2:"s,16,0"`
+	_      struct{} `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	S      int32    `fidl:"0"`
 	Actual uint64   `fidl:"8"`
 }
@@ -1067,7 +1211,7 @@
 }
 
 type fileSeekRequest struct {
-	_      struct{}   `fidl:"s,16,0" fidl2:"s,16,0"`
+	_      struct{}   `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	Offset int64      `fidl:"0"`
 	Start  SeekOrigin `fidl:"8"`
 }
@@ -1079,7 +1223,7 @@
 }
 
 type fileSeekResponse struct {
-	_      struct{} `fidl:"s,16,0" fidl2:"s,16,0"`
+	_      struct{} `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	S      int32    `fidl:"0"`
 	Offset uint64   `fidl:"8"`
 }
@@ -1091,7 +1235,7 @@
 }
 
 type fileTruncateRequest struct {
-	_      struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_      struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Length uint64   `fidl:"0"`
 }
 
@@ -1102,7 +1246,7 @@
 }
 
 type fileTruncateResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -1113,7 +1257,7 @@
 }
 
 type fileGetFlagsResponse struct {
-	_     struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_     struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S     int32    `fidl:"0"`
 	Flags uint32   `fidl:"4"`
 }
@@ -1125,7 +1269,7 @@
 }
 
 type fileSetFlagsRequest struct {
-	_     struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_     struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Flags uint32   `fidl:"0"`
 }
 
@@ -1136,7 +1280,7 @@
 }
 
 type fileSetFlagsResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -1147,7 +1291,7 @@
 }
 
 type fileGetBufferRequest struct {
-	_     struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_     struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Flags uint32   `fidl:"0"`
 }
 
@@ -1158,7 +1302,7 @@
 }
 
 type fileGetBufferResponse struct {
-	_      struct{}           `fidl:"s,16,0" fidl2:"s,16,0"`
+	_      struct{}           `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	S      int32              `fidl:"0"`
 	Buffer *fuchsiamem.Buffer `fidl:"8"`
 }
@@ -1264,6 +1408,34 @@
 	return resp_.S, err
 }
 
+// Acquires the `Directory.Open` rights and flags used to access this file.
+//
+// This method does not require any rights.
+// This method has the same functionality as GetFlags for File and is
+// meant as an in-progress replacement.
+func (p *FileInterface) NodeGetFlags() (int32, uint32, error) {
+	var req_ _bindings.Message
+	resp_ := &fileNodeGetFlagsResponse{}
+	err := ((*_bindings.ChannelProxy)(p)).Call(FileNodeGetFlagsOrdinal, req_, resp_, FileNodeGetFlagsOrdinal, FileNodeGetFlagsGenOrdinal)
+	return resp_.S, resp_.Flags, err
+}
+
+// Changes the `Directory.Open` flags used to access the file.
+// Supported flags which can be turned on / off:
+// - `OPEN_FLAG_APPEND`
+//
+// This method does not require any rights.
+// This method has the same functionality as SetFlags for File and is
+// meant as an in-progress replacement.
+func (p *FileInterface) NodeSetFlags(flags uint32) (int32, error) {
+	req_ := &fileNodeSetFlagsRequest{
+		Flags: flags,
+	}
+	resp_ := &fileNodeSetFlagsResponse{}
+	err := ((*_bindings.ChannelProxy)(p)).Call(FileNodeSetFlagsOrdinal, req_, resp_, FileNodeSetFlagsOrdinal, FileNodeSetFlagsGenOrdinal)
+	return resp_.S, err
+}
+
 // Reads `count` bytes at the seek offset.
 // The seek offset is moved forward by the number of bytes read.
 //
@@ -1434,6 +1606,20 @@
 	//
 	// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
 	SetAttr(flags uint32, attributes NodeAttributes) (int32, error)
+	// Acquires the `Directory.Open` rights and flags used to access this file.
+	//
+	// This method does not require any rights.
+	// This method has the same functionality as GetFlags for File and is
+	// meant as an in-progress replacement.
+	NodeGetFlags() (int32, uint32, error)
+	// Changes the `Directory.Open` flags used to access the file.
+	// Supported flags which can be turned on / off:
+	// - `OPEN_FLAG_APPEND`
+	//
+	// This method does not require any rights.
+	// This method has the same functionality as SetFlags for File and is
+	// meant as an in-progress replacement.
+	NodeSetFlags(flags uint32) (int32, error)
 	// Reads `count` bytes at the seek offset.
 	// The seek offset is moved forward by the number of bytes read.
 	//
@@ -1487,6 +1673,13 @@
 
 type FileTransitionalBase struct{}
 
+func (_ *FileTransitionalBase) NodeGetFlags() (int32, uint32, error) {
+	panic("Not Implemented")
+}
+func (_ *FileTransitionalBase) NodeSetFlags(flags uint32) (int32, error) {
+	panic("Not Implemented")
+}
+
 type FileInterfaceRequest _bindings.InterfaceRequest
 
 func NewFileInterfaceRequest() (FileInterfaceRequest, *FileInterface, error) {
@@ -1549,6 +1742,25 @@
 		out_ := fileSetAttrResponse{}
 		out_.S = s
 		return &out_, true, err_
+	case FileNodeGetFlagsOrdinal:
+		fallthrough
+	case FileNodeGetFlagsGenOrdinal:
+		s, flags, err_ := s_.Impl.NodeGetFlags()
+		out_ := fileNodeGetFlagsResponse{}
+		out_.S = s
+		out_.Flags = flags
+		return &out_, true, err_
+	case FileNodeSetFlagsOrdinal:
+		fallthrough
+	case FileNodeSetFlagsGenOrdinal:
+		in_ := fileNodeSetFlagsRequest{}
+		if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+			return nil, false, err_
+		}
+		s, err_ := s_.Impl.NodeSetFlags(in_.Flags)
+		out_ := fileNodeSetFlagsResponse{}
+		out_.S = s
+		return &out_, true, err_
 	case FileReadOrdinal:
 		fallthrough
 	case FileReadGenOrdinal:
@@ -1684,7 +1896,7 @@
 )
 
 type directoryWatcherOnEventRequest struct {
-	_      struct{} `fidl:"s,16,0" fidl2:"s,16,0"`
+	_      struct{} `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	Events []uint8  `fidl:"0,8192" fidl2:"8192"`
 }
 
@@ -1756,40 +1968,44 @@
 type DirectoryWatcherEventProxy _bindings.ChannelProxy
 
 const (
-	DirectoryCloneOrdinal          uint64 = 0x17fe6a4c00000000
-	DirectoryCloneGenOrdinal       uint64 = 0x5a61678f293ce16f
-	DirectoryCloseOrdinal          uint64 = 0x52b9568700000000
-	DirectoryCloseGenOrdinal       uint64 = 0x5309c5bd1c33dc44
-	DirectoryDescribeOrdinal       uint64 = 0x1f62df5e00000000
-	DirectoryDescribeGenOrdinal    uint64 = 0xffcec215078dea0
-	DirectoryOnOpenOrdinal         uint64 = 0x4700a7bd00000000
-	DirectoryOnOpenGenOrdinal      uint64 = 0x7fc7bbb1dbfd1972
-	DirectorySyncOrdinal           uint64 = 0x62423faa00000000
-	DirectorySyncGenOrdinal        uint64 = 0x189d88326c18b519
-	DirectoryGetAttrOrdinal        uint64 = 0x4585e7c800000000
-	DirectoryGetAttrGenOrdinal     uint64 = 0x78985e216314dafd
-	DirectorySetAttrOrdinal        uint64 = 0xbd5559a00000000
-	DirectorySetAttrGenOrdinal     uint64 = 0x4186c0f40d938f46
-	DirectoryOpenOrdinal           uint64 = 0x77e4cceb00000000
-	DirectoryOpenGenOrdinal        uint64 = 0x2c5044561d685ec0
-	DirectoryUnlinkOrdinal         uint64 = 0x2cbadb1900000000
-	DirectoryUnlinkGenOrdinal      uint64 = 0x5a0ff90760a8bc23
-	DirectoryReadDirentsOrdinal    uint64 = 0x2ea53c2d00000000
-	DirectoryReadDirentsGenOrdinal uint64 = 0x3582806bf27faa0a
-	DirectoryRewindOrdinal         uint64 = 0x7072fd8700000000
-	DirectoryRewindGenOrdinal      uint64 = 0x16b1202af0f34c71
-	DirectoryGetTokenOrdinal       uint64 = 0x3217bced00000000
-	DirectoryGetTokenGenOrdinal    uint64 = 0x26ae9d18763c8655
-	DirectoryRenameOrdinal         uint64 = 0x4a94b0ac00000000
-	DirectoryRenameGenOrdinal      uint64 = 0xa8e00a247f3c905
-	DirectoryLinkOrdinal           uint64 = 0x1b8a5e6400000000
-	DirectoryLinkGenOrdinal        uint64 = 0x740604c0c7c930e7
-	DirectoryWatchOrdinal          uint64 = 0x5ac28f3400000000
-	DirectoryWatchGenOrdinal       uint64 = 0x5717193a59d66d91
+	DirectoryCloneOrdinal           uint64 = 0x17fe6a4c00000000
+	DirectoryCloneGenOrdinal        uint64 = 0x5a61678f293ce16f
+	DirectoryCloseOrdinal           uint64 = 0x52b9568700000000
+	DirectoryCloseGenOrdinal        uint64 = 0x5309c5bd1c33dc44
+	DirectoryDescribeOrdinal        uint64 = 0x1f62df5e00000000
+	DirectoryDescribeGenOrdinal     uint64 = 0xffcec215078dea0
+	DirectoryOnOpenOrdinal          uint64 = 0x4700a7bd00000000
+	DirectoryOnOpenGenOrdinal       uint64 = 0x7fc7bbb1dbfd1972
+	DirectorySyncOrdinal            uint64 = 0x62423faa00000000
+	DirectorySyncGenOrdinal         uint64 = 0x189d88326c18b519
+	DirectoryGetAttrOrdinal         uint64 = 0x4585e7c800000000
+	DirectoryGetAttrGenOrdinal      uint64 = 0x78985e216314dafd
+	DirectorySetAttrOrdinal         uint64 = 0xbd5559a00000000
+	DirectorySetAttrGenOrdinal      uint64 = 0x4186c0f40d938f46
+	DirectoryNodeGetFlagsOrdinal    uint64 = 0x3c24c22300000000
+	DirectoryNodeGetFlagsGenOrdinal uint64 = 0x5b88fffb8eda3aa1
+	DirectoryNodeSetFlagsOrdinal    uint64 = 0x46940c1600000000
+	DirectoryNodeSetFlagsGenOrdinal uint64 = 0x5295b76c71fde733
+	DirectoryOpenOrdinal            uint64 = 0x77e4cceb00000000
+	DirectoryOpenGenOrdinal         uint64 = 0x2c5044561d685ec0
+	DirectoryUnlinkOrdinal          uint64 = 0x2cbadb1900000000
+	DirectoryUnlinkGenOrdinal       uint64 = 0x5a0ff90760a8bc23
+	DirectoryReadDirentsOrdinal     uint64 = 0x2ea53c2d00000000
+	DirectoryReadDirentsGenOrdinal  uint64 = 0x3582806bf27faa0a
+	DirectoryRewindOrdinal          uint64 = 0x7072fd8700000000
+	DirectoryRewindGenOrdinal       uint64 = 0x16b1202af0f34c71
+	DirectoryGetTokenOrdinal        uint64 = 0x3217bced00000000
+	DirectoryGetTokenGenOrdinal     uint64 = 0x26ae9d18763c8655
+	DirectoryRenameOrdinal          uint64 = 0x4a94b0ac00000000
+	DirectoryRenameGenOrdinal       uint64 = 0xa8e00a247f3c905
+	DirectoryLinkOrdinal            uint64 = 0x1b8a5e6400000000
+	DirectoryLinkGenOrdinal         uint64 = 0x740604c0c7c930e7
+	DirectoryWatchOrdinal           uint64 = 0x5ac28f3400000000
+	DirectoryWatchGenOrdinal        uint64 = 0x5717193a59d66d91
 )
 
 type directoryCloneRequest struct {
-	_      struct{}             `fidl:"s,8,0" fidl2:"s,8,0"`
+	_      struct{}             `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Flags  uint32               `fidl:"0"`
 	Object NodeInterfaceRequest `fidl:"4,0" fidl2:"0"`
 }
@@ -1801,7 +2017,7 @@
 }
 
 type directoryCloseResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -1812,7 +2028,7 @@
 }
 
 type directoryDescribeResponse struct {
-	_    struct{} `fidl:"s,32,0" fidl2:"s,32,0"`
+	_    struct{} `fidl:"s,32,0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
 	Info NodeInfo `fidl:"0"`
 }
 
@@ -1823,7 +2039,7 @@
 }
 
 type directoryOnOpenResponse struct {
-	_    struct{}  `fidl:"s,16,0" fidl2:"s,16,0"`
+	_    struct{}  `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	S    int32     `fidl:"0"`
 	Info *NodeInfo `fidl:"8"`
 }
@@ -1835,7 +2051,7 @@
 }
 
 type directorySyncResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -1846,7 +2062,7 @@
 }
 
 type directoryGetAttrResponse struct {
-	_          struct{}       `fidl:"s,64,0" fidl2:"s,64,0"`
+	_          struct{}       `fidl:"s,64,0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
 	S          int32          `fidl:"0"`
 	Attributes NodeAttributes `fidl:"8"`
 }
@@ -1858,7 +2074,7 @@
 }
 
 type directorySetAttrRequest struct {
-	_          struct{}       `fidl:"s,64,0" fidl2:"s,64,0"`
+	_          struct{}       `fidl:"s,64,0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
 	Flags      uint32         `fidl:"0"`
 	Attributes NodeAttributes `fidl:"8"`
 }
@@ -1870,7 +2086,7 @@
 }
 
 type directorySetAttrResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -1880,8 +2096,42 @@
 	return _mdirectorySetAttrResponse
 }
 
+type directoryNodeGetFlagsResponse struct {
+	_     struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
+	S     int32    `fidl:"0"`
+	Flags uint32   `fidl:"4"`
+}
+
+var _mdirectoryNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(directoryNodeGetFlagsResponse{})
+
+func (msg *directoryNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
+	return _mdirectoryNodeGetFlagsResponse
+}
+
+type directoryNodeSetFlagsRequest struct {
+	_     struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
+	Flags uint32   `fidl:"0"`
+}
+
+var _mdirectoryNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(directoryNodeSetFlagsRequest{})
+
+func (msg *directoryNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
+	return _mdirectoryNodeSetFlagsRequest
+}
+
+type directoryNodeSetFlagsResponse struct {
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
+	S int32    `fidl:"0"`
+}
+
+var _mdirectoryNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(directoryNodeSetFlagsResponse{})
+
+func (msg *directoryNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
+	return _mdirectoryNodeSetFlagsResponse
+}
+
 type directoryOpenRequest struct {
-	_      struct{}             `fidl:"s,32,0" fidl2:"s,32,0"`
+	_      struct{}             `fidl:"s,32,0" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"0"`
 	Flags  uint32               `fidl:"0"`
 	Mode   uint32               `fidl:"4"`
 	Path   string               `fidl:"8,4096" fidl2:"4096"`
@@ -1895,7 +2145,7 @@
 }
 
 type directoryUnlinkRequest struct {
-	_    struct{} `fidl:"s,16,0" fidl2:"s,16,0"`
+	_    struct{} `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	Path string   `fidl:"0,4096" fidl2:"4096"`
 }
 
@@ -1906,7 +2156,7 @@
 }
 
 type directoryUnlinkResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -1917,7 +2167,7 @@
 }
 
 type directoryReadDirentsRequest struct {
-	_        struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_        struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	MaxBytes uint64   `fidl:"0"`
 }
 
@@ -1928,7 +2178,7 @@
 }
 
 type directoryReadDirentsResponse struct {
-	_       struct{} `fidl:"s,24,0" fidl2:"s,24,0"`
+	_       struct{} `fidl:"s,24,0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
 	S       int32    `fidl:"0"`
 	Dirents []uint8  `fidl:"8,8192" fidl2:"8192"`
 }
@@ -1940,7 +2190,7 @@
 }
 
 type directoryRewindResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -1951,7 +2201,7 @@
 }
 
 type directoryGetTokenResponse struct {
-	_     struct{}   `fidl:"s,8,0" fidl2:"s,8,0"`
+	_     struct{}   `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S     int32      `fidl:"0"`
 	Token _zx.Handle `fidl:"4,1" fidl2:"1"`
 }
@@ -1963,7 +2213,7 @@
 }
 
 type directoryRenameRequest struct {
-	_              struct{}   `fidl:"s,40,0" fidl2:"s,40,0"`
+	_              struct{}   `fidl:"s,40,0" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"0"`
 	Src            string     `fidl:"0,4096" fidl2:"4096"`
 	DstParentToken _zx.Handle `fidl:"16,0" fidl2:"0"`
 	Dst            string     `fidl:"24,4096" fidl2:"4096"`
@@ -1976,7 +2226,7 @@
 }
 
 type directoryRenameResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -1987,7 +2237,7 @@
 }
 
 type directoryLinkRequest struct {
-	_              struct{}   `fidl:"s,40,0" fidl2:"s,40,0"`
+	_              struct{}   `fidl:"s,40,0" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"0"`
 	Src            string     `fidl:"0,4096" fidl2:"4096"`
 	DstParentToken _zx.Handle `fidl:"16,0" fidl2:"0"`
 	Dst            string     `fidl:"24,4096" fidl2:"4096"`
@@ -2000,7 +2250,7 @@
 }
 
 type directoryLinkResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -2011,7 +2261,7 @@
 }
 
 type directoryWatchRequest struct {
-	_       struct{}    `fidl:"s,16,0" fidl2:"s,16,0"`
+	_       struct{}    `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	Mask    uint32      `fidl:"0"`
 	Options uint32      `fidl:"4"`
 	Watcher _zx.Channel `fidl:"8,0" fidl2:"0"`
@@ -2024,7 +2274,7 @@
 }
 
 type directoryWatchResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -2129,6 +2379,34 @@
 	return resp_.S, err
 }
 
+// Acquires the `Directory.Open` rights and flags used to access this file.
+//
+// This method does not require any rights.
+// This method has the same functionality as GetFlags for File and is
+// meant as an in-progress replacement.
+func (p *DirectoryInterface) NodeGetFlags() (int32, uint32, error) {
+	var req_ _bindings.Message
+	resp_ := &directoryNodeGetFlagsResponse{}
+	err := ((*_bindings.ChannelProxy)(p)).Call(DirectoryNodeGetFlagsOrdinal, req_, resp_, DirectoryNodeGetFlagsOrdinal, DirectoryNodeGetFlagsGenOrdinal)
+	return resp_.S, resp_.Flags, err
+}
+
+// Changes the `Directory.Open` flags used to access the file.
+// Supported flags which can be turned on / off:
+// - `OPEN_FLAG_APPEND`
+//
+// This method does not require any rights.
+// This method has the same functionality as SetFlags for File and is
+// meant as an in-progress replacement.
+func (p *DirectoryInterface) NodeSetFlags(flags uint32) (int32, error) {
+	req_ := &directoryNodeSetFlagsRequest{
+		Flags: flags,
+	}
+	resp_ := &directoryNodeSetFlagsResponse{}
+	err := ((*_bindings.ChannelProxy)(p)).Call(DirectoryNodeSetFlagsOrdinal, req_, resp_, DirectoryNodeSetFlagsOrdinal, DirectoryNodeSetFlagsGenOrdinal)
+	return resp_.S, err
+}
+
 // Opens a new object relative to this directory object.
 //
 // `path` may contain multiple segments, separated by "/" characters,
@@ -2368,6 +2646,20 @@
 	//
 	// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
 	SetAttr(flags uint32, attributes NodeAttributes) (int32, error)
+	// Acquires the `Directory.Open` rights and flags used to access this file.
+	//
+	// This method does not require any rights.
+	// This method has the same functionality as GetFlags for File and is
+	// meant as an in-progress replacement.
+	NodeGetFlags() (int32, uint32, error)
+	// Changes the `Directory.Open` flags used to access the file.
+	// Supported flags which can be turned on / off:
+	// - `OPEN_FLAG_APPEND`
+	//
+	// This method does not require any rights.
+	// This method has the same functionality as SetFlags for File and is
+	// meant as an in-progress replacement.
+	NodeSetFlags(flags uint32) (int32, error)
 	// Opens a new object relative to this directory object.
 	//
 	// `path` may contain multiple segments, separated by "/" characters,
@@ -2495,6 +2787,13 @@
 
 type DirectoryTransitionalBase struct{}
 
+func (_ *DirectoryTransitionalBase) NodeGetFlags() (int32, uint32, error) {
+	panic("Not Implemented")
+}
+func (_ *DirectoryTransitionalBase) NodeSetFlags(flags uint32) (int32, error) {
+	panic("Not Implemented")
+}
+
 type DirectoryInterfaceRequest _bindings.InterfaceRequest
 
 func NewDirectoryInterfaceRequest() (DirectoryInterfaceRequest, *DirectoryInterface, error) {
@@ -2557,6 +2856,25 @@
 		out_ := directorySetAttrResponse{}
 		out_.S = s
 		return &out_, true, err_
+	case DirectoryNodeGetFlagsOrdinal:
+		fallthrough
+	case DirectoryNodeGetFlagsGenOrdinal:
+		s, flags, err_ := s_.Impl.NodeGetFlags()
+		out_ := directoryNodeGetFlagsResponse{}
+		out_.S = s
+		out_.Flags = flags
+		return &out_, true, err_
+	case DirectoryNodeSetFlagsOrdinal:
+		fallthrough
+	case DirectoryNodeSetFlagsGenOrdinal:
+		in_ := directoryNodeSetFlagsRequest{}
+		if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+			return nil, false, err_
+		}
+		s, err_ := s_.Impl.NodeSetFlags(in_.Flags)
+		out_ := directoryNodeSetFlagsResponse{}
+		out_.S = s
+		return &out_, true, err_
 	case DirectoryOpenOrdinal:
 		fallthrough
 	case DirectoryOpenGenOrdinal:
@@ -2679,6 +2997,10 @@
 	DirectoryAdminGetAttrGenOrdinal         uint64 = 0x78985e216314dafd
 	DirectoryAdminSetAttrOrdinal            uint64 = 0xbd5559a00000000
 	DirectoryAdminSetAttrGenOrdinal         uint64 = 0x4186c0f40d938f46
+	DirectoryAdminNodeGetFlagsOrdinal       uint64 = 0x3c24c22300000000
+	DirectoryAdminNodeGetFlagsGenOrdinal    uint64 = 0x5b88fffb8eda3aa1
+	DirectoryAdminNodeSetFlagsOrdinal       uint64 = 0x46940c1600000000
+	DirectoryAdminNodeSetFlagsGenOrdinal    uint64 = 0x5295b76c71fde733
 	DirectoryAdminOpenOrdinal               uint64 = 0x77e4cceb00000000
 	DirectoryAdminOpenGenOrdinal            uint64 = 0x2c5044561d685ec0
 	DirectoryAdminUnlinkOrdinal             uint64 = 0x2cbadb1900000000
@@ -2710,7 +3032,7 @@
 )
 
 type directoryAdminCloneRequest struct {
-	_      struct{}             `fidl:"s,8,0" fidl2:"s,8,0"`
+	_      struct{}             `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Flags  uint32               `fidl:"0"`
 	Object NodeInterfaceRequest `fidl:"4,0" fidl2:"0"`
 }
@@ -2722,7 +3044,7 @@
 }
 
 type directoryAdminCloseResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -2733,7 +3055,7 @@
 }
 
 type directoryAdminDescribeResponse struct {
-	_    struct{} `fidl:"s,32,0" fidl2:"s,32,0"`
+	_    struct{} `fidl:"s,32,0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
 	Info NodeInfo `fidl:"0"`
 }
 
@@ -2744,7 +3066,7 @@
 }
 
 type directoryAdminOnOpenResponse struct {
-	_    struct{}  `fidl:"s,16,0" fidl2:"s,16,0"`
+	_    struct{}  `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	S    int32     `fidl:"0"`
 	Info *NodeInfo `fidl:"8"`
 }
@@ -2756,7 +3078,7 @@
 }
 
 type directoryAdminSyncResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -2767,7 +3089,7 @@
 }
 
 type directoryAdminGetAttrResponse struct {
-	_          struct{}       `fidl:"s,64,0" fidl2:"s,64,0"`
+	_          struct{}       `fidl:"s,64,0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
 	S          int32          `fidl:"0"`
 	Attributes NodeAttributes `fidl:"8"`
 }
@@ -2779,7 +3101,7 @@
 }
 
 type directoryAdminSetAttrRequest struct {
-	_          struct{}       `fidl:"s,64,0" fidl2:"s,64,0"`
+	_          struct{}       `fidl:"s,64,0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
 	Flags      uint32         `fidl:"0"`
 	Attributes NodeAttributes `fidl:"8"`
 }
@@ -2791,7 +3113,7 @@
 }
 
 type directoryAdminSetAttrResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -2801,8 +3123,42 @@
 	return _mdirectoryAdminSetAttrResponse
 }
 
+type directoryAdminNodeGetFlagsResponse struct {
+	_     struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
+	S     int32    `fidl:"0"`
+	Flags uint32   `fidl:"4"`
+}
+
+var _mdirectoryAdminNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(directoryAdminNodeGetFlagsResponse{})
+
+func (msg *directoryAdminNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
+	return _mdirectoryAdminNodeGetFlagsResponse
+}
+
+type directoryAdminNodeSetFlagsRequest struct {
+	_     struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
+	Flags uint32   `fidl:"0"`
+}
+
+var _mdirectoryAdminNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(directoryAdminNodeSetFlagsRequest{})
+
+func (msg *directoryAdminNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
+	return _mdirectoryAdminNodeSetFlagsRequest
+}
+
+type directoryAdminNodeSetFlagsResponse struct {
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
+	S int32    `fidl:"0"`
+}
+
+var _mdirectoryAdminNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(directoryAdminNodeSetFlagsResponse{})
+
+func (msg *directoryAdminNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
+	return _mdirectoryAdminNodeSetFlagsResponse
+}
+
 type directoryAdminOpenRequest struct {
-	_      struct{}             `fidl:"s,32,0" fidl2:"s,32,0"`
+	_      struct{}             `fidl:"s,32,0" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"0"`
 	Flags  uint32               `fidl:"0"`
 	Mode   uint32               `fidl:"4"`
 	Path   string               `fidl:"8,4096" fidl2:"4096"`
@@ -2816,7 +3172,7 @@
 }
 
 type directoryAdminUnlinkRequest struct {
-	_    struct{} `fidl:"s,16,0" fidl2:"s,16,0"`
+	_    struct{} `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	Path string   `fidl:"0,4096" fidl2:"4096"`
 }
 
@@ -2827,7 +3183,7 @@
 }
 
 type directoryAdminUnlinkResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -2838,7 +3194,7 @@
 }
 
 type directoryAdminReadDirentsRequest struct {
-	_        struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_        struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	MaxBytes uint64   `fidl:"0"`
 }
 
@@ -2849,7 +3205,7 @@
 }
 
 type directoryAdminReadDirentsResponse struct {
-	_       struct{} `fidl:"s,24,0" fidl2:"s,24,0"`
+	_       struct{} `fidl:"s,24,0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
 	S       int32    `fidl:"0"`
 	Dirents []uint8  `fidl:"8,8192" fidl2:"8192"`
 }
@@ -2861,7 +3217,7 @@
 }
 
 type directoryAdminRewindResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -2872,7 +3228,7 @@
 }
 
 type directoryAdminGetTokenResponse struct {
-	_     struct{}   `fidl:"s,8,0" fidl2:"s,8,0"`
+	_     struct{}   `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S     int32      `fidl:"0"`
 	Token _zx.Handle `fidl:"4,1" fidl2:"1"`
 }
@@ -2884,7 +3240,7 @@
 }
 
 type directoryAdminRenameRequest struct {
-	_              struct{}   `fidl:"s,40,0" fidl2:"s,40,0"`
+	_              struct{}   `fidl:"s,40,0" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"0"`
 	Src            string     `fidl:"0,4096" fidl2:"4096"`
 	DstParentToken _zx.Handle `fidl:"16,0" fidl2:"0"`
 	Dst            string     `fidl:"24,4096" fidl2:"4096"`
@@ -2897,7 +3253,7 @@
 }
 
 type directoryAdminRenameResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -2908,7 +3264,7 @@
 }
 
 type directoryAdminLinkRequest struct {
-	_              struct{}   `fidl:"s,40,0" fidl2:"s,40,0"`
+	_              struct{}   `fidl:"s,40,0" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"0"`
 	Src            string     `fidl:"0,4096" fidl2:"4096"`
 	DstParentToken _zx.Handle `fidl:"16,0" fidl2:"0"`
 	Dst            string     `fidl:"24,4096" fidl2:"4096"`
@@ -2921,7 +3277,7 @@
 }
 
 type directoryAdminLinkResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -2932,7 +3288,7 @@
 }
 
 type directoryAdminWatchRequest struct {
-	_       struct{}    `fidl:"s,16,0" fidl2:"s,16,0"`
+	_       struct{}    `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	Mask    uint32      `fidl:"0"`
 	Options uint32      `fidl:"4"`
 	Watcher _zx.Channel `fidl:"8,0" fidl2:"0"`
@@ -2945,7 +3301,7 @@
 }
 
 type directoryAdminWatchResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -2956,7 +3312,7 @@
 }
 
 type directoryAdminMountRequest struct {
-	_      struct{}           `fidl:"s,8,0" fidl2:"s,8,0"`
+	_      struct{}           `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Remote DirectoryInterface `fidl:"0"`
 }
 
@@ -2967,7 +3323,7 @@
 }
 
 type directoryAdminMountResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -2978,7 +3334,7 @@
 }
 
 type directoryAdminMountAndCreateRequest struct {
-	_      struct{}           `fidl:"s,32,0" fidl2:"s,32,0"`
+	_      struct{}           `fidl:"s,32,0" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"0"`
 	Remote DirectoryInterface `fidl:"0"`
 	Name   string             `fidl:"8,255" fidl2:"255"`
 	Flags  uint32             `fidl:"24"`
@@ -2991,7 +3347,7 @@
 }
 
 type directoryAdminMountAndCreateResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -3002,7 +3358,7 @@
 }
 
 type directoryAdminUnmountResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -3013,7 +3369,7 @@
 }
 
 type directoryAdminUnmountNodeResponse struct {
-	_      struct{}           `fidl:"s,8,0" fidl2:"s,8,0"`
+	_      struct{}           `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S      int32              `fidl:"0"`
 	Remote DirectoryInterface `fidl:"4"`
 }
@@ -3025,7 +3381,7 @@
 }
 
 type directoryAdminQueryFilesystemResponse struct {
-	_    struct{}        `fidl:"s,16,0" fidl2:"s,16,0"`
+	_    struct{}        `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	S    int32           `fidl:"0"`
 	Info *FilesystemInfo `fidl:"8"`
 }
@@ -3037,7 +3393,7 @@
 }
 
 type directoryAdminGetDevicePathResponse struct {
-	_    struct{} `fidl:"s,24,0" fidl2:"s,24,0"`
+	_    struct{} `fidl:"s,24,0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
 	S    int32    `fidl:"0"`
 	Path *string  `fidl:"8,4096" fidl2:"4096"`
 }
@@ -3143,6 +3499,34 @@
 	return resp_.S, err
 }
 
+// Acquires the `Directory.Open` rights and flags used to access this file.
+//
+// This method does not require any rights.
+// This method has the same functionality as GetFlags for File and is
+// meant as an in-progress replacement.
+func (p *DirectoryAdminInterface) NodeGetFlags() (int32, uint32, error) {
+	var req_ _bindings.Message
+	resp_ := &directoryAdminNodeGetFlagsResponse{}
+	err := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminNodeGetFlagsOrdinal, req_, resp_, DirectoryAdminNodeGetFlagsOrdinal, DirectoryAdminNodeGetFlagsGenOrdinal)
+	return resp_.S, resp_.Flags, err
+}
+
+// Changes the `Directory.Open` flags used to access the file.
+// Supported flags which can be turned on / off:
+// - `OPEN_FLAG_APPEND`
+//
+// This method does not require any rights.
+// This method has the same functionality as SetFlags for File and is
+// meant as an in-progress replacement.
+func (p *DirectoryAdminInterface) NodeSetFlags(flags uint32) (int32, error) {
+	req_ := &directoryAdminNodeSetFlagsRequest{
+		Flags: flags,
+	}
+	resp_ := &directoryAdminNodeSetFlagsResponse{}
+	err := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminNodeSetFlagsOrdinal, req_, resp_, DirectoryAdminNodeSetFlagsOrdinal, DirectoryAdminNodeSetFlagsGenOrdinal)
+	return resp_.S, err
+}
+
 // Opens a new object relative to this directory object.
 //
 // `path` may contain multiple segments, separated by "/" characters,
@@ -3443,6 +3827,20 @@
 	//
 	// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
 	SetAttr(flags uint32, attributes NodeAttributes) (int32, error)
+	// Acquires the `Directory.Open` rights and flags used to access this file.
+	//
+	// This method does not require any rights.
+	// This method has the same functionality as GetFlags for File and is
+	// meant as an in-progress replacement.
+	NodeGetFlags() (int32, uint32, error)
+	// Changes the `Directory.Open` flags used to access the file.
+	// Supported flags which can be turned on / off:
+	// - `OPEN_FLAG_APPEND`
+	//
+	// This method does not require any rights.
+	// This method has the same functionality as SetFlags for File and is
+	// meant as an in-progress replacement.
+	NodeSetFlags(flags uint32) (int32, error)
 	// Opens a new object relative to this directory object.
 	//
 	// `path` may contain multiple segments, separated by "/" characters,
@@ -3588,6 +3986,13 @@
 
 type DirectoryAdminTransitionalBase struct{}
 
+func (_ *DirectoryAdminTransitionalBase) NodeGetFlags() (int32, uint32, error) {
+	panic("Not Implemented")
+}
+func (_ *DirectoryAdminTransitionalBase) NodeSetFlags(flags uint32) (int32, error) {
+	panic("Not Implemented")
+}
+
 type DirectoryAdminInterfaceRequest _bindings.InterfaceRequest
 
 func NewDirectoryAdminInterfaceRequest() (DirectoryAdminInterfaceRequest, *DirectoryAdminInterface, error) {
@@ -3650,6 +4055,25 @@
 		out_ := directoryAdminSetAttrResponse{}
 		out_.S = s
 		return &out_, true, err_
+	case DirectoryAdminNodeGetFlagsOrdinal:
+		fallthrough
+	case DirectoryAdminNodeGetFlagsGenOrdinal:
+		s, flags, err_ := s_.Impl.NodeGetFlags()
+		out_ := directoryAdminNodeGetFlagsResponse{}
+		out_.S = s
+		out_.Flags = flags
+		return &out_, true, err_
+	case DirectoryAdminNodeSetFlagsOrdinal:
+		fallthrough
+	case DirectoryAdminNodeSetFlagsGenOrdinal:
+		in_ := directoryAdminNodeSetFlagsRequest{}
+		if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+			return nil, false, err_
+		}
+		s, err_ := s_.Impl.NodeSetFlags(in_.Flags)
+		out_ := directoryAdminNodeSetFlagsResponse{}
+		out_.S = s
+		return &out_, true, err_
 	case DirectoryAdminOpenOrdinal:
 		fallthrough
 	case DirectoryAdminOpenGenOrdinal:
diff --git a/src/syscall/zx/mem/impl.go b/src/syscall/zx/mem/impl.go
index 1f6f2c8..361dfe1 100644
--- a/src/syscall/zx/mem/impl.go
+++ b/src/syscall/zx/mem/impl.go
@@ -23,7 +23,7 @@
 // data. `fuchsia.mem.Buffer` is a standard struct that aggregate the VMO
 // and its size.
 type Buffer struct {
-	_ struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
+	_ struct{} `fidl:"s,16,8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
 	// The vmo that contains the buffer.
 	Vmo _zx.VMO `fidl:"0,0" fidl2:"0"`
 	// The number of bytes in the buffer.
@@ -44,7 +44,7 @@
 
 // A range of bytes within a VMO.
 type Range struct {
-	_ struct{} `fidl:"s,24,8" fidl2:"s,24,8"`
+	_ struct{} `fidl:"s,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	// The vmo that contains the bytes.
 	Vmo _zx.VMO `fidl:"0,0" fidl2:"0"`
 	// The offset of the first byte within the range relative to the start of
@@ -84,7 +84,7 @@
 // `bytes`) but also need to support arbitrary amounts of data (i.e., which
 // need to be provided out-of-line in a `Buffer`).
 type Data struct {
-	I_dataTag     `fidl:"x,24,8" fidl2:"x,24,8"`
+	I_dataTag     `fidl:"x,24,8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
 	I_unknownData []byte
 	// The binary data provided inline in the message.
 	Bytes []uint8 `fidl:"835814982," fidl2:"835814982,"`
diff --git a/src/syscall/zx/net/impl.go b/src/syscall/zx/net/impl.go
index fa87844..cf45300 100644
--- a/src/syscall/zx/net/impl.go
+++ b/src/syscall/zx/net/impl.go
@@ -17,40 +17,44 @@
 )
 
 const (
-	ControlCloneOrdinal          uint64 = 0x17fe6a4c00000000
-	ControlCloneGenOrdinal       uint64 = 0x5a61678f293ce16f
-	ControlCloseOrdinal          uint64 = 0x52b9568700000000
-	ControlCloseGenOrdinal       uint64 = 0x5309c5bd1c33dc44
-	ControlDescribeOrdinal       uint64 = 0x1f62df5e00000000
-	ControlDescribeGenOrdinal    uint64 = 0xffcec215078dea0
-	ControlOnOpenOrdinal         uint64 = 0x4700a7bd00000000
-	ControlOnOpenGenOrdinal      uint64 = 0x7fc7bbb1dbfd1972
-	ControlSyncOrdinal           uint64 = 0x62423faa00000000
-	ControlSyncGenOrdinal        uint64 = 0x189d88326c18b519
-	ControlGetAttrOrdinal        uint64 = 0x4585e7c800000000
-	ControlGetAttrGenOrdinal     uint64 = 0x78985e216314dafd
-	ControlSetAttrOrdinal        uint64 = 0xbd5559a00000000
-	ControlSetAttrGenOrdinal     uint64 = 0x4186c0f40d938f46
-	ControlBindOrdinal           uint64 = 0x147441ed00000000
-	ControlBindGenOrdinal        uint64 = 0x369838aa5347aa8f
-	ControlConnectOrdinal        uint64 = 0x237ed33800000000
-	ControlConnectGenOrdinal     uint64 = 0x1138f666cb3655b1
-	ControlListenOrdinal         uint64 = 0x2e63628600000000
-	ControlListenGenOrdinal      uint64 = 0xa860257383d5651
-	ControlAcceptOrdinal         uint64 = 0x11ed297300000000
-	ControlAcceptGenOrdinal      uint64 = 0x17921a9ebebb7ba0
-	ControlGetSockNameOrdinal    uint64 = 0x63c1368200000000
-	ControlGetSockNameGenOrdinal uint64 = 0x6f68e0f0d72c2d1d
-	ControlGetPeerNameOrdinal    uint64 = 0x58787bb600000000
-	ControlGetPeerNameGenOrdinal uint64 = 0x555a019c03d9820d
-	ControlSetSockOptOrdinal     uint64 = 0x4ba217a700000000
-	ControlSetSockOptGenOrdinal  uint64 = 0x24e784a5e281b466
-	ControlGetSockOptOrdinal     uint64 = 0x3685367800000000
-	ControlGetSockOptGenOrdinal  uint64 = 0x66298180e94aa6b4
+	ControlCloneOrdinal           uint64 = 0x17fe6a4c00000000
+	ControlCloneGenOrdinal        uint64 = 0x5a61678f293ce16f
+	ControlCloseOrdinal           uint64 = 0x52b9568700000000
+	ControlCloseGenOrdinal        uint64 = 0x5309c5bd1c33dc44
+	ControlDescribeOrdinal        uint64 = 0x1f62df5e00000000
+	ControlDescribeGenOrdinal     uint64 = 0xffcec215078dea0
+	ControlOnOpenOrdinal          uint64 = 0x4700a7bd00000000
+	ControlOnOpenGenOrdinal       uint64 = 0x7fc7bbb1dbfd1972
+	ControlSyncOrdinal            uint64 = 0x62423faa00000000
+	ControlSyncGenOrdinal         uint64 = 0x189d88326c18b519
+	ControlGetAttrOrdinal         uint64 = 0x4585e7c800000000
+	ControlGetAttrGenOrdinal      uint64 = 0x78985e216314dafd
+	ControlSetAttrOrdinal         uint64 = 0xbd5559a00000000
+	ControlSetAttrGenOrdinal      uint64 = 0x4186c0f40d938f46
+	ControlNodeGetFlagsOrdinal    uint64 = 0x3c24c22300000000
+	ControlNodeGetFlagsGenOrdinal uint64 = 0x5b88fffb8eda3aa1
+	ControlNodeSetFlagsOrdinal    uint64 = 0x46940c1600000000
+	ControlNodeSetFlagsGenOrdinal uint64 = 0x5295b76c71fde733
+	ControlBindOrdinal            uint64 = 0x147441ed00000000
+	ControlBindGenOrdinal         uint64 = 0x369838aa5347aa8f
+	ControlConnectOrdinal         uint64 = 0x237ed33800000000
+	ControlConnectGenOrdinal      uint64 = 0x1138f666cb3655b1
+	ControlListenOrdinal          uint64 = 0x2e63628600000000
+	ControlListenGenOrdinal       uint64 = 0xa860257383d5651
+	ControlAcceptOrdinal          uint64 = 0x11ed297300000000
+	ControlAcceptGenOrdinal       uint64 = 0x17921a9ebebb7ba0
+	ControlGetSockNameOrdinal     uint64 = 0x63c1368200000000
+	ControlGetSockNameGenOrdinal  uint64 = 0x6f68e0f0d72c2d1d
+	ControlGetPeerNameOrdinal     uint64 = 0x58787bb600000000
+	ControlGetPeerNameGenOrdinal  uint64 = 0x555a019c03d9820d
+	ControlSetSockOptOrdinal      uint64 = 0x4ba217a700000000
+	ControlSetSockOptGenOrdinal   uint64 = 0x24e784a5e281b466
+	ControlGetSockOptOrdinal      uint64 = 0x3685367800000000
+	ControlGetSockOptGenOrdinal   uint64 = 0x66298180e94aa6b4
 )
 
 type controlCloneRequest struct {
-	_      struct{}                       `fidl:"s,8,0" fidl2:"s,8,0"`
+	_      struct{}                       `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Flags  uint32                         `fidl:"0"`
 	Object fuchsiaio.NodeInterfaceRequest `fidl:"4,0" fidl2:"0"`
 }
@@ -62,7 +66,7 @@
 }
 
 type controlCloseResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -73,7 +77,7 @@
 }
 
 type controlDescribeResponse struct {
-	_    struct{}           `fidl:"s,32,0" fidl2:"s,32,0"`
+	_    struct{}           `fidl:"s,32,0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
 	Info fuchsiaio.NodeInfo `fidl:"0"`
 }
 
@@ -84,7 +88,7 @@
 }
 
 type controlOnOpenResponse struct {
-	_    struct{}            `fidl:"s,16,0" fidl2:"s,16,0"`
+	_    struct{}            `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	S    int32               `fidl:"0"`
 	Info *fuchsiaio.NodeInfo `fidl:"8"`
 }
@@ -96,7 +100,7 @@
 }
 
 type controlSyncResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -107,7 +111,7 @@
 }
 
 type controlGetAttrResponse struct {
-	_          struct{}                 `fidl:"s,64,0" fidl2:"s,64,0"`
+	_          struct{}                 `fidl:"s,64,0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
 	S          int32                    `fidl:"0"`
 	Attributes fuchsiaio.NodeAttributes `fidl:"8"`
 }
@@ -119,7 +123,7 @@
 }
 
 type controlSetAttrRequest struct {
-	_          struct{}                 `fidl:"s,64,0" fidl2:"s,64,0"`
+	_          struct{}                 `fidl:"s,64,0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
 	Flags      uint32                   `fidl:"0"`
 	Attributes fuchsiaio.NodeAttributes `fidl:"8"`
 }
@@ -131,7 +135,7 @@
 }
 
 type controlSetAttrResponse struct {
-	_ struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	S int32    `fidl:"0"`
 }
 
@@ -141,8 +145,42 @@
 	return _mcontrolSetAttrResponse
 }
 
+type controlNodeGetFlagsResponse struct {
+	_     struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
+	S     int32    `fidl:"0"`
+	Flags uint32   `fidl:"4"`
+}
+
+var _mcontrolNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(controlNodeGetFlagsResponse{})
+
+func (msg *controlNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
+	return _mcontrolNodeGetFlagsResponse
+}
+
+type controlNodeSetFlagsRequest struct {
+	_     struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
+	Flags uint32   `fidl:"0"`
+}
+
+var _mcontrolNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(controlNodeSetFlagsRequest{})
+
+func (msg *controlNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
+	return _mcontrolNodeSetFlagsRequest
+}
+
+type controlNodeSetFlagsResponse struct {
+	_ struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
+	S int32    `fidl:"0"`
+}
+
+var _mcontrolNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(controlNodeSetFlagsResponse{})
+
+func (msg *controlNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
+	return _mcontrolNodeSetFlagsResponse
+}
+
 type controlBindRequest struct {
-	_    struct{} `fidl:"s,16,0" fidl2:"s,16,0"`
+	_    struct{} `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	Addr []uint8  `fidl:"0,128" fidl2:"128"`
 }
 
@@ -153,7 +191,7 @@
 }
 
 type controlBindResponse struct {
-	_    struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_    struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Code int16    `fidl:"0"`
 }
 
@@ -164,7 +202,7 @@
 }
 
 type controlConnectRequest struct {
-	_    struct{} `fidl:"s,16,0" fidl2:"s,16,0"`
+	_    struct{} `fidl:"s,16,0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
 	Addr []uint8  `fidl:"0,128" fidl2:"128"`
 }
 
@@ -175,7 +213,7 @@
 }
 
 type controlConnectResponse struct {
-	_    struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_    struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Code int16    `fidl:"0"`
 }
 
@@ -186,7 +224,7 @@
 }
 
 type controlListenRequest struct {
-	_       struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_       struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Backlog int16    `fidl:"0"`
 }
 
@@ -197,7 +235,7 @@
 }
 
 type controlListenResponse struct {
-	_    struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_    struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Code int16    `fidl:"0"`
 }
 
@@ -208,7 +246,7 @@
 }
 
 type controlAcceptRequest struct {
-	_     struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_     struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Flags int16    `fidl:"0"`
 }
 
@@ -219,7 +257,7 @@
 }
 
 type controlAcceptResponse struct {
-	_    struct{}         `fidl:"s,8,0" fidl2:"s,8,0"`
+	_    struct{}         `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Code int16            `fidl:"0"`
 	S    ControlInterface `fidl:"4"`
 }
@@ -231,7 +269,7 @@
 }
 
 type controlGetSockNameResponse struct {
-	_    struct{} `fidl:"s,24,0" fidl2:"s,24,0"`
+	_    struct{} `fidl:"s,24,0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
 	Code int16    `fidl:"0"`
 	Addr []uint8  `fidl:"8,128" fidl2:"128"`
 }
@@ -243,7 +281,7 @@
 }
 
 type controlGetPeerNameResponse struct {
-	_    struct{} `fidl:"s,24,0" fidl2:"s,24,0"`
+	_    struct{} `fidl:"s,24,0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
 	Code int16    `fidl:"0"`
 	Addr []uint8  `fidl:"8,128" fidl2:"128"`
 }
@@ -255,7 +293,7 @@
 }
 
 type controlSetSockOptRequest struct {
-	_       struct{} `fidl:"s,24,0" fidl2:"s,24,0"`
+	_       struct{} `fidl:"s,24,0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
 	Level   int16    `fidl:"0"`
 	Optname int16    `fidl:"2"`
 	Optval  []uint8  `fidl:"8,900" fidl2:"900"`
@@ -268,7 +306,7 @@
 }
 
 type controlSetSockOptResponse struct {
-	_    struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_    struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Code int16    `fidl:"0"`
 }
 
@@ -279,7 +317,7 @@
 }
 
 type controlGetSockOptRequest struct {
-	_       struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_       struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Level   int16    `fidl:"0"`
 	Optname int16    `fidl:"2"`
 }
@@ -291,7 +329,7 @@
 }
 
 type controlGetSockOptResponse struct {
-	_      struct{} `fidl:"s,24,0" fidl2:"s,24,0"`
+	_      struct{} `fidl:"s,24,0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
 	Code   int16    `fidl:"0"`
 	Optval []uint8  `fidl:"8,900" fidl2:"900"`
 }
@@ -397,6 +435,34 @@
 	return resp_.S, err
 }
 
+// Acquires the `Directory.Open` rights and flags used to access this file.
+//
+// This method does not require any rights.
+// This method has the same functionality as GetFlags for File and is
+// meant as an in-progress replacement.
+func (p *ControlInterface) NodeGetFlags() (int32, uint32, error) {
+	var req_ _bindings.Message
+	resp_ := &controlNodeGetFlagsResponse{}
+	err := ((*_bindings.ChannelProxy)(p)).Call(ControlNodeGetFlagsOrdinal, req_, resp_, ControlNodeGetFlagsOrdinal, ControlNodeGetFlagsGenOrdinal)
+	return resp_.S, resp_.Flags, err
+}
+
+// Changes the `Directory.Open` flags used to access the file.
+// Supported flags which can be turned on / off:
+// - `OPEN_FLAG_APPEND`
+//
+// This method does not require any rights.
+// This method has the same functionality as SetFlags for File and is
+// meant as an in-progress replacement.
+func (p *ControlInterface) NodeSetFlags(flags uint32) (int32, error) {
+	req_ := &controlNodeSetFlagsRequest{
+		Flags: flags,
+	}
+	resp_ := &controlNodeSetFlagsResponse{}
+	err := ((*_bindings.ChannelProxy)(p)).Call(ControlNodeSetFlagsOrdinal, req_, resp_, ControlNodeSetFlagsOrdinal, ControlNodeSetFlagsGenOrdinal)
+	return resp_.S, err
+}
+
 // Sets the local address used for the socket.
 func (p *ControlInterface) Bind(addr []uint8) (int16, error) {
 	req_ := &controlBindRequest{
@@ -533,6 +599,20 @@
 	//
 	// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
 	SetAttr(flags uint32, attributes fuchsiaio.NodeAttributes) (int32, error)
+	// Acquires the `Directory.Open` rights and flags used to access this file.
+	//
+	// This method does not require any rights.
+	// This method has the same functionality as GetFlags for File and is
+	// meant as an in-progress replacement.
+	NodeGetFlags() (int32, uint32, error)
+	// Changes the `Directory.Open` flags used to access the file.
+	// Supported flags which can be turned on / off:
+	// - `OPEN_FLAG_APPEND`
+	//
+	// This method does not require any rights.
+	// This method has the same functionality as SetFlags for File and is
+	// meant as an in-progress replacement.
+	NodeSetFlags(flags uint32) (int32, error)
 	// Sets the local address used for the socket.
 	Bind(addr []uint8) (int16, error)
 	// Initiates a connection to a remote address.
@@ -554,6 +634,13 @@
 
 type ControlTransitionalBase struct{}
 
+func (_ *ControlTransitionalBase) NodeGetFlags() (int32, uint32, error) {
+	panic("Not Implemented")
+}
+func (_ *ControlTransitionalBase) NodeSetFlags(flags uint32) (int32, error) {
+	panic("Not Implemented")
+}
+
 type ControlInterfaceRequest _bindings.InterfaceRequest
 
 func NewControlInterfaceRequest() (ControlInterfaceRequest, *ControlInterface, error) {
@@ -616,6 +703,25 @@
 		out_ := controlSetAttrResponse{}
 		out_.S = s
 		return &out_, true, err_
+	case ControlNodeGetFlagsOrdinal:
+		fallthrough
+	case ControlNodeGetFlagsGenOrdinal:
+		s, flags, err_ := s_.Impl.NodeGetFlags()
+		out_ := controlNodeGetFlagsResponse{}
+		out_.S = s
+		out_.Flags = flags
+		return &out_, true, err_
+	case ControlNodeSetFlagsOrdinal:
+		fallthrough
+	case ControlNodeSetFlagsGenOrdinal:
+		in_ := controlNodeSetFlagsRequest{}
+		if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+			return nil, false, err_
+		}
+		s, err_ := s_.Impl.NodeSetFlags(in_.Flags)
+		out_ := controlNodeSetFlagsResponse{}
+		out_.S = s
+		return &out_, true, err_
 	case ControlBindOrdinal:
 		fallthrough
 	case ControlBindGenOrdinal:
@@ -733,7 +839,7 @@
 )
 
 type providerSocketRequest struct {
-	_        struct{} `fidl:"s,8,0" fidl2:"s,8,0"`
+	_        struct{} `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Domain   int16    `fidl:"0"`
 	Type     int16    `fidl:"2"`
 	Protocol int16    `fidl:"4"`
@@ -746,7 +852,7 @@
 }
 
 type providerSocketResponse struct {
-	_    struct{}         `fidl:"s,8,0" fidl2:"s,8,0"`
+	_    struct{}         `fidl:"s,8,0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
 	Code int16            `fidl:"0"`
 	S    ControlInterface `fidl:"4"`
 }