aboutsummaryrefslogtreecommitdiff
path: root/lib/models/gen/presence_j.mli
blob: be68b3ff667b7e4c9cadfb46ed6b5f2e291416dc (plain) (blame)
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
(* Auto-generated from "presence.atd" *)
[@@@ocaml.warning "-27-32-35-39"]

type user = User_t.t

type snowflake = Snowflake_t.t

type partial_user = User_t.partial_user

type activity = Activity_t.t

type t = Presence_t.t = {
  user: partial_user;
  roles: snowflake list;
  game: activity option;
  guild_id: snowflake;
  status: string;
  activities: activity list
}

val write_user :
  Bi_outbuf.t -> user -> unit
  (** Output a JSON value of type {!user}. *)

val string_of_user :
  ?len:int -> user -> string
  (** Serialize a value of type {!user}
      into a JSON string.
      @param len specifies the initial length
                 of the buffer used internally.
                 Default: 1024. *)

val read_user :
  Yojson.Safe.lexer_state -> Lexing.lexbuf -> user
  (** Input JSON data of type {!user}. *)

val user_of_string :
  string -> user
  (** Deserialize JSON data of type {!user}. *)

val write_snowflake :
  Bi_outbuf.t -> snowflake -> unit
  (** Output a JSON value of type {!snowflake}. *)

val string_of_snowflake :
  ?len:int -> snowflake -> string
  (** Serialize a value of type {!snowflake}
      into a JSON string.
      @param len specifies the initial length
                 of the buffer used internally.
                 Default: 1024. *)

val read_snowflake :
  Yojson.Safe.lexer_state -> Lexing.lexbuf -> snowflake
  (** Input JSON data of type {!snowflake}. *)

val snowflake_of_string :
  string -> snowflake
  (** Deserialize JSON data of type {!snowflake}. *)

val write_partial_user :
  Bi_outbuf.t -> partial_user -> unit
  (** Output a JSON value of type {!partial_user}. *)

val string_of_partial_user :
  ?len:int -> partial_user -> string
  (** Serialize a value of type {!partial_user}
      into a JSON string.
      @param len specifies the initial length
                 of the buffer used internally.
                 Default: 1024. *)

val read_partial_user :
  Yojson.Safe.lexer_state -> Lexing.lexbuf -> partial_user
  (** Input JSON data of type {!partial_user}. *)

val partial_user_of_string :
  string -> partial_user
  (** Deserialize JSON data of type {!partial_user}. *)

val write_activity :
  Bi_outbuf.t -> activity -> unit
  (** Output a JSON value of type {!activity}. *)

val string_of_activity :
  ?len:int -> activity -> string
  (** Serialize a value of type {!activity}
      into a JSON string.
      @param len specifies the initial length
                 of the buffer used internally.
                 Default: 1024. *)

val read_activity :
  Yojson.Safe.lexer_state -> Lexing.lexbuf -> activity
  (** Input JSON data of type {!activity}. *)

val activity_of_string :
  string -> activity
  (** Deserialize JSON data of type {!activity}. *)

val write_t :
  Bi_outbuf.t -> t -> unit
  (** Output a JSON value of type {!t}. *)

val string_of_t :
  ?len:int -> t -> string
  (** Serialize a value of type {!t}
      into a JSON string.
      @param len specifies the initial length
                 of the buffer used internally.
                 Default: 1024. *)

val read_t :
  Yojson.Safe.lexer_state -> Lexing.lexbuf -> t
  (** Input JSON data of type {!t}. *)

val t_of_string :
  string -> t
  (** Deserialize JSON data of type {!t}. *)