From 73d115ce6260e97f5f7ee47f743d842ffd292662 Mon Sep 17 00:00:00 2001 From: Adelyn Breelove Date: Thu, 13 Dec 2018 14:11:54 -0700 Subject: Working on deriving types from json --- lib/models/presence_j.ml | 504 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 504 insertions(+) create mode 100644 lib/models/presence_j.ml (limited to 'lib/models/presence_j.ml') diff --git a/lib/models/presence_j.ml b/lib/models/presence_j.ml new file mode 100644 index 0000000..91ef86d --- /dev/null +++ b/lib/models/presence_j.ml @@ -0,0 +1,504 @@ +(* Auto-generated from "presence.atd" *) +[@@@ocaml.warning "-27-32-35-39"] + +type user = User_t.t + +type role = Role_t.t + +type guild = Guild_t.t + +type activity = Activity_t.t + +type t = Presence_t.t = { + user: user; + roles: role list; + game: activity option; + guild: guild; + status: string; + activities: activity list +} + +let write_user = ( + User_j.write_t +) +let string_of_user ?(len = 1024) x = + let ob = Bi_outbuf.create len in + write_user ob x; + Bi_outbuf.contents ob +let read_user = ( + User_j.read_t +) +let user_of_string s = + read_user (Yojson.Safe.init_lexer ()) (Lexing.from_string s) +let write_role = ( + Role_j.write_t +) +let string_of_role ?(len = 1024) x = + let ob = Bi_outbuf.create len in + write_role ob x; + Bi_outbuf.contents ob +let read_role = ( + Role_j.read_t +) +let role_of_string s = + read_role (Yojson.Safe.init_lexer ()) (Lexing.from_string s) +let write_guild = ( + Guild_j.write_t +) +let string_of_guild ?(len = 1024) x = + let ob = Bi_outbuf.create len in + write_guild ob x; + Bi_outbuf.contents ob +let read_guild = ( + Guild_j.read_t +) +let guild_of_string s = + read_guild (Yojson.Safe.init_lexer ()) (Lexing.from_string s) +let write_activity = ( + Activity_j.write_t +) +let string_of_activity ?(len = 1024) x = + let ob = Bi_outbuf.create len in + write_activity ob x; + Bi_outbuf.contents ob +let read_activity = ( + Activity_j.read_t +) +let activity_of_string s = + read_activity (Yojson.Safe.init_lexer ()) (Lexing.from_string s) +let write__3 = ( + Atdgen_runtime.Oj_run.write_list ( + write_activity + ) +) +let string_of__3 ?(len = 1024) x = + let ob = Bi_outbuf.create len in + write__3 ob x; + Bi_outbuf.contents ob +let read__3 = ( + Atdgen_runtime.Oj_run.read_list ( + read_activity + ) +) +let _3_of_string s = + read__3 (Yojson.Safe.init_lexer ()) (Lexing.from_string s) +let write__2 = ( + Atdgen_runtime.Oj_run.write_option ( + write_activity + ) +) +let string_of__2 ?(len = 1024) x = + let ob = Bi_outbuf.create len in + write__2 ob x; + Bi_outbuf.contents ob +let read__2 = ( + fun p lb -> + Yojson.Safe.read_space p lb; + match Yojson.Safe.start_any_variant p lb with + | `Edgy_bracket -> ( + match Yojson.Safe.read_ident p lb with + | "None" -> + Yojson.Safe.read_space p lb; + Yojson.Safe.read_gt p lb; + (None : _ option) + | "Some" -> + Atdgen_runtime.Oj_run.read_until_field_value p lb; + let x = ( + read_activity + ) p lb + in + Yojson.Safe.read_space p lb; + Yojson.Safe.read_gt p lb; + (Some x : _ option) + | x -> + Atdgen_runtime.Oj_run.invalid_variant_tag p x + ) + | `Double_quote -> ( + match Yojson.Safe.finish_string p lb with + | "None" -> + (None : _ option) + | x -> + Atdgen_runtime.Oj_run.invalid_variant_tag p x + ) + | `Square_bracket -> ( + match Atdgen_runtime.Oj_run.read_string p lb with + | "Some" -> + Yojson.Safe.read_space p lb; + Yojson.Safe.read_comma p lb; + Yojson.Safe.read_space p lb; + let x = ( + read_activity + ) p lb + in + Yojson.Safe.read_space p lb; + Yojson.Safe.read_rbr p lb; + (Some x : _ option) + | x -> + Atdgen_runtime.Oj_run.invalid_variant_tag p x + ) +) +let _2_of_string s = + read__2 (Yojson.Safe.init_lexer ()) (Lexing.from_string s) +let write__1 = ( + Atdgen_runtime.Oj_run.write_list ( + write_role + ) +) +let string_of__1 ?(len = 1024) x = + let ob = Bi_outbuf.create len in + write__1 ob x; + Bi_outbuf.contents ob +let read__1 = ( + Atdgen_runtime.Oj_run.read_list ( + read_role + ) +) +let _1_of_string s = + read__1 (Yojson.Safe.init_lexer ()) (Lexing.from_string s) +let write_t : _ -> t -> _ = ( + fun ob x -> + Bi_outbuf.add_char ob '{'; + let is_first = ref true in + if !is_first then + is_first := false + else + Bi_outbuf.add_char ob ','; + Bi_outbuf.add_string ob "\"user\":"; + ( + write_user + ) + ob x.user; + if !is_first then + is_first := false + else + Bi_outbuf.add_char ob ','; + Bi_outbuf.add_string ob "\"roles\":"; + ( + write__1 + ) + ob x.roles; + (match x.game with None -> () | Some x -> + if !is_first then + is_first := false + else + Bi_outbuf.add_char ob ','; + Bi_outbuf.add_string ob "\"game\":"; + ( + write_activity + ) + ob x; + ); + if !is_first then + is_first := false + else + Bi_outbuf.add_char ob ','; + Bi_outbuf.add_string ob "\"guild\":"; + ( + write_guild + ) + ob x.guild; + if !is_first then + is_first := false + else + Bi_outbuf.add_char ob ','; + Bi_outbuf.add_string ob "\"status\":"; + ( + Yojson.Safe.write_string + ) + ob x.status; + if !is_first then + is_first := false + else + Bi_outbuf.add_char ob ','; + Bi_outbuf.add_string ob "\"activities\":"; + ( + write__3 + ) + ob x.activities; + Bi_outbuf.add_char ob '}'; +) +let string_of_t ?(len = 1024) x = + let ob = Bi_outbuf.create len in + write_t ob x; + Bi_outbuf.contents ob +let read_t = ( + fun p lb -> + Yojson.Safe.read_space p lb; + Yojson.Safe.read_lcurl p lb; + let field_user = ref (Obj.magic (Sys.opaque_identity 0.0)) in + let field_roles = ref (Obj.magic (Sys.opaque_identity 0.0)) in + let field_game = ref (None) in + let field_guild = ref (Obj.magic (Sys.opaque_identity 0.0)) in + let field_status = ref (Obj.magic (Sys.opaque_identity 0.0)) in + let field_activities = ref (Obj.magic (Sys.opaque_identity 0.0)) in + let bits0 = ref 0 in + try + Yojson.Safe.read_space p lb; + Yojson.Safe.read_object_end lb; + Yojson.Safe.read_space p lb; + let f = + fun s pos len -> + if pos < 0 || len < 0 || pos + len > String.length s then + invalid_arg "out-of-bounds substring position or length"; + match len with + | 4 -> ( + match String.unsafe_get s pos with + | 'g' -> ( + if String.unsafe_get s (pos+1) = 'a' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'e' then ( + 2 + ) + else ( + -1 + ) + ) + | 'u' -> ( + if String.unsafe_get s (pos+1) = 's' && String.unsafe_get s (pos+2) = 'e' && String.unsafe_get s (pos+3) = 'r' then ( + 0 + ) + else ( + -1 + ) + ) + | _ -> ( + -1 + ) + ) + | 5 -> ( + match String.unsafe_get s pos with + | 'g' -> ( + if String.unsafe_get s (pos+1) = 'u' && String.unsafe_get s (pos+2) = 'i' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = 'd' then ( + 3 + ) + else ( + -1 + ) + ) + | 'r' -> ( + if String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'l' && String.unsafe_get s (pos+3) = 'e' && String.unsafe_get s (pos+4) = 's' then ( + 1 + ) + else ( + -1 + ) + ) + | _ -> ( + -1 + ) + ) + | 6 -> ( + if String.unsafe_get s pos = 's' && String.unsafe_get s (pos+1) = 't' && String.unsafe_get s (pos+2) = 'a' && String.unsafe_get s (pos+3) = 't' && String.unsafe_get s (pos+4) = 'u' && String.unsafe_get s (pos+5) = 's' then ( + 4 + ) + else ( + -1 + ) + ) + | 10 -> ( + if String.unsafe_get s pos = 'a' && String.unsafe_get s (pos+1) = 'c' && String.unsafe_get s (pos+2) = 't' && String.unsafe_get s (pos+3) = 'i' && String.unsafe_get s (pos+4) = 'v' && String.unsafe_get s (pos+5) = 'i' && String.unsafe_get s (pos+6) = 't' && String.unsafe_get s (pos+7) = 'i' && String.unsafe_get s (pos+8) = 'e' && String.unsafe_get s (pos+9) = 's' then ( + 5 + ) + else ( + -1 + ) + ) + | _ -> ( + -1 + ) + in + let i = Yojson.Safe.map_ident p f lb in + Atdgen_runtime.Oj_run.read_until_field_value p lb; + ( + match i with + | 0 -> + field_user := ( + ( + read_user + ) p lb + ); + bits0 := !bits0 lor 0x1; + | 1 -> + field_roles := ( + ( + read__1 + ) p lb + ); + bits0 := !bits0 lor 0x2; + | 2 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_game := ( + Some ( + ( + read_activity + ) p lb + ) + ); + ) + | 3 -> + field_guild := ( + ( + read_guild + ) p lb + ); + bits0 := !bits0 lor 0x4; + | 4 -> + field_status := ( + ( + Atdgen_runtime.Oj_run.read_string + ) p lb + ); + bits0 := !bits0 lor 0x8; + | 5 -> + field_activities := ( + ( + read__3 + ) p lb + ); + bits0 := !bits0 lor 0x10; + | _ -> ( + Yojson.Safe.skip_json p lb + ) + ); + while true do + Yojson.Safe.read_space p lb; + Yojson.Safe.read_object_sep p lb; + Yojson.Safe.read_space p lb; + let f = + fun s pos len -> + if pos < 0 || len < 0 || pos + len > String.length s then + invalid_arg "out-of-bounds substring position or length"; + match len with + | 4 -> ( + match String.unsafe_get s pos with + | 'g' -> ( + if String.unsafe_get s (pos+1) = 'a' && String.unsafe_get s (pos+2) = 'm' && String.unsafe_get s (pos+3) = 'e' then ( + 2 + ) + else ( + -1 + ) + ) + | 'u' -> ( + if String.unsafe_get s (pos+1) = 's' && String.unsafe_get s (pos+2) = 'e' && String.unsafe_get s (pos+3) = 'r' then ( + 0 + ) + else ( + -1 + ) + ) + | _ -> ( + -1 + ) + ) + | 5 -> ( + match String.unsafe_get s pos with + | 'g' -> ( + if String.unsafe_get s (pos+1) = 'u' && String.unsafe_get s (pos+2) = 'i' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = 'd' then ( + 3 + ) + else ( + -1 + ) + ) + | 'r' -> ( + if String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'l' && String.unsafe_get s (pos+3) = 'e' && String.unsafe_get s (pos+4) = 's' then ( + 1 + ) + else ( + -1 + ) + ) + | _ -> ( + -1 + ) + ) + | 6 -> ( + if String.unsafe_get s pos = 's' && String.unsafe_get s (pos+1) = 't' && String.unsafe_get s (pos+2) = 'a' && String.unsafe_get s (pos+3) = 't' && String.unsafe_get s (pos+4) = 'u' && String.unsafe_get s (pos+5) = 's' then ( + 4 + ) + else ( + -1 + ) + ) + | 10 -> ( + if String.unsafe_get s pos = 'a' && String.unsafe_get s (pos+1) = 'c' && String.unsafe_get s (pos+2) = 't' && String.unsafe_get s (pos+3) = 'i' && String.unsafe_get s (pos+4) = 'v' && String.unsafe_get s (pos+5) = 'i' && String.unsafe_get s (pos+6) = 't' && String.unsafe_get s (pos+7) = 'i' && String.unsafe_get s (pos+8) = 'e' && String.unsafe_get s (pos+9) = 's' then ( + 5 + ) + else ( + -1 + ) + ) + | _ -> ( + -1 + ) + in + let i = Yojson.Safe.map_ident p f lb in + Atdgen_runtime.Oj_run.read_until_field_value p lb; + ( + match i with + | 0 -> + field_user := ( + ( + read_user + ) p lb + ); + bits0 := !bits0 lor 0x1; + | 1 -> + field_roles := ( + ( + read__1 + ) p lb + ); + bits0 := !bits0 lor 0x2; + | 2 -> + if not (Yojson.Safe.read_null_if_possible p lb) then ( + field_game := ( + Some ( + ( + read_activity + ) p lb + ) + ); + ) + | 3 -> + field_guild := ( + ( + read_guild + ) p lb + ); + bits0 := !bits0 lor 0x4; + | 4 -> + field_status := ( + ( + Atdgen_runtime.Oj_run.read_string + ) p lb + ); + bits0 := !bits0 lor 0x8; + | 5 -> + field_activities := ( + ( + read__3 + ) p lb + ); + bits0 := !bits0 lor 0x10; + | _ -> ( + Yojson.Safe.skip_json p lb + ) + ); + done; + assert false; + with Yojson.End_of_object -> ( + if !bits0 <> 0x1f then Atdgen_runtime.Oj_run.missing_fields p [| !bits0 |] [| "user"; "roles"; "guild"; "status"; "activities" |]; + ( + { + user = !field_user; + roles = !field_roles; + game = !field_game; + guild = !field_guild; + status = !field_status; + activities = !field_activities; + } + : t) + ) +) +let t_of_string s = + read_t (Yojson.Safe.init_lexer ()) (Lexing.from_string s) -- cgit v1.2.3 From 179d9598fe62e2966471b312fd438e98ff3a272a Mon Sep 17 00:00:00 2001 From: Adelyn Breelove Date: Thu, 13 Dec 2018 15:50:37 -0700 Subject: Fix more dispatch issues --- lib/models/presence_j.ml | 140 ++++++++++++++++++++++------------------------- 1 file changed, 64 insertions(+), 76 deletions(-) (limited to 'lib/models/presence_j.ml') diff --git a/lib/models/presence_j.ml b/lib/models/presence_j.ml index 91ef86d..b4ea497 100644 --- a/lib/models/presence_j.ml +++ b/lib/models/presence_j.ml @@ -3,17 +3,17 @@ type user = User_t.t -type role = Role_t.t +type snowflake = Snowflake_t.t -type guild = Guild_t.t +type partial_user = User_t.partial_user type activity = Activity_t.t type t = Presence_t.t = { - user: user; - roles: role list; + user: partial_user; + roles: snowflake list; game: activity option; - guild: guild; + guild_id: snowflake; status: string; activities: activity list } @@ -30,30 +30,30 @@ let read_user = ( ) let user_of_string s = read_user (Yojson.Safe.init_lexer ()) (Lexing.from_string s) -let write_role = ( - Role_j.write_t +let write_snowflake = ( + Snowflake_j.write_t ) -let string_of_role ?(len = 1024) x = +let string_of_snowflake ?(len = 1024) x = let ob = Bi_outbuf.create len in - write_role ob x; + write_snowflake ob x; Bi_outbuf.contents ob -let read_role = ( - Role_j.read_t +let read_snowflake = ( + Snowflake_j.read_t ) -let role_of_string s = - read_role (Yojson.Safe.init_lexer ()) (Lexing.from_string s) -let write_guild = ( - Guild_j.write_t +let snowflake_of_string s = + read_snowflake (Yojson.Safe.init_lexer ()) (Lexing.from_string s) +let write_partial_user = ( + User_j.write_partial_user ) -let string_of_guild ?(len = 1024) x = +let string_of_partial_user ?(len = 1024) x = let ob = Bi_outbuf.create len in - write_guild ob x; + write_partial_user ob x; Bi_outbuf.contents ob -let read_guild = ( - Guild_j.read_t +let read_partial_user = ( + User_j.read_partial_user ) -let guild_of_string s = - read_guild (Yojson.Safe.init_lexer ()) (Lexing.from_string s) +let partial_user_of_string s = + read_partial_user (Yojson.Safe.init_lexer ()) (Lexing.from_string s) let write_activity = ( Activity_j.write_t ) @@ -141,7 +141,7 @@ let _2_of_string s = read__2 (Yojson.Safe.init_lexer ()) (Lexing.from_string s) let write__1 = ( Atdgen_runtime.Oj_run.write_list ( - write_role + write_snowflake ) ) let string_of__1 ?(len = 1024) x = @@ -150,7 +150,7 @@ let string_of__1 ?(len = 1024) x = Bi_outbuf.contents ob let read__1 = ( Atdgen_runtime.Oj_run.read_list ( - read_role + read_snowflake ) ) let _1_of_string s = @@ -165,7 +165,7 @@ let write_t : _ -> t -> _ = ( Bi_outbuf.add_char ob ','; Bi_outbuf.add_string ob "\"user\":"; ( - write_user + write_partial_user ) ob x.user; if !is_first then @@ -192,11 +192,11 @@ let write_t : _ -> t -> _ = ( is_first := false else Bi_outbuf.add_char ob ','; - Bi_outbuf.add_string ob "\"guild\":"; + Bi_outbuf.add_string ob "\"guild_id\":"; ( - write_guild + write_snowflake ) - ob x.guild; + ob x.guild_id; if !is_first then is_first := false else @@ -228,7 +228,7 @@ let read_t = ( let field_user = ref (Obj.magic (Sys.opaque_identity 0.0)) in let field_roles = ref (Obj.magic (Sys.opaque_identity 0.0)) in let field_game = ref (None) in - let field_guild = ref (Obj.magic (Sys.opaque_identity 0.0)) in + let field_guild_id = ref (Obj.magic (Sys.opaque_identity 0.0)) in let field_status = ref (Obj.magic (Sys.opaque_identity 0.0)) in let field_activities = ref (Obj.magic (Sys.opaque_identity 0.0)) in let bits0 = ref 0 in @@ -264,26 +264,12 @@ let read_t = ( ) ) | 5 -> ( - match String.unsafe_get s pos with - | 'g' -> ( - if String.unsafe_get s (pos+1) = 'u' && String.unsafe_get s (pos+2) = 'i' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = 'd' then ( - 3 - ) - else ( - -1 - ) - ) - | 'r' -> ( - if String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'l' && String.unsafe_get s (pos+3) = 'e' && String.unsafe_get s (pos+4) = 's' then ( - 1 - ) - else ( - -1 - ) - ) - | _ -> ( - -1 - ) + if String.unsafe_get s pos = 'r' && String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'l' && String.unsafe_get s (pos+3) = 'e' && String.unsafe_get s (pos+4) = 's' then ( + 1 + ) + else ( + -1 + ) ) | 6 -> ( if String.unsafe_get s pos = 's' && String.unsafe_get s (pos+1) = 't' && String.unsafe_get s (pos+2) = 'a' && String.unsafe_get s (pos+3) = 't' && String.unsafe_get s (pos+4) = 'u' && String.unsafe_get s (pos+5) = 's' then ( @@ -293,6 +279,14 @@ let read_t = ( -1 ) ) + | 8 -> ( + if String.unsafe_get s pos = 'g' && String.unsafe_get s (pos+1) = 'u' && String.unsafe_get s (pos+2) = 'i' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = 'd' && String.unsafe_get s (pos+5) = '_' && String.unsafe_get s (pos+6) = 'i' && String.unsafe_get s (pos+7) = 'd' then ( + 3 + ) + else ( + -1 + ) + ) | 10 -> ( if String.unsafe_get s pos = 'a' && String.unsafe_get s (pos+1) = 'c' && String.unsafe_get s (pos+2) = 't' && String.unsafe_get s (pos+3) = 'i' && String.unsafe_get s (pos+4) = 'v' && String.unsafe_get s (pos+5) = 'i' && String.unsafe_get s (pos+6) = 't' && String.unsafe_get s (pos+7) = 'i' && String.unsafe_get s (pos+8) = 'e' && String.unsafe_get s (pos+9) = 's' then ( 5 @@ -312,7 +306,7 @@ let read_t = ( | 0 -> field_user := ( ( - read_user + read_partial_user ) p lb ); bits0 := !bits0 lor 0x1; @@ -334,9 +328,9 @@ let read_t = ( ); ) | 3 -> - field_guild := ( + field_guild_id := ( ( - read_guild + read_snowflake ) p lb ); bits0 := !bits0 lor 0x4; @@ -390,26 +384,12 @@ let read_t = ( ) ) | 5 -> ( - match String.unsafe_get s pos with - | 'g' -> ( - if String.unsafe_get s (pos+1) = 'u' && String.unsafe_get s (pos+2) = 'i' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = 'd' then ( - 3 - ) - else ( - -1 - ) - ) - | 'r' -> ( - if String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'l' && String.unsafe_get s (pos+3) = 'e' && String.unsafe_get s (pos+4) = 's' then ( - 1 - ) - else ( - -1 - ) - ) - | _ -> ( - -1 - ) + if String.unsafe_get s pos = 'r' && String.unsafe_get s (pos+1) = 'o' && String.unsafe_get s (pos+2) = 'l' && String.unsafe_get s (pos+3) = 'e' && String.unsafe_get s (pos+4) = 's' then ( + 1 + ) + else ( + -1 + ) ) | 6 -> ( if String.unsafe_get s pos = 's' && String.unsafe_get s (pos+1) = 't' && String.unsafe_get s (pos+2) = 'a' && String.unsafe_get s (pos+3) = 't' && String.unsafe_get s (pos+4) = 'u' && String.unsafe_get s (pos+5) = 's' then ( @@ -419,6 +399,14 @@ let read_t = ( -1 ) ) + | 8 -> ( + if String.unsafe_get s pos = 'g' && String.unsafe_get s (pos+1) = 'u' && String.unsafe_get s (pos+2) = 'i' && String.unsafe_get s (pos+3) = 'l' && String.unsafe_get s (pos+4) = 'd' && String.unsafe_get s (pos+5) = '_' && String.unsafe_get s (pos+6) = 'i' && String.unsafe_get s (pos+7) = 'd' then ( + 3 + ) + else ( + -1 + ) + ) | 10 -> ( if String.unsafe_get s pos = 'a' && String.unsafe_get s (pos+1) = 'c' && String.unsafe_get s (pos+2) = 't' && String.unsafe_get s (pos+3) = 'i' && String.unsafe_get s (pos+4) = 'v' && String.unsafe_get s (pos+5) = 'i' && String.unsafe_get s (pos+6) = 't' && String.unsafe_get s (pos+7) = 'i' && String.unsafe_get s (pos+8) = 'e' && String.unsafe_get s (pos+9) = 's' then ( 5 @@ -438,7 +426,7 @@ let read_t = ( | 0 -> field_user := ( ( - read_user + read_partial_user ) p lb ); bits0 := !bits0 lor 0x1; @@ -460,9 +448,9 @@ let read_t = ( ); ) | 3 -> - field_guild := ( + field_guild_id := ( ( - read_guild + read_snowflake ) p lb ); bits0 := !bits0 lor 0x4; @@ -487,13 +475,13 @@ let read_t = ( done; assert false; with Yojson.End_of_object -> ( - if !bits0 <> 0x1f then Atdgen_runtime.Oj_run.missing_fields p [| !bits0 |] [| "user"; "roles"; "guild"; "status"; "activities" |]; + if !bits0 <> 0x1f then Atdgen_runtime.Oj_run.missing_fields p [| !bits0 |] [| "user"; "roles"; "guild_id"; "status"; "activities" |]; ( { user = !field_user; roles = !field_roles; game = !field_game; - guild = !field_guild; + guild_id = !field_guild_id; status = !field_status; activities = !field_activities; } -- cgit v1.2.3