-
Notifications
You must be signed in to change notification settings - Fork 83
/
union_null_int.go
54 lines (46 loc) · 1.53 KB
/
union_null_int.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Code generated by github.com/actgardner/gogen-avro. DO NOT EDIT.
/*
* SOURCE:
* defaults.avsc
*/
package avro
import (
"github.com/actgardner/gogen-avro/vm/types"
)
type UnionNullInt struct {
Null *types.NullVal
Int int32
UnionType UnionNullIntTypeEnum
}
type UnionNullIntTypeEnum int
const (
UnionNullIntTypeEnumNull UnionNullIntTypeEnum = 0
UnionNullIntTypeEnumInt UnionNullIntTypeEnum = 1
)
func NewUnionNullInt() *UnionNullInt {
return &UnionNullInt{}
}
func (_ *UnionNullInt) SetBoolean(v bool) { panic("Unsupported operation") }
func (_ *UnionNullInt) SetInt(v int32) { panic("Unsupported operation") }
func (_ *UnionNullInt) SetFloat(v float32) { panic("Unsupported operation") }
func (_ *UnionNullInt) SetDouble(v float64) { panic("Unsupported operation") }
func (_ *UnionNullInt) SetBytes(v []byte) { panic("Unsupported operation") }
func (_ *UnionNullInt) SetString(v string) { panic("Unsupported operation") }
func (r *UnionNullInt) SetLong(v int64) {
r.UnionType = (UnionNullIntTypeEnum)(v)
}
func (r *UnionNullInt) Get(i int) types.Field {
switch i {
case 0:
return r.Null
break
case 1:
return (*types.Int)(&r.Int)
break
}
panic("Unknown field index")
}
func (_ *UnionNullInt) SetDefault(i int) { panic("Unsupported operation") }
func (_ *UnionNullInt) AppendMap(key string) types.Field { panic("Unsupported operation") }
func (_ *UnionNullInt) AppendArray() types.Field { panic("Unsupported operation") }
func (_ *UnionNullInt) Finalize() {}