Orca
A bot framework that is easy to reason about, easy to debug, and easy to use.
webhook.endpoints-params.h
Go to the documentation of this file.
1 /* This file is generated from specs/discord/webhook.endpoints-params.json, Please don't edit it. */
18  /* specs/discord/webhook.endpoints-params.json:13:20
19  '{ "name": "name", "type":{ "base":"char", "dec":"*" }, "comment":"name of the webhook(1-80) chars" }' */
20  char *name; // name of the webhook(1-80) chars
21 
22  /* specs/discord/webhook.endpoints-params.json:14:20
23  '{ "name": "avatar", "type":{ "base":"char", "dec":"*" }, "inject_if_not":null, "comment":"base64 image for the default webhook avatar" }' */
24  char *avatar; // base64 image for the default webhook avatar
25 
26  // The following is metadata used to
27  // 1. control which field should be extracted/injected
28  // 2. record which field is presented(defined) in JSON
29  // 3. record which field is null in JSON
31  struct {
32  bool enable_arg_switches;
33  bool enable_record_defined;
34  bool enable_record_null;
35  void *arg_switches[2];
36  void *record_defined[2];
37  void *record_null[2];
38  } __M; // metadata
40 };
41 extern void discord_create_webhook_params_cleanup_v(void *p);
42 extern void discord_create_webhook_params_cleanup(struct discord_create_webhook_params *p);
43 extern void discord_create_webhook_params_init_v(void *p);
44 extern void discord_create_webhook_params_init(struct discord_create_webhook_params *p);
45 extern struct discord_create_webhook_params * discord_create_webhook_params_alloc();
46 extern void discord_create_webhook_params_free_v(void *p);
47 extern void discord_create_webhook_params_free(struct discord_create_webhook_params *p);
48 extern void discord_create_webhook_params_from_json_v(char *json, size_t len, void *p);
49 extern void discord_create_webhook_params_from_json(char *json, size_t len, struct discord_create_webhook_params *p);
50 extern size_t discord_create_webhook_params_to_json_v(char *json, size_t len, void *p);
51 extern size_t discord_create_webhook_params_to_json(char *json, size_t len, struct discord_create_webhook_params *p);
52 extern size_t discord_create_webhook_params_to_query_v(char *json, size_t len, void *p);
53 extern size_t discord_create_webhook_params_to_query(char *json, size_t len, struct discord_create_webhook_params *p);
54 extern void discord_create_webhook_params_list_free_v(void **p);
55 extern void discord_create_webhook_params_list_free(struct discord_create_webhook_params **p);
56 extern void discord_create_webhook_params_list_from_json_v(char *str, size_t len, void *p);
57 extern void discord_create_webhook_params_list_from_json(char *str, size_t len, struct discord_create_webhook_params ***p);
58 extern size_t discord_create_webhook_params_list_to_json_v(char *str, size_t len, void *p);
59 extern size_t discord_create_webhook_params_list_to_json(char *str, size_t len, struct discord_create_webhook_params **p);
60 
68  /* specs/discord/webhook.endpoints-params.json:24:20
69  '{ "name": "name", "type":{ "base":"char", "dec":"*" }, "comment":"name of the webhook(1-80) chars" }' */
70  char *name; // name of the webhook(1-80) chars
71 
72  /* specs/discord/webhook.endpoints-params.json:25:20
73  '{ "name": "avatar", "type":{ "base":"char", "dec":"*" }, "inject_if_not":null, "comment":"base64 image for the default webhook avatar" }' */
74  char *avatar; // base64 image for the default webhook avatar
75 
76  /* specs/discord/webhook.endpoints-params.json:26:20
77  '{ "name": "channel_id", "type":{ "base":"char", "dec":"*", "converter":"snowflake" }, "comment":"the new channel id this webhook should be moved to" }' */
78  u64_snowflake_t channel_id; // the new channel id this webhook should be moved to
79 
80  // The following is metadata used to
81  // 1. control which field should be extracted/injected
82  // 2. record which field is presented(defined) in JSON
83  // 3. record which field is null in JSON
85  struct {
86  bool enable_arg_switches;
87  bool enable_record_defined;
88  bool enable_record_null;
89  void *arg_switches[3];
90  void *record_defined[3];
91  void *record_null[3];
92  } __M; // metadata
94 };
95 extern void discord_modify_webhook_params_cleanup_v(void *p);
96 extern void discord_modify_webhook_params_cleanup(struct discord_modify_webhook_params *p);
97 extern void discord_modify_webhook_params_init_v(void *p);
98 extern void discord_modify_webhook_params_init(struct discord_modify_webhook_params *p);
99 extern struct discord_modify_webhook_params * discord_modify_webhook_params_alloc();
100 extern void discord_modify_webhook_params_free_v(void *p);
101 extern void discord_modify_webhook_params_free(struct discord_modify_webhook_params *p);
102 extern void discord_modify_webhook_params_from_json_v(char *json, size_t len, void *p);
103 extern void discord_modify_webhook_params_from_json(char *json, size_t len, struct discord_modify_webhook_params *p);
104 extern size_t discord_modify_webhook_params_to_json_v(char *json, size_t len, void *p);
105 extern size_t discord_modify_webhook_params_to_json(char *json, size_t len, struct discord_modify_webhook_params *p);
106 extern size_t discord_modify_webhook_params_to_query_v(char *json, size_t len, void *p);
107 extern size_t discord_modify_webhook_params_to_query(char *json, size_t len, struct discord_modify_webhook_params *p);
108 extern void discord_modify_webhook_params_list_free_v(void **p);
109 extern void discord_modify_webhook_params_list_free(struct discord_modify_webhook_params **p);
110 extern void discord_modify_webhook_params_list_from_json_v(char *str, size_t len, void *p);
111 extern void discord_modify_webhook_params_list_from_json(char *str, size_t len, struct discord_modify_webhook_params ***p);
112 extern size_t discord_modify_webhook_params_list_to_json_v(char *str, size_t len, void *p);
113 extern size_t discord_modify_webhook_params_list_to_json(char *str, size_t len, struct discord_modify_webhook_params **p);
114 
122  /* specs/discord/webhook.endpoints-params.json:37:20
123  '{ "name": "wait", "type":{ "base":"bool"}, "loc":"query",
124  "comment":" waits for server confirmation of message send before response, and returns the created message body (defaults to false; when false a message that is not saved does not return an error)",
125  "required":"one of content, file, embeds"
126  }' */
127  bool wait; // cannot unescape an ill-formed-string waits for server confirmation of message send before response, and returns the created message body (defaults to false; when false a message that i
128 
129  /* specs/discord/webhook.endpoints-params.json:41:20
130  '{ "name": "content", "type":{ "base":"char", "dec":"*" },
131  "comment":"the message contents (up to 2000 characters)",
132  "required":false
133  }' */
134  char *content; // the message contents (up to 2000 characters)
135 
136  /* specs/discord/webhook.endpoints-params.json:45:20
137  '{ "name": "username", "type":{ "base":"char", "dec":"*" },
138  "comment":"override the default username of the webhook",
139  "required":false
140  }' */
141  char *username; // override the default username of the webhook
142 
143  /* specs/discord/webhook.endpoints-params.json:49:20
144  '{ "name": "avatar_url", "type":{ "base":"char", "dec":"*" },
145  "comment":"override the default avatar of the webhook" }' */
146  char *avatar_url; // override the default avatar of the webhook
147 
148  /* specs/discord/webhook.endpoints-params.json:51:20
149  '{ "name": "tts", "type":{ "base":"bool" },
150  "comment":"true if this is a TTS message",
151  "required":false
152  }' */
153  bool tts; // true if this is a TTS message
154 
155  /* specs/discord/webhook.endpoints-params.json:55:20
156  '{ "name": "file", "type":{ "base":"char", "dec":"*" },
157  "comment":"the contents of the file being sent",
158  "required":"one of content, file, embeds"
159  }' */
160  char *file; // the contents of the file being sent
161 
162  /* specs/discord/webhook.endpoints-params.json:59:20
163  '{ "name": "embeds", "type":{ "base":"struct discord_embed", "dec":"*" },
164  "comment":"embedded rich content",
165  "required":"one of content, file, embeds"
166  }' */
167  struct discord_embed *embeds; // embedded rich content
168 
169  /* specs/discord/webhook.endpoints-params.json:63:20
170  '{ "name": "payload_json", "type":{ "base":"char", "dec":"*" },
171  "comment":"See message create",
172  "required":"multipart/form-data only"
173  }' */
174  char *payload_json; // See message create
175 
176  /* specs/discord/webhook.endpoints-params.json:67:20
177  '{ "name": "allowed_mentions",
178  "type":{ "base":"struct discord_channel_allowed_mentions", "dec":"*" },
179  "comment":"allowed mentions for the message",
180  "required":"false"
181  }' */
182  struct discord_channel_allowed_mentions *allowed_mentions; // allowed mentions for the message
183 
184  // The following is metadata used to
185  // 1. control which field should be extracted/injected
186  // 2. record which field is presented(defined) in JSON
187  // 3. record which field is null in JSON
189  struct {
190  bool enable_arg_switches;
191  bool enable_record_defined;
192  bool enable_record_null;
193  void *arg_switches[9];
194  void *record_defined[9];
195  void *record_null[9];
196  } __M; // metadata
198 };
199 extern void discord_execute_webhook_params_cleanup_v(void *p);
200 extern void discord_execute_webhook_params_cleanup(struct discord_execute_webhook_params *p);
201 extern void discord_execute_webhook_params_init_v(void *p);
202 extern void discord_execute_webhook_params_init(struct discord_execute_webhook_params *p);
203 extern struct discord_execute_webhook_params * discord_execute_webhook_params_alloc();
204 extern void discord_execute_webhook_params_free_v(void *p);
205 extern void discord_execute_webhook_params_free(struct discord_execute_webhook_params *p);
206 extern void discord_execute_webhook_params_from_json_v(char *json, size_t len, void *p);
207 extern void discord_execute_webhook_params_from_json(char *json, size_t len, struct discord_execute_webhook_params *p);
208 extern size_t discord_execute_webhook_params_to_json_v(char *json, size_t len, void *p);
209 extern size_t discord_execute_webhook_params_to_json(char *json, size_t len, struct discord_execute_webhook_params *p);
210 extern size_t discord_execute_webhook_params_to_query_v(char *json, size_t len, void *p);
211 extern size_t discord_execute_webhook_params_to_query(char *json, size_t len, struct discord_execute_webhook_params *p);
212 extern void discord_execute_webhook_params_list_free_v(void **p);
213 extern void discord_execute_webhook_params_list_free(struct discord_execute_webhook_params **p);
214 extern void discord_execute_webhook_params_list_from_json_v(char *str, size_t len, void *p);
215 extern void discord_execute_webhook_params_list_from_json(char *str, size_t len, struct discord_execute_webhook_params ***p);
216 extern size_t discord_execute_webhook_params_list_to_json_v(char *str, size_t len, void *p);
217 extern size_t discord_execute_webhook_params_list_to_json(char *str, size_t len, struct discord_execute_webhook_params **p);
218 
226  /* specs/discord/webhook.endpoints-params.json:81:20
227  '{ "name": "content", "type":{ "base":"char", "dec":"*" }, "comment":"name of the webhook(1-2000) chars" }' */
228  char *content; // name of the webhook(1-2000) chars
229 
230  /* specs/discord/webhook.endpoints-params.json:82:20
231  '{ "name": "embeds", "type":{ "base":"struct discord_embed", "dec":"ntl" }, "comment":"array of up to 10 embeds objects" }' */
232  struct discord_embed **embeds; // array of up to 10 embeds objects
233 
234  /* specs/discord/webhook.endpoints-params.json:83:20
235  '{ "name": "allowed_mentions", "type":{ "base":"struct discord_channel_allowed_mentions", "dec":"*" }, "comment":"allowed mentions for the message" }' */
236  struct discord_channel_allowed_mentions *allowed_mentions; // allowed mentions for the message
237 
238  // The following is metadata used to
239  // 1. control which field should be extracted/injected
240  // 2. record which field is presented(defined) in JSON
241  // 3. record which field is null in JSON
243  struct {
244  bool enable_arg_switches;
245  bool enable_record_defined;
246  bool enable_record_null;
247  void *arg_switches[3];
248  void *record_defined[3];
249  void *record_null[3];
250  } __M; // metadata
252 };
253 extern void discord_edit_webhook_message_params_cleanup_v(void *p);
254 extern void discord_edit_webhook_message_params_cleanup(struct discord_edit_webhook_message_params *p);
255 extern void discord_edit_webhook_message_params_init_v(void *p);
256 extern void discord_edit_webhook_message_params_init(struct discord_edit_webhook_message_params *p);
257 extern struct discord_edit_webhook_message_params * discord_edit_webhook_message_params_alloc();
258 extern void discord_edit_webhook_message_params_free_v(void *p);
259 extern void discord_edit_webhook_message_params_free(struct discord_edit_webhook_message_params *p);
260 extern void discord_edit_webhook_message_params_from_json_v(char *json, size_t len, void *p);
261 extern void discord_edit_webhook_message_params_from_json(char *json, size_t len, struct discord_edit_webhook_message_params *p);
262 extern size_t discord_edit_webhook_message_params_to_json_v(char *json, size_t len, void *p);
263 extern size_t discord_edit_webhook_message_params_to_json(char *json, size_t len, struct discord_edit_webhook_message_params *p);
264 extern size_t discord_edit_webhook_message_params_to_query_v(char *json, size_t len, void *p);
265 extern size_t discord_edit_webhook_message_params_to_query(char *json, size_t len, struct discord_edit_webhook_message_params *p);
266 extern void discord_edit_webhook_message_params_list_free_v(void **p);
267 extern void discord_edit_webhook_message_params_list_free(struct discord_edit_webhook_message_params **p);
268 extern void discord_edit_webhook_message_params_list_from_json_v(char *str, size_t len, void *p);
269 extern void discord_edit_webhook_message_params_list_from_json(char *str, size_t len, struct discord_edit_webhook_message_params ***p);
270 extern size_t discord_edit_webhook_message_params_list_to_json_v(char *str, size_t len, void *p);
271 extern size_t discord_edit_webhook_message_params_list_to_json(char *str, size_t len, struct discord_edit_webhook_message_params **p);
discord_channel_allowed_mentions
Allowed Mentions Structure.
Definition: channel.h:1024
discord_execute_webhook_params
Execute Webhook.
Definition: webhook.endpoints-params.h:121
discord_modify_webhook_params
Modify Webhook.
Definition: webhook.endpoints-params.h:67
discord_create_webhook_params
Create Webhook.
Definition: webhook.endpoints-params.h:17
u64_snowflake_t
uint64_t u64_snowflake_t
snowflake datatype
Definition: discord.h:32
discord_edit_webhook_message_params
Edit Webhook Message.
Definition: webhook.endpoints-params.h:225
discord_embed
Embed Structure.
Definition: channel.h:1082