package ocaml-protoc-plugin

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file wrappers.ml

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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
(************************************************)
(*       AUTOGENERATED FILE - DO NOT EDIT!      *)
(************************************************)
(* Generated by: ocaml-protoc-plugin            *)
(* https://github.com/issuu/ocaml-protoc-plugin *)
(************************************************)
(*
   Source: google/protobuf/wrappers.proto
   Syntax: proto3 
   Parameters:
     annot=''
     debug=false
     opens=[]
     int64_as_int=true
     int32_as_int=true
     fixed_as_int=false
     singleton_record=false
*)
module Google = struct
  module Protobuf = struct
    module rec DoubleValue : sig
      val name': unit -> string
      type t = float 
      val to_proto: t -> Ocaml_protoc_plugin.Writer.t
      val from_proto: Ocaml_protoc_plugin.Reader.t -> t Ocaml_protoc_plugin.Result.t
    end = struct 
      let name' () = "Wrappers.google.protobuf.DoubleValue"
      type t = float 
      let to_proto = 
        let apply = fun ~f a -> f a in
        let spec = Ocaml_protoc_plugin.Serialize.C.( basic (1, double, proto3) ^:: nil ) in
        let serialize = Ocaml_protoc_plugin.Serialize.serialize (spec) in
        fun t -> apply ~f:(serialize ()) t
      
      let from_proto = 
        let constructor = fun a -> a in
        let spec = Ocaml_protoc_plugin.Deserialize.C.( basic (1, double, proto3) ^:: nil ) in
        let deserialize = Ocaml_protoc_plugin.Deserialize.deserialize (spec) constructor in
        fun writer -> deserialize writer
      
    end
    and FloatValue : sig
      val name': unit -> string
      type t = float 
      val to_proto: t -> Ocaml_protoc_plugin.Writer.t
      val from_proto: Ocaml_protoc_plugin.Reader.t -> t Ocaml_protoc_plugin.Result.t
    end = struct 
      let name' () = "Wrappers.google.protobuf.FloatValue"
      type t = float 
      let to_proto = 
        let apply = fun ~f a -> f a in
        let spec = Ocaml_protoc_plugin.Serialize.C.( basic (1, float, proto3) ^:: nil ) in
        let serialize = Ocaml_protoc_plugin.Serialize.serialize (spec) in
        fun t -> apply ~f:(serialize ()) t
      
      let from_proto = 
        let constructor = fun a -> a in
        let spec = Ocaml_protoc_plugin.Deserialize.C.( basic (1, float, proto3) ^:: nil ) in
        let deserialize = Ocaml_protoc_plugin.Deserialize.deserialize (spec) constructor in
        fun writer -> deserialize writer
      
    end
    and Int64Value : sig
      val name': unit -> string
      type t = int 
      val to_proto: t -> Ocaml_protoc_plugin.Writer.t
      val from_proto: Ocaml_protoc_plugin.Reader.t -> t Ocaml_protoc_plugin.Result.t
    end = struct 
      let name' () = "Wrappers.google.protobuf.Int64Value"
      type t = int 
      let to_proto = 
        let apply = fun ~f a -> f a in
        let spec = Ocaml_protoc_plugin.Serialize.C.( basic (1, int64_int, proto3) ^:: nil ) in
        let serialize = Ocaml_protoc_plugin.Serialize.serialize (spec) in
        fun t -> apply ~f:(serialize ()) t
      
      let from_proto = 
        let constructor = fun a -> a in
        let spec = Ocaml_protoc_plugin.Deserialize.C.( basic (1, int64_int, proto3) ^:: nil ) in
        let deserialize = Ocaml_protoc_plugin.Deserialize.deserialize (spec) constructor in
        fun writer -> deserialize writer
      
    end
    and UInt64Value : sig
      val name': unit -> string
      type t = int 
      val to_proto: t -> Ocaml_protoc_plugin.Writer.t
      val from_proto: Ocaml_protoc_plugin.Reader.t -> t Ocaml_protoc_plugin.Result.t
    end = struct 
      let name' () = "Wrappers.google.protobuf.UInt64Value"
      type t = int 
      let to_proto = 
        let apply = fun ~f a -> f a in
        let spec = Ocaml_protoc_plugin.Serialize.C.( basic (1, uint64_int, proto3) ^:: nil ) in
        let serialize = Ocaml_protoc_plugin.Serialize.serialize (spec) in
        fun t -> apply ~f:(serialize ()) t
      
      let from_proto = 
        let constructor = fun a -> a in
        let spec = Ocaml_protoc_plugin.Deserialize.C.( basic (1, uint64_int, proto3) ^:: nil ) in
        let deserialize = Ocaml_protoc_plugin.Deserialize.deserialize (spec) constructor in
        fun writer -> deserialize writer
      
    end
    and Int32Value : sig
      val name': unit -> string
      type t = int 
      val to_proto: t -> Ocaml_protoc_plugin.Writer.t
      val from_proto: Ocaml_protoc_plugin.Reader.t -> t Ocaml_protoc_plugin.Result.t
    end = struct 
      let name' () = "Wrappers.google.protobuf.Int32Value"
      type t = int 
      let to_proto = 
        let apply = fun ~f a -> f a in
        let spec = Ocaml_protoc_plugin.Serialize.C.( basic (1, int32_int, proto3) ^:: nil ) in
        let serialize = Ocaml_protoc_plugin.Serialize.serialize (spec) in
        fun t -> apply ~f:(serialize ()) t
      
      let from_proto = 
        let constructor = fun a -> a in
        let spec = Ocaml_protoc_plugin.Deserialize.C.( basic (1, int32_int, proto3) ^:: nil ) in
        let deserialize = Ocaml_protoc_plugin.Deserialize.deserialize (spec) constructor in
        fun writer -> deserialize writer
      
    end
    and UInt32Value : sig
      val name': unit -> string
      type t = int 
      val to_proto: t -> Ocaml_protoc_plugin.Writer.t
      val from_proto: Ocaml_protoc_plugin.Reader.t -> t Ocaml_protoc_plugin.Result.t
    end = struct 
      let name' () = "Wrappers.google.protobuf.UInt32Value"
      type t = int 
      let to_proto = 
        let apply = fun ~f a -> f a in
        let spec = Ocaml_protoc_plugin.Serialize.C.( basic (1, uint32_int, proto3) ^:: nil ) in
        let serialize = Ocaml_protoc_plugin.Serialize.serialize (spec) in
        fun t -> apply ~f:(serialize ()) t
      
      let from_proto = 
        let constructor = fun a -> a in
        let spec = Ocaml_protoc_plugin.Deserialize.C.( basic (1, uint32_int, proto3) ^:: nil ) in
        let deserialize = Ocaml_protoc_plugin.Deserialize.deserialize (spec) constructor in
        fun writer -> deserialize writer
      
    end
    and BoolValue : sig
      val name': unit -> string
      type t = bool 
      val to_proto: t -> Ocaml_protoc_plugin.Writer.t
      val from_proto: Ocaml_protoc_plugin.Reader.t -> t Ocaml_protoc_plugin.Result.t
    end = struct 
      let name' () = "Wrappers.google.protobuf.BoolValue"
      type t = bool 
      let to_proto = 
        let apply = fun ~f a -> f a in
        let spec = Ocaml_protoc_plugin.Serialize.C.( basic (1, bool, proto3) ^:: nil ) in
        let serialize = Ocaml_protoc_plugin.Serialize.serialize (spec) in
        fun t -> apply ~f:(serialize ()) t
      
      let from_proto = 
        let constructor = fun a -> a in
        let spec = Ocaml_protoc_plugin.Deserialize.C.( basic (1, bool, proto3) ^:: nil ) in
        let deserialize = Ocaml_protoc_plugin.Deserialize.deserialize (spec) constructor in
        fun writer -> deserialize writer
      
    end
    and StringValue : sig
      val name': unit -> string
      type t = string 
      val to_proto: t -> Ocaml_protoc_plugin.Writer.t
      val from_proto: Ocaml_protoc_plugin.Reader.t -> t Ocaml_protoc_plugin.Result.t
    end = struct 
      let name' () = "Wrappers.google.protobuf.StringValue"
      type t = string 
      let to_proto = 
        let apply = fun ~f a -> f a in
        let spec = Ocaml_protoc_plugin.Serialize.C.( basic (1, string, proto3) ^:: nil ) in
        let serialize = Ocaml_protoc_plugin.Serialize.serialize (spec) in
        fun t -> apply ~f:(serialize ()) t
      
      let from_proto = 
        let constructor = fun a -> a in
        let spec = Ocaml_protoc_plugin.Deserialize.C.( basic (1, string, proto3) ^:: nil ) in
        let deserialize = Ocaml_protoc_plugin.Deserialize.deserialize (spec) constructor in
        fun writer -> deserialize writer
      
    end
    and BytesValue : sig
      val name': unit -> string
      type t = bytes 
      val to_proto: t -> Ocaml_protoc_plugin.Writer.t
      val from_proto: Ocaml_protoc_plugin.Reader.t -> t Ocaml_protoc_plugin.Result.t
    end = struct 
      let name' () = "Wrappers.google.protobuf.BytesValue"
      type t = bytes 
      let to_proto = 
        let apply = fun ~f a -> f a in
        let spec = Ocaml_protoc_plugin.Serialize.C.( basic (1, bytes, proto3) ^:: nil ) in
        let serialize = Ocaml_protoc_plugin.Serialize.serialize (spec) in
        fun t -> apply ~f:(serialize ()) t
      
      let from_proto = 
        let constructor = fun a -> a in
        let spec = Ocaml_protoc_plugin.Deserialize.C.( basic (1, bytes, proto3) ^:: nil ) in
        let deserialize = Ocaml_protoc_plugin.Deserialize.deserialize (spec) constructor in
        fun writer -> deserialize writer
      
    end
  end
end
OCaml

Innovation. Community. Security.