aboutsummaryrefslogtreecommitdiff
path: root/src/protobuf/wkt/empty_pb.nim
blob: 862cb0538be69cfb377ce959658d54bd8f3870d4 (plain)
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
# Generated by protoc_gen_nim. Do not edit!

import intsets

import protobuf/stream
import protobuf/types

type
    google_protobuf_Empty* = ref google_protobuf_EmptyObj
    google_protobuf_EmptyObj* = object of RootObj
        hasField: IntSet

proc newgoogle_protobuf_Empty*(): google_protobuf_Empty
proc writegoogle_protobuf_Empty*(stream: ProtobufStream, message: google_protobuf_Empty)
proc readgoogle_protobuf_Empty*(stream: ProtobufStream): google_protobuf_Empty
proc sizeOfgoogle_protobuf_Empty*(message: google_protobuf_Empty): uint64

proc newgoogle_protobuf_Empty*(): google_protobuf_Empty =
    new(result)
    result.hasField = initIntSet()

proc sizeOfgoogle_protobuf_Empty*(message: google_protobuf_Empty): uint64 =
    result = 0

proc writegoogle_protobuf_Empty*(stream: ProtobufStream, message: google_protobuf_Empty) =
    discard

proc readgoogle_protobuf_Empty*(stream: ProtobufStream): google_protobuf_Empty =
    result = newgoogle_protobuf_Empty()

proc serialize*(message: google_protobuf_Empty): string =
    let
        ss = newStringStream()
        pbs = newProtobufStream(ss)
    writegoogle_protobuf_Empty(pbs, message)
    result = ss.data

proc newgoogle_protobuf_Empty*(data: string): google_protobuf_Empty =
    let
        ss = newStringStream(data)
        pbs = newProtobufStream(ss)
    result = readgoogle_protobuf_Empty(pbs)