func (m *Complex_Communique) Unmarshal(rawBytes []byte) (*Complex_Communique, error) {
	reader := jspb.NewReader(rawBytes)
	m = m.UnmarshalFromReader(reader)
	if err := reader.Err(); err != nil {
		return nil, err
	}
	return m, nil
}
Unmarshal unmarshals a Complex_Communique from a slice of bytes.
package grpc_test
import jspb "github.com/johanbrandhorst/protobuf/jspb"
import multitest2 "github.com/johanbrandhorst/protobuf/protoc-gen-gopherjs/test/multi"
import (
	context "context"
	grpcweb "github.com/johanbrandhorst/protobuf/grpcweb"
)
const _ = jspb.JspbPackageIsVersion2
type Days int
const (
	Days_MONDAY  Days = 0
	Days_TUESDAY Days = 2
	Days_LUNDI   Days = 0
)
var Days_name = map[int]string{
	0: "MONDAY",
	2: "TUESDAY",
}
var Days_value = map[string]int{
	"MONDAY":  0,
	"TUESDAY": 2,
	"LUNDI":   0,
}
func (x Days) String() string {
	return Days_name[int(x)]
}
type Simple struct {
	Key      int64
	Deadline float32
	Day      Days
	Name     string
}
func (m *Simple) GetKey() (x int64) {
	if m == nil {
		return x
	}
	return m.Key
}
func (m *Simple) GetDeadline() (x float32) {
	if m == nil {
		return x
	}
	return m.Deadline
}
func (m *Simple) GetDay() (x Days) {
	if m == nil {
		return x
	}
	return m.Day
}
func (m *Simple) GetName() (x string) {
	if m == nil {
		return x
	}
	return m.Name
}
func (m *Simple) MarshalToWriter(writer jspb.Writer) {
	if m == nil {
		return
	}
	if m.Key != 0 {
		writer.WriteInt64(1, m.Key)
	}
	if m.Deadline != 0 {
		writer.WriteFloat32(2, m.Deadline)
	}
	if int(m.Day) != 0 {
		writer.WriteEnum(3, int(m.Day))
	}
	if len(m.Name) > 0 {
		writer.WriteString(4, m.Name)
	}
	return
}
func (m *Simple) Marshal() []byte {
	writer := jspb.NewWriter()
	m.MarshalToWriter(writer)
	return writer.GetResult()
}
func (m *Simple) UnmarshalFromReader(reader jspb.Reader) *Simple {
	for reader.Next() {
		if m == nil {
			m = &Simple{}
		}
		switch reader.GetFieldNumber() {
		case 1:
			m.Key = reader.ReadInt64()
		case 2:
			m.Deadline = reader.ReadFloat32()
		case 3:
			m.Day = Days(reader.ReadEnum())
		case 4:
			m.Name = reader.ReadString()
		default:
			reader.SkipField()
		}
	}
	return m
}
func (m *Simple) Unmarshal(rawBytes []byte) (*Simple, error) {
	reader := jspb.NewReader(rawBytes)
	m = m.UnmarshalFromReader(reader)
	if err := reader.Err(); err != nil {
		return nil, err
	}
	return m, nil
}
type Complex struct {
	Communique  []*Complex_Communique
	CompactKeys map[int32]string
	Multi *multitest2.Multi1
}
func (m *Complex) GetCommunique() (x []*Complex_Communique) {
	if m == nil {
		return x
	}
	return m.Communique
}
func (m *Complex) GetCompactKeys() (x map[int32]string) {
	if m == nil {
		return x
	}
	return m.CompactKeys
}
func (m *Complex) GetMulti() (x *multitest2.Multi1) {
	if m == nil {
		return x
	}
	return m.Multi
}
func (m *Complex) MarshalToWriter(writer jspb.Writer) {
	if m == nil {
		return
	}
	for _, msg := range m.Communique {
		writer.WriteMessage(1, func() {
			msg.MarshalToWriter(writer)
		})
	}
	if len(m.CompactKeys) > 0 {
		for key, value := range m.CompactKeys {
			writer.WriteMessage(2, func() {
				writer.WriteInt32(1, key)
				writer.WriteString(2, value)
			})
		}
	}
	if m.Multi != nil {
		writer.WriteMessage(3, func() {
			m.Multi.MarshalToWriter(writer)
		})
	}
	return
}
func (m *Complex) Marshal() []byte {
	writer := jspb.NewWriter()
	m.MarshalToWriter(writer)
	return writer.GetResult()
}
func (m *Complex) UnmarshalFromReader(reader jspb.Reader) *Complex {
	for reader.Next() {
		if m == nil {
			m = &Complex{}
		}
		switch reader.GetFieldNumber() {
		case 1:
			reader.ReadMessage(func() {
				m.Communique = append(m.Communique, new(Complex_Communique).UnmarshalFromReader(reader))
			})
		case 2:
			if m.CompactKeys == nil {
				m.CompactKeys = map[int32]string{}
			}
			reader.ReadMessage(func() {
				var key int32
				var value string
				for reader.Next() {
					switch reader.GetFieldNumber() {
					case 1:
						key = reader.ReadInt32()
					case 2:
						value = reader.ReadString()
					}
					m.CompactKeys[key] = value
				}
			})
		case 3:
			reader.ReadMessage(func() {
				m.Multi = m.Multi.UnmarshalFromReader(reader)
			})
		default:
			reader.SkipField()
		}
	}
	return m
}
func (m *Complex) Unmarshal(rawBytes []byte) (*Complex, error) {
	reader := jspb.NewReader(rawBytes)
	m = m.UnmarshalFromReader(reader)
	if err := reader.Err(); err != nil {
		return nil, err
	}
	return m, nil
}
type Complex_Communique struct {
	MakeMeCry bool
	UnionThing isComplex_Communique_UnionThing
}
type isComplex_Communique_UnionThing interface{ isComplex_Communique_UnionThing() }
type Complex_Communique_Number struct {
	Number int32
}
type Complex_Communique_Name struct {
	Name string
}
type Complex_Communique_Data struct {
	Data []byte
}
type Complex_Communique_TempC struct {
	TempC float64
}
type Complex_Communique_Height struct {
	Height float32
}
type Complex_Communique_Today struct {
	Today Days
}
type Complex_Communique_Maybe struct {
	Maybe bool
}
type Complex_Communique_Delta_ struct {
	Delta int32
}
func (*Complex_Communique_Number) isComplex_Communique_UnionThing() {}
func (*Complex_Communique_Name) isComplex_Communique_UnionThing()   {}
func (*Complex_Communique_Data) isComplex_Communique_UnionThing()   {}
func (*Complex_Communique_TempC) isComplex_Communique_UnionThing()  {}
func (*Complex_Communique_Height) isComplex_Communique_UnionThing() {}
func (*Complex_Communique_Today) isComplex_Communique_UnionThing()  {}
func (*Complex_Communique_Maybe) isComplex_Communique_UnionThing()  {}
func (*Complex_Communique_Delta_) isComplex_Communique_UnionThing() {}
func (m *Complex_Communique) GetUnionThing() (x isComplex_Communique_UnionThing) {
	if m == nil {
		return x
	}
	return m.UnionThing
}
func (m *Complex_Communique) GetMakeMeCry() (x bool) {
	if m == nil {
		return x
	}
	return m.MakeMeCry
}
func (m *Complex_Communique) GetNumber() (x int32) {
	if v, ok := m.GetUnionThing().(*Complex_Communique_Number); ok {
		return v.Number
	}
	return x
}
func (m *Complex_Communique) GetName() (x string) {
	if v, ok := m.GetUnionThing().(*Complex_Communique_Name); ok {
		return v.Name
	}
	return x
}
func (m *Complex_Communique) GetData() (x []byte) {
	if v, ok := m.GetUnionThing().(*Complex_Communique_Data); ok {
		return v.Data
	}
	return x
}
func (m *Complex_Communique) GetTempC() (x float64) {
	if v, ok := m.GetUnionThing().(*Complex_Communique_TempC); ok {
		return v.TempC
	}
	return x
}
func (m *Complex_Communique) GetHeight() (x float32) {
	if v, ok := m.GetUnionThing().(*Complex_Communique_Height); ok {
		return v.Height
	}
	return x
}
func (m *Complex_Communique) GetToday() (x Days) {
	if v, ok := m.GetUnionThing().(*Complex_Communique_Today); ok {
		return v.Today
	}
	return x
}
func (m *Complex_Communique) GetMaybe() (x bool) {
	if v, ok := m.GetUnionThing().(*Complex_Communique_Maybe); ok {
		return v.Maybe
	}
	return x
}
func (m *Complex_Communique) GetDelta() (x int32) {
	if v, ok := m.GetUnionThing().(*Complex_Communique_Delta_); ok {
		return v.Delta
	}
	return x
}
func (m *Complex_Communique) MarshalToWriter(writer jspb.Writer) {
	if m == nil {
		return
	}
	switch t := m.UnionThing.(type) {
	case *Complex_Communique_Number:
		if t.Number != 0 {
			writer.WriteInt32(2, t.Number)
		}
	case *Complex_Communique_Name:
		if len(t.Name) > 0 {
			writer.WriteString(3, t.Name)
		}
	case *Complex_Communique_Data:
		if len(t.Data) > 0 {
			writer.WriteBytes(4, t.Data)
		}
	case *Complex_Communique_TempC:
		if t.TempC != 0 {
			writer.WriteFloat64(5, t.TempC)
		}
	case *Complex_Communique_Height:
		if t.Height != 0 {
			writer.WriteFloat32(6, t.Height)
		}
	case *Complex_Communique_Today:
		if int(t.Today) != 0 {
			writer.WriteEnum(7, int(t.Today))
		}
	case *Complex_Communique_Maybe:
		if t.Maybe {
			writer.WriteBool(8, t.Maybe)
		}
	case *Complex_Communique_Delta_:
		if t.Delta != 0 {
			writer.WriteSint32(9, t.Delta)
		}
	}
	if m.MakeMeCry {
		writer.WriteBool(1, m.MakeMeCry)
	}
	return
}
func (m *Complex_Communique) Marshal() []byte {
	writer := jspb.NewWriter()
	m.MarshalToWriter(writer)
	return writer.GetResult()
}
func (m *Complex_Communique) UnmarshalFromReader(reader jspb.Reader) *Complex_Communique {
	for reader.Next() {
		if m == nil {
			m = &Complex_Communique{}
		}
		switch reader.GetFieldNumber() {
		case 1:
			m.MakeMeCry = reader.ReadBool()
		case 2:
			m.UnionThing = &Complex_Communique_Number{
				Number: reader.ReadInt32(),
			}
		case 3:
			m.UnionThing = &Complex_Communique_Name{
				Name: reader.ReadString(),
			}
		case 4:
			m.UnionThing = &Complex_Communique_Data{
				Data: reader.ReadBytes(),
			}
		case 5:
			m.UnionThing = &Complex_Communique_TempC{
				TempC: reader.ReadFloat64(),
			}
		case 6:
			m.UnionThing = &Complex_Communique_Height{
				Height: reader.ReadFloat32(),
			}
		case 7:
			m.UnionThing = &Complex_Communique_Today{
				Today: Days(reader.ReadEnum()),
			}
		case 8:
			m.UnionThing = &Complex_Communique_Maybe{
				Maybe: reader.ReadBool(),
			}
		case 9:
			m.UnionThing = &Complex_Communique_Delta_{
				Delta: reader.ReadSint32(),
			}
		default:
			reader.SkipField()
		}
	}
	return m
}