in model/modelpb/transaction_vtproto.pb.go [182:356]
func (m *Transaction) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if m == nil {
return 0, nil
}
i := len(dAtA)
_ = i
var l int
_ = l
if m.unknownFields != nil {
i -= len(m.unknownFields)
copy(dAtA[i:], m.unknownFields)
}
if len(m.ProfilerStackTraceIds) > 0 {
for iNdEx := len(m.ProfilerStackTraceIds) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.ProfilerStackTraceIds[iNdEx])
copy(dAtA[i:], m.ProfilerStackTraceIds[iNdEx])
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProfilerStackTraceIds[iNdEx])))
i--
dAtA[i] = 0x1
i--
dAtA[i] = 0x82
}
}
if m.Root {
i--
if m.Root {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x78
}
if m.Sampled {
i--
if m.Sampled {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x70
}
if m.RepresentativeCount != 0 {
i -= 8
binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.RepresentativeCount))))
i--
dAtA[i] = 0x69
}
if m.DurationSummary != nil {
size, err := m.DurationSummary.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i--
dAtA[i] = 0x62
}
if len(m.DroppedSpansStats) > 0 {
for iNdEx := len(m.DroppedSpansStats) - 1; iNdEx >= 0; iNdEx-- {
size, err := m.DroppedSpansStats[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i--
dAtA[i] = 0x5a
}
}
if m.DurationHistogram != nil {
size, err := m.DurationHistogram.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i--
dAtA[i] = 0x52
}
if len(m.Id) > 0 {
i -= len(m.Id)
copy(dAtA[i:], m.Id)
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id)))
i--
dAtA[i] = 0x4a
}
if len(m.Result) > 0 {
i -= len(m.Result)
copy(dAtA[i:], m.Result)
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Result)))
i--
dAtA[i] = 0x42
}
if len(m.Name) > 0 {
i -= len(m.Name)
copy(dAtA[i:], m.Name)
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
i--
dAtA[i] = 0x3a
}
if len(m.Type) > 0 {
i -= len(m.Type)
copy(dAtA[i:], m.Type)
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type)))
i--
dAtA[i] = 0x32
}
if m.Message != nil {
size, err := m.Message.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i--
dAtA[i] = 0x2a
}
if len(m.Marks) > 0 {
for k := range m.Marks {
v := m.Marks[k]
baseI := i
size, err := v.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i--
dAtA[i] = 0x12
i -= len(k)
copy(dAtA[i:], k)
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k)))
i--
dAtA[i] = 0xa
i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0x22
}
}
if len(m.Custom) > 0 {
for iNdEx := len(m.Custom) - 1; iNdEx >= 0; iNdEx-- {
size, err := m.Custom[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i--
dAtA[i] = 0x1a
}
}
if m.UserExperience != nil {
size, err := m.UserExperience.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i--
dAtA[i] = 0x12
}
if m.SpanCount != nil {
size, err := m.SpanCount.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}