blob: 3b9126ddd43ab9d0283a69c4cbe354786e7426ab [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// GENERATED FILE: Do not edit!
//
// To rebuild this file, invoke third_party/go/regen-fidl.
// +build fuchsia
package conformance
import (
_zx "syscall/zx"
_bindings "syscall/zx/fidl"
)
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 StructWithInt struct {
_ struct{} `fidl:"s,4,4" fidl2:"s,4,4"`
X int32 `fidl:"0"`
}
var _mStructWithInt = _bindings.CreateLazyMarshaler(StructWithInt{})
func (msg *StructWithInt) Marshaler() _bindings.Marshaler {
return _mStructWithInt
}
type StructWithArrays struct {
_ struct{} `fidl:"s,120,8" fidl2:"s,120,8"`
ArrInt [2]int32 `fidl:"0"`
ArrString [2]string `fidl:"8,"`
ArrNullableString [2]*string `fidl:"40,"`
ArrStruct [2]StructWithInt `fidl:"72"`
ArrNullableStruct [2]*StructWithInt `fidl:"80"`
ArrArrInt [2][3]int32 `fidl:"96"`
}
var _mStructWithArrays = _bindings.CreateLazyMarshaler(StructWithArrays{})
func (msg *StructWithArrays) Marshaler() _bindings.Marshaler {
return _mStructWithArrays
}
type StructWithVectors struct {
_ struct{} `fidl:"s,112,8" fidl2:"s,112,8"`
VecEmpty []int32 `fidl:"0,"`
VecInt []int32 `fidl:"16,"`
VecString []string `fidl:"32,,"`
VecNullableString []*string `fidl:"48,,"`
VecStruct []StructWithInt `fidl:"64,"`
VecNullableStruct []*StructWithInt `fidl:"80,"`
VecVecInt [][]int32 `fidl:"96,,"`
}
var _mStructWithVectors = _bindings.CreateLazyMarshaler(StructWithVectors{})
func (msg *StructWithVectors) Marshaler() _bindings.Marshaler {
return _mStructWithVectors
}
type TestXUnionInTable struct {
_ struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
Value XUnionInTable `fidl:"0"`
}
var _mTestXUnionInTable = _bindings.CreateLazyMarshaler(TestXUnionInTable{})
func (msg *TestXUnionInTable) Marshaler() _bindings.Marshaler {
return _mTestXUnionInTable
}
type InterfaceConfig struct {
_ struct{} `fidl:"s,48,8" fidl2:"s,48,8"`
Name string `fidl:"0,"`
IpAddressConfig IpAddressConfig `fidl:"16"`
}
var _mInterfaceConfig = _bindings.CreateLazyMarshaler(InterfaceConfig{})
func (msg *InterfaceConfig) Marshaler() _bindings.Marshaler {
return _mInterfaceConfig
}
type TestAddEthernetDeviceRequest struct {
_ struct{} `fidl:"s,72,8" fidl2:"s,72,8"`
TopologicalPath string `fidl:"0,"`
Config InterfaceConfig `fidl:"16"`
ThisShouldBeAHandle uint32 `fidl:"64"`
}
var _mTestAddEthernetDeviceRequest = _bindings.CreateLazyMarshaler(TestAddEthernetDeviceRequest{})
func (msg *TestAddEthernetDeviceRequest) Marshaler() _bindings.Marshaler {
return _mTestAddEthernetDeviceRequest
}
type NodeAttributes struct {
_ struct{} `fidl:"s,56,8" fidl2:"s,56,8"`
Mode uint32 `fidl:"0"`
Id uint64 `fidl:"8"`
ContentSize uint64 `fidl:"16"`
StorageSize uint64 `fidl:"24"`
LinkCount uint64 `fidl:"32"`
CreationTime uint64 `fidl:"40"`
ModificationTime uint64 `fidl:"48"`
}
var _mNodeAttributes = _bindings.CreateLazyMarshaler(NodeAttributes{})
func (msg *NodeAttributes) Marshaler() _bindings.Marshaler {
return _mNodeAttributes
}
type FileGetAttrResponse struct {
_ struct{} `fidl:"s,64,8" fidl2:"s,64,8"`
S int32 `fidl:"0"`
Attributes NodeAttributes `fidl:"8"`
}
var _mFileGetAttrResponse = _bindings.CreateLazyMarshaler(FileGetAttrResponse{})
func (msg *FileGetAttrResponse) Marshaler() _bindings.Marshaler {
return _mFileGetAttrResponse
}
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 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 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 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 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 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" fidl2:"1136452149"`
Dhcp bool `fidl:"1619238975" fidl2:"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_unionWithEmptyStructTag uint32
const (
_ I_unionWithEmptyStructTag = iota
UnionWithEmptyStructS
UnionWithEmptyStructS2
)
type UnionWithEmptyStruct struct {
I_unionWithEmptyStructTag `fidl:"u,16,8" fidl2:"u,16,8"`
S EmptyStruct `fidl:"2012545430" fidl2:"2012545430"`
S2 *EmptyStruct `fidl:"1404939714" fidl2:"1404939714"`
}
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) 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_simpleUnionTag uint32
const (
_ I_simpleUnionTag = iota
SimpleUnionI32
SimpleUnionI64
SimpleUnionS
SimpleUnionOs
SimpleUnionStr
)
type SimpleUnion struct {
I_simpleUnionTag `fidl:"u,24,8" fidl2:"u,24,8"`
I32 int32 `fidl:"1667828146" fidl2:"1667828146"`
I64 int64 `fidl:"1110539033" fidl2:"1110539033"`
S Int64Struct `fidl:"684890561" fidl2:"684890561"`
Os *Int64Struct `fidl:"1501363482" fidl2:"1501363482"`
Str string `fidl:"498325473," fidl2:"498325473,"`
}
func (u *SimpleUnion) Which() I_simpleUnionTag {
return u.I_simpleUnionTag
}
func (u *SimpleUnion) SetI32(i32 int32) {
u.I_simpleUnionTag = SimpleUnionI32
u.I32 = i32
}
func SimpleUnionWithI32(i32 int32) SimpleUnion {
var _u SimpleUnion
_u.SetI32(i32)
return _u
}
func (u *SimpleUnion) SetI64(i64 int64) {
u.I_simpleUnionTag = SimpleUnionI64
u.I64 = i64
}
func SimpleUnionWithI64(i64 int64) SimpleUnion {
var _u SimpleUnion
_u.SetI64(i64)
return _u
}
func (u *SimpleUnion) SetS(s Int64Struct) {
u.I_simpleUnionTag = SimpleUnionS
u.S = s
}
func SimpleUnionWithS(s Int64Struct) SimpleUnion {
var _u SimpleUnion
_u.SetS(s)
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
}
func SimpleUnionWithStr(str string) SimpleUnion {
var _u SimpleUnion
_u.SetStr(str)
return _u
}
type I_xUnionWithEmptyStructTag uint32
const (
XUnionWithEmptyStruct_unknownData = 0 // 0x00000000
XUnionWithEmptyStructS = 1956241662 // 0x7499e0fe
)
type XUnionWithEmptyStruct struct {
I_xUnionWithEmptyStructTag `fidl:"x,24,8" fidl2:"x,24,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 I_sampleXUnionTag uint32
const (
SampleXUnion_unknownData = 0 // 0x00000000
SampleXUnionU = 949769906 // 0x389c56b2
SampleXUnionSu = 2033143581 // 0x792f4f1d
SampleXUnionSt = 35514581 // 0x021de8d5
)
type SampleXUnion struct {
I_sampleXUnionTag `fidl:"x,24,8" fidl2:"x,24,8"`
I_unknownData []byte
U uint32 `fidl:"949769906" fidl2:"949769906"`
Su SimpleUnion `fidl:"2033143581" fidl2:"2033143581"`
St SimpleTable `fidl:"35514581" fidl2:"35514581"`
}
func (_m *SampleXUnion) Which() I_sampleXUnionTag {
switch _m.I_sampleXUnionTag {
case 949769906:
return SampleXUnionU
case 2033143581:
return SampleXUnionSu
case 35514581:
return SampleXUnionSt
default:
return SampleXUnion_unknownData
}
}
func (_m *SampleXUnion) Ordinal() uint32 {
return uint32(_m.I_sampleXUnionTag)
}
func (_m *SampleXUnion) SetU(u uint32) {
_m.I_sampleXUnionTag = SampleXUnionU
_m.U = u
}
func SampleXUnionWithU(u uint32) SampleXUnion {
var _u SampleXUnion
_u.SetU(u)
return _u
}
func (_m *SampleXUnion) SetSu(su SimpleUnion) {
_m.I_sampleXUnionTag = SampleXUnionSu
_m.Su = su
}
func SampleXUnionWithSu(su SimpleUnion) SampleXUnion {
var _u SampleXUnion
_u.SetSu(su)
return _u
}
func (_m *SampleXUnion) SetSt(st SimpleTable) {
_m.I_sampleXUnionTag = SampleXUnionSt
_m.St = st
}
func SampleXUnionWithSt(st SimpleTable) SampleXUnion {
var _u SampleXUnion
_u.SetSt(st)
return _u
}
type I_sampleStrictXUnionTag uint32
const (
SampleStrictXUnionU = 149088882 // 0x08e2ea72
SampleStrictXUnionSu = 670279483 // 0x27f3a73b
SampleStrictXUnionSt = 925062383 // 0x372354ef
)
type SampleStrictXUnion struct {
I_sampleStrictXUnionTag `fidl:"x!,24,8" fidl2:"x!,24,8"`
I_unknownData []byte
U uint32 `fidl:"149088882" fidl2:"149088882"`
Su SimpleUnion `fidl:"670279483" fidl2:"670279483"`
St SimpleTable `fidl:"925062383" fidl2:"925062383"`
}
func (_m *SampleStrictXUnion) Which() I_sampleStrictXUnionTag {
return _m.I_sampleStrictXUnionTag
}
func (_m *SampleStrictXUnion) Ordinal() uint32 {
return uint32(_m.I_sampleStrictXUnionTag)
}
func (_m *SampleStrictXUnion) SetU(u uint32) {
_m.I_sampleStrictXUnionTag = SampleStrictXUnionU
_m.U = u
}
func SampleStrictXUnionWithU(u uint32) SampleStrictXUnion {
var _u SampleStrictXUnion
_u.SetU(u)
return _u
}
func (_m *SampleStrictXUnion) SetSu(su SimpleUnion) {
_m.I_sampleStrictXUnionTag = SampleStrictXUnionSu
_m.Su = su
}
func SampleStrictXUnionWithSu(su SimpleUnion) SampleStrictXUnion {
var _u SampleStrictXUnion
_u.SetSu(su)
return _u
}
func (_m *SampleStrictXUnion) SetSt(st SimpleTable) {
_m.I_sampleStrictXUnionTag = SampleStrictXUnionSt
_m.St = st
}
func SampleStrictXUnionWithSt(st SimpleTable) SampleStrictXUnion {
var _u SampleStrictXUnion
_u.SetSt(st)
return _u
}
type XUnionInTable struct {
_ struct{} `fidl:"t,16,8" fidl2:"t,16,8"`
Before string `fidl:"1," fidl2:"1,"`
BeforePresent bool
Xu SampleXUnion `fidl:"2" fidl2:"2"`
XuPresent bool
After string `fidl:"3," fidl2:"3,"`
AfterPresent bool
}
func (u *XUnionInTable) SetBefore(before string) {
u.Before = before
u.BeforePresent = true
}
func (u *XUnionInTable) GetBefore() string {
return u.Before
}
func (u *XUnionInTable) GetBeforeWithDefault(_default string) string {
if !u.HasBefore() {
return _default
}
return u.Before
}
func (u *XUnionInTable) HasBefore() bool {
return u.BeforePresent
}
func (u *XUnionInTable) ClearBefore() {
u.BeforePresent = false
}
func (u *XUnionInTable) SetXu(xu SampleXUnion) {
u.Xu = xu
u.XuPresent = true
}
func (u *XUnionInTable) GetXu() SampleXUnion {
return u.Xu
}
func (u *XUnionInTable) GetXuWithDefault(_default SampleXUnion) SampleXUnion {
if !u.HasXu() {
return _default
}
return u.Xu
}
func (u *XUnionInTable) HasXu() bool {
return u.XuPresent
}
func (u *XUnionInTable) ClearXu() {
u.XuPresent = false
}
func (u *XUnionInTable) SetAfter(after string) {
u.After = after
u.AfterPresent = true
}
func (u *XUnionInTable) GetAfter() string {
return u.After
}
func (u *XUnionInTable) GetAfterWithDefault(_default string) string {
if !u.HasAfter() {
return _default
}
return u.After
}
func (u *XUnionInTable) HasAfter() bool {
return u.AfterPresent
}
func (u *XUnionInTable) ClearAfter() {
u.AfterPresent = 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 SimpleTable struct {
_ struct{} `fidl:"t,16,8" fidl2:"t,16,8"`
X int64 `fidl:"1" fidl2:"1"`
XPresent bool
Y int64 `fidl:"5" fidl2:"5"`
YPresent bool
}
func (u *SimpleTable) SetX(x int64) {
u.X = x
u.XPresent = true
}
func (u *SimpleTable) GetX() int64 {
return u.X
}
func (u *SimpleTable) GetXWithDefault(_default int64) int64 {
if !u.HasX() {
return _default
}
return u.X
}
func (u *SimpleTable) HasX() bool {
return u.XPresent
}
func (u *SimpleTable) ClearX() {
u.XPresent = false
}
func (u *SimpleTable) SetY(y int64) {
u.Y = y
u.YPresent = true
}
func (u *SimpleTable) GetY() int64 {
return u.Y
}
func (u *SimpleTable) GetYWithDefault(_default int64) int64 {
if !u.HasY() {
return _default
}
return u.Y
}
func (u *SimpleTable) HasY() bool {
return u.YPresent
}
func (u *SimpleTable) ClearY() {
u.YPresent = false
}
type TableWithStringAndVector struct {
_ struct{} `fidl:"t,16,8" fidl2:"t,16,8"`
Foo string `fidl:"1," fidl2:"1,"`
FooPresent bool
Bar int32 `fidl:"2" fidl2:"2"`
BarPresent bool
Baz []uint8 `fidl:"3," fidl2:"3,"`
BazPresent bool
}
func (u *TableWithStringAndVector) SetFoo(foo string) {
u.Foo = foo
u.FooPresent = true
}
func (u *TableWithStringAndVector) GetFoo() string {
return u.Foo
}
func (u *TableWithStringAndVector) GetFooWithDefault(_default string) string {
if !u.HasFoo() {
return _default
}
return u.Foo
}
func (u *TableWithStringAndVector) HasFoo() bool {
return u.FooPresent
}
func (u *TableWithStringAndVector) ClearFoo() {
u.FooPresent = false
}
func (u *TableWithStringAndVector) SetBar(bar int32) {
u.Bar = bar
u.BarPresent = true
}
func (u *TableWithStringAndVector) GetBar() int32 {
return u.Bar
}
func (u *TableWithStringAndVector) GetBarWithDefault(_default int32) int32 {
if !u.HasBar() {
return _default
}
return u.Bar
}
func (u *TableWithStringAndVector) HasBar() bool {
return u.BarPresent
}
func (u *TableWithStringAndVector) ClearBar() {
u.BarPresent = false
}
func (u *TableWithStringAndVector) SetBaz(baz []uint8) {
u.Baz = baz
u.BazPresent = true
}
func (u *TableWithStringAndVector) GetBaz() []uint8 {
return u.Baz
}
func (u *TableWithStringAndVector) GetBazWithDefault(_default []uint8) []uint8 {
if !u.HasBaz() {
return _default
}
return u.Baz
}
func (u *TableWithStringAndVector) HasBaz() bool {
return u.BazPresent
}
func (u *TableWithStringAndVector) ClearBaz() {
u.BazPresent = false
}
type EthernetDeviceInterface _bindings.ChannelProxy
type EthernetDevice interface {
}
type EthernetDeviceTransitionalBase struct{}
type EthernetDeviceInterfaceRequest _bindings.InterfaceRequest
func NewEthernetDeviceInterfaceRequest() (EthernetDeviceInterfaceRequest, *EthernetDeviceInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return EthernetDeviceInterfaceRequest(req), (*EthernetDeviceInterface)(cli), err
}
type EthernetDeviceStub struct {
Impl EthernetDevice
}
func (s_ *EthernetDeviceStub) DispatchImpl(ordinal_ uint64, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
switch ordinal_ {
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type EthernetDeviceService struct {
_bindings.BindingSet
}
func (s *EthernetDeviceService) Add(impl EthernetDevice, c _zx.Channel, onError func(error)) (_bindings.BindingKey, error) {
return s.BindingSet.Add(&EthernetDeviceStub{Impl: impl}, c, onError)
}
func (s *EthernetDeviceService) EventProxyFor(key _bindings.BindingKey) (*EthernetDeviceEventProxy, bool) {
pxy, err := s.BindingSet.ProxyFor(key)
return (*EthernetDeviceEventProxy)(pxy), err
}
type EthernetDeviceEventProxy _bindings.ChannelProxy