| 11520 | } |
| 11521 | |
| 11522 | func (m *Proposal) Size() (n int) { |
| 11523 | if m == nil { |
| 11524 | return 0 |
| 11525 | } |
| 11526 | var l int |
| 11527 | _ = l |
| 11528 | if m.Mutations != nil { |
| 11529 | l = m.Mutations.Size() |
| 11530 | n += 1 + l + sovPb(uint64(l)) |
| 11531 | } |
| 11532 | if len(m.Kv) > 0 { |
| 11533 | for _, e := range m.Kv { |
| 11534 | l = e.Size() |
| 11535 | n += 1 + l + sovPb(uint64(l)) |
| 11536 | } |
| 11537 | } |
| 11538 | if m.State != nil { |
| 11539 | l = m.State.Size() |
| 11540 | n += 1 + l + sovPb(uint64(l)) |
| 11541 | } |
| 11542 | l = len(m.CleanPredicate) |
| 11543 | if l > 0 { |
| 11544 | n += 1 + l + sovPb(uint64(l)) |
| 11545 | } |
| 11546 | if m.Delta != nil { |
| 11547 | l = m.Delta.Size() |
| 11548 | n += 1 + l + sovPb(uint64(l)) |
| 11549 | } |
| 11550 | if m.Snapshot != nil { |
| 11551 | l = m.Snapshot.Size() |
| 11552 | n += 1 + l + sovPb(uint64(l)) |
| 11553 | } |
| 11554 | if m.Index != 0 { |
| 11555 | n += 1 + sovPb(uint64(m.Index)) |
| 11556 | } |
| 11557 | if m.ExpectedChecksum != 0 { |
| 11558 | n += 1 + sovPb(uint64(m.ExpectedChecksum)) |
| 11559 | } |
| 11560 | if m.Restore != nil { |
| 11561 | l = m.Restore.Size() |
| 11562 | n += 1 + l + sovPb(uint64(l)) |
| 11563 | } |
| 11564 | return n |
| 11565 | } |
| 11566 | |
| 11567 | func (m *KVS) Size() (n int) { |
| 11568 | if m == nil { |