1use jacquard_common::CowStr;
9use jacquard_derive::IntoStatic;
10use serde::{Serialize, Deserialize};
11#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
14pub struct ReasonAppeal;
15impl core::fmt::Display for ReasonAppeal {
16 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
17 write!(f, "reasonAppeal")
18 }
19}
20
21#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
24pub struct ReasonChildSafetyCsam;
25impl core::fmt::Display for ReasonChildSafetyCsam {
26 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
27 write!(f, "reasonChildSafetyCSAM")
28 }
29}
30
31#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
34pub struct ReasonChildSafetyGroom;
35impl core::fmt::Display for ReasonChildSafetyGroom {
36 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
37 write!(f, "reasonChildSafetyGroom")
38 }
39}
40
41#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
44pub struct ReasonChildSafetyHarassment;
45impl core::fmt::Display for ReasonChildSafetyHarassment {
46 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
47 write!(f, "reasonChildSafetyHarassment")
48 }
49}
50
51#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
54pub struct ReasonChildSafetyOther;
55impl core::fmt::Display for ReasonChildSafetyOther {
56 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
57 write!(f, "reasonChildSafetyOther")
58 }
59}
60
61#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
64pub struct ReasonChildSafetyPrivacy;
65impl core::fmt::Display for ReasonChildSafetyPrivacy {
66 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
67 write!(f, "reasonChildSafetyPrivacy")
68 }
69}
70
71#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
74pub struct ReasonHarassmentDoxxing;
75impl core::fmt::Display for ReasonHarassmentDoxxing {
76 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
77 write!(f, "reasonHarassmentDoxxing")
78 }
79}
80
81#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
84pub struct ReasonHarassmentHateSpeech;
85impl core::fmt::Display for ReasonHarassmentHateSpeech {
86 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
87 write!(f, "reasonHarassmentHateSpeech")
88 }
89}
90
91#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
94pub struct ReasonHarassmentOther;
95impl core::fmt::Display for ReasonHarassmentOther {
96 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
97 write!(f, "reasonHarassmentOther")
98 }
99}
100
101#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
104pub struct ReasonHarassmentTargeted;
105impl core::fmt::Display for ReasonHarassmentTargeted {
106 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
107 write!(f, "reasonHarassmentTargeted")
108 }
109}
110
111#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
114pub struct ReasonHarassmentTroll;
115impl core::fmt::Display for ReasonHarassmentTroll {
116 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
117 write!(f, "reasonHarassmentTroll")
118 }
119}
120
121#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
124pub struct ReasonMisleadingBot;
125impl core::fmt::Display for ReasonMisleadingBot {
126 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
127 write!(f, "reasonMisleadingBot")
128 }
129}
130
131#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
134pub struct ReasonMisleadingElections;
135impl core::fmt::Display for ReasonMisleadingElections {
136 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
137 write!(f, "reasonMisleadingElections")
138 }
139}
140
141#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
144pub struct ReasonMisleadingImpersonation;
145impl core::fmt::Display for ReasonMisleadingImpersonation {
146 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
147 write!(f, "reasonMisleadingImpersonation")
148 }
149}
150
151#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
154pub struct ReasonMisleadingOther;
155impl core::fmt::Display for ReasonMisleadingOther {
156 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
157 write!(f, "reasonMisleadingOther")
158 }
159}
160
161#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
164pub struct ReasonMisleadingScam;
165impl core::fmt::Display for ReasonMisleadingScam {
166 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
167 write!(f, "reasonMisleadingScam")
168 }
169}
170
171#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
174pub struct ReasonMisleadingSpam;
175impl core::fmt::Display for ReasonMisleadingSpam {
176 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
177 write!(f, "reasonMisleadingSpam")
178 }
179}
180
181#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
184pub struct ReasonOther;
185impl core::fmt::Display for ReasonOther {
186 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
187 write!(f, "reasonOther")
188 }
189}
190
191#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
194pub struct ReasonRuleBanEvasion;
195impl core::fmt::Display for ReasonRuleBanEvasion {
196 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
197 write!(f, "reasonRuleBanEvasion")
198 }
199}
200
201#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
204pub struct ReasonRuleOther;
205impl core::fmt::Display for ReasonRuleOther {
206 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
207 write!(f, "reasonRuleOther")
208 }
209}
210
211#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
214pub struct ReasonRuleProhibitedSales;
215impl core::fmt::Display for ReasonRuleProhibitedSales {
216 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
217 write!(f, "reasonRuleProhibitedSales")
218 }
219}
220
221#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
224pub struct ReasonRuleSiteSecurity;
225impl core::fmt::Display for ReasonRuleSiteSecurity {
226 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
227 write!(f, "reasonRuleSiteSecurity")
228 }
229}
230
231#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
234pub struct ReasonSelfHarmContent;
235impl core::fmt::Display for ReasonSelfHarmContent {
236 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
237 write!(f, "reasonSelfHarmContent")
238 }
239}
240
241#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
244pub struct ReasonSelfHarmEd;
245impl core::fmt::Display for ReasonSelfHarmEd {
246 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
247 write!(f, "reasonSelfHarmED")
248 }
249}
250
251#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
254pub struct ReasonSelfHarmOther;
255impl core::fmt::Display for ReasonSelfHarmOther {
256 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
257 write!(f, "reasonSelfHarmOther")
258 }
259}
260
261#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
264pub struct ReasonSelfHarmStunts;
265impl core::fmt::Display for ReasonSelfHarmStunts {
266 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
267 write!(f, "reasonSelfHarmStunts")
268 }
269}
270
271#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
274pub struct ReasonSelfHarmSubstances;
275impl core::fmt::Display for ReasonSelfHarmSubstances {
276 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
277 write!(f, "reasonSelfHarmSubstances")
278 }
279}
280
281#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
284pub struct ReasonSexualAbuseContent;
285impl core::fmt::Display for ReasonSexualAbuseContent {
286 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
287 write!(f, "reasonSexualAbuseContent")
288 }
289}
290
291#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
294pub struct ReasonSexualAnimal;
295impl core::fmt::Display for ReasonSexualAnimal {
296 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
297 write!(f, "reasonSexualAnimal")
298 }
299}
300
301#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
304pub struct ReasonSexualDeepfake;
305impl core::fmt::Display for ReasonSexualDeepfake {
306 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
307 write!(f, "reasonSexualDeepfake")
308 }
309}
310
311#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
314pub struct ReasonSexualNcii;
315impl core::fmt::Display for ReasonSexualNcii {
316 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
317 write!(f, "reasonSexualNCII")
318 }
319}
320
321#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
324pub struct ReasonSexualOther;
325impl core::fmt::Display for ReasonSexualOther {
326 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
327 write!(f, "reasonSexualOther")
328 }
329}
330
331#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
334pub struct ReasonSexualUnlabeled;
335impl core::fmt::Display for ReasonSexualUnlabeled {
336 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
337 write!(f, "reasonSexualUnlabeled")
338 }
339}
340
341
342#[derive(Debug, Clone, PartialEq, Eq, Hash)]
343pub enum ReasonType<'a> {
344 ToolsOzoneReportDefsReasonAppeal,
345 ToolsOzoneReportDefsReasonOther,
346 ToolsOzoneReportDefsReasonViolenceAnimal,
347 ToolsOzoneReportDefsReasonViolenceThreats,
348 ToolsOzoneReportDefsReasonViolenceGraphicContent,
349 ToolsOzoneReportDefsReasonViolenceGlorification,
350 ToolsOzoneReportDefsReasonViolenceExtremistContent,
351 ToolsOzoneReportDefsReasonViolenceTrafficking,
352 ToolsOzoneReportDefsReasonViolenceOther,
353 ToolsOzoneReportDefsReasonSexualAbuseContent,
354 ToolsOzoneReportDefsReasonSexualNcii,
355 ToolsOzoneReportDefsReasonSexualDeepfake,
356 ToolsOzoneReportDefsReasonSexualAnimal,
357 ToolsOzoneReportDefsReasonSexualUnlabeled,
358 ToolsOzoneReportDefsReasonSexualOther,
359 ToolsOzoneReportDefsReasonChildSafetyCsam,
360 ToolsOzoneReportDefsReasonChildSafetyGroom,
361 ToolsOzoneReportDefsReasonChildSafetyPrivacy,
362 ToolsOzoneReportDefsReasonChildSafetyHarassment,
363 ToolsOzoneReportDefsReasonChildSafetyOther,
364 ToolsOzoneReportDefsReasonHarassmentTroll,
365 ToolsOzoneReportDefsReasonHarassmentTargeted,
366 ToolsOzoneReportDefsReasonHarassmentHateSpeech,
367 ToolsOzoneReportDefsReasonHarassmentDoxxing,
368 ToolsOzoneReportDefsReasonHarassmentOther,
369 ToolsOzoneReportDefsReasonMisleadingBot,
370 ToolsOzoneReportDefsReasonMisleadingImpersonation,
371 ToolsOzoneReportDefsReasonMisleadingSpam,
372 ToolsOzoneReportDefsReasonMisleadingScam,
373 ToolsOzoneReportDefsReasonMisleadingElections,
374 ToolsOzoneReportDefsReasonMisleadingOther,
375 ToolsOzoneReportDefsReasonRuleSiteSecurity,
376 ToolsOzoneReportDefsReasonRuleProhibitedSales,
377 ToolsOzoneReportDefsReasonRuleBanEvasion,
378 ToolsOzoneReportDefsReasonRuleOther,
379 ToolsOzoneReportDefsReasonSelfHarmContent,
380 ToolsOzoneReportDefsReasonSelfHarmEd,
381 ToolsOzoneReportDefsReasonSelfHarmStunts,
382 ToolsOzoneReportDefsReasonSelfHarmSubstances,
383 ToolsOzoneReportDefsReasonSelfHarmOther,
384 Other(CowStr<'a>),
385}
386
387impl<'a> ReasonType<'a> {
388 pub fn as_str(&self) -> &str {
389 match self {
390 Self::ToolsOzoneReportDefsReasonAppeal => {
391 "tools.ozone.report.defs#reasonAppeal"
392 }
393 Self::ToolsOzoneReportDefsReasonOther => {
394 "tools.ozone.report.defs#reasonOther"
395 }
396 Self::ToolsOzoneReportDefsReasonViolenceAnimal => {
397 "tools.ozone.report.defs#reasonViolenceAnimal"
398 }
399 Self::ToolsOzoneReportDefsReasonViolenceThreats => {
400 "tools.ozone.report.defs#reasonViolenceThreats"
401 }
402 Self::ToolsOzoneReportDefsReasonViolenceGraphicContent => {
403 "tools.ozone.report.defs#reasonViolenceGraphicContent"
404 }
405 Self::ToolsOzoneReportDefsReasonViolenceGlorification => {
406 "tools.ozone.report.defs#reasonViolenceGlorification"
407 }
408 Self::ToolsOzoneReportDefsReasonViolenceExtremistContent => {
409 "tools.ozone.report.defs#reasonViolenceExtremistContent"
410 }
411 Self::ToolsOzoneReportDefsReasonViolenceTrafficking => {
412 "tools.ozone.report.defs#reasonViolenceTrafficking"
413 }
414 Self::ToolsOzoneReportDefsReasonViolenceOther => {
415 "tools.ozone.report.defs#reasonViolenceOther"
416 }
417 Self::ToolsOzoneReportDefsReasonSexualAbuseContent => {
418 "tools.ozone.report.defs#reasonSexualAbuseContent"
419 }
420 Self::ToolsOzoneReportDefsReasonSexualNcii => {
421 "tools.ozone.report.defs#reasonSexualNCII"
422 }
423 Self::ToolsOzoneReportDefsReasonSexualDeepfake => {
424 "tools.ozone.report.defs#reasonSexualDeepfake"
425 }
426 Self::ToolsOzoneReportDefsReasonSexualAnimal => {
427 "tools.ozone.report.defs#reasonSexualAnimal"
428 }
429 Self::ToolsOzoneReportDefsReasonSexualUnlabeled => {
430 "tools.ozone.report.defs#reasonSexualUnlabeled"
431 }
432 Self::ToolsOzoneReportDefsReasonSexualOther => {
433 "tools.ozone.report.defs#reasonSexualOther"
434 }
435 Self::ToolsOzoneReportDefsReasonChildSafetyCsam => {
436 "tools.ozone.report.defs#reasonChildSafetyCSAM"
437 }
438 Self::ToolsOzoneReportDefsReasonChildSafetyGroom => {
439 "tools.ozone.report.defs#reasonChildSafetyGroom"
440 }
441 Self::ToolsOzoneReportDefsReasonChildSafetyPrivacy => {
442 "tools.ozone.report.defs#reasonChildSafetyPrivacy"
443 }
444 Self::ToolsOzoneReportDefsReasonChildSafetyHarassment => {
445 "tools.ozone.report.defs#reasonChildSafetyHarassment"
446 }
447 Self::ToolsOzoneReportDefsReasonChildSafetyOther => {
448 "tools.ozone.report.defs#reasonChildSafetyOther"
449 }
450 Self::ToolsOzoneReportDefsReasonHarassmentTroll => {
451 "tools.ozone.report.defs#reasonHarassmentTroll"
452 }
453 Self::ToolsOzoneReportDefsReasonHarassmentTargeted => {
454 "tools.ozone.report.defs#reasonHarassmentTargeted"
455 }
456 Self::ToolsOzoneReportDefsReasonHarassmentHateSpeech => {
457 "tools.ozone.report.defs#reasonHarassmentHateSpeech"
458 }
459 Self::ToolsOzoneReportDefsReasonHarassmentDoxxing => {
460 "tools.ozone.report.defs#reasonHarassmentDoxxing"
461 }
462 Self::ToolsOzoneReportDefsReasonHarassmentOther => {
463 "tools.ozone.report.defs#reasonHarassmentOther"
464 }
465 Self::ToolsOzoneReportDefsReasonMisleadingBot => {
466 "tools.ozone.report.defs#reasonMisleadingBot"
467 }
468 Self::ToolsOzoneReportDefsReasonMisleadingImpersonation => {
469 "tools.ozone.report.defs#reasonMisleadingImpersonation"
470 }
471 Self::ToolsOzoneReportDefsReasonMisleadingSpam => {
472 "tools.ozone.report.defs#reasonMisleadingSpam"
473 }
474 Self::ToolsOzoneReportDefsReasonMisleadingScam => {
475 "tools.ozone.report.defs#reasonMisleadingScam"
476 }
477 Self::ToolsOzoneReportDefsReasonMisleadingElections => {
478 "tools.ozone.report.defs#reasonMisleadingElections"
479 }
480 Self::ToolsOzoneReportDefsReasonMisleadingOther => {
481 "tools.ozone.report.defs#reasonMisleadingOther"
482 }
483 Self::ToolsOzoneReportDefsReasonRuleSiteSecurity => {
484 "tools.ozone.report.defs#reasonRuleSiteSecurity"
485 }
486 Self::ToolsOzoneReportDefsReasonRuleProhibitedSales => {
487 "tools.ozone.report.defs#reasonRuleProhibitedSales"
488 }
489 Self::ToolsOzoneReportDefsReasonRuleBanEvasion => {
490 "tools.ozone.report.defs#reasonRuleBanEvasion"
491 }
492 Self::ToolsOzoneReportDefsReasonRuleOther => {
493 "tools.ozone.report.defs#reasonRuleOther"
494 }
495 Self::ToolsOzoneReportDefsReasonSelfHarmContent => {
496 "tools.ozone.report.defs#reasonSelfHarmContent"
497 }
498 Self::ToolsOzoneReportDefsReasonSelfHarmEd => {
499 "tools.ozone.report.defs#reasonSelfHarmED"
500 }
501 Self::ToolsOzoneReportDefsReasonSelfHarmStunts => {
502 "tools.ozone.report.defs#reasonSelfHarmStunts"
503 }
504 Self::ToolsOzoneReportDefsReasonSelfHarmSubstances => {
505 "tools.ozone.report.defs#reasonSelfHarmSubstances"
506 }
507 Self::ToolsOzoneReportDefsReasonSelfHarmOther => {
508 "tools.ozone.report.defs#reasonSelfHarmOther"
509 }
510 Self::Other(s) => s.as_ref(),
511 }
512 }
513}
514
515impl<'a> From<&'a str> for ReasonType<'a> {
516 fn from(s: &'a str) -> Self {
517 match s {
518 "tools.ozone.report.defs#reasonAppeal" => {
519 Self::ToolsOzoneReportDefsReasonAppeal
520 }
521 "tools.ozone.report.defs#reasonOther" => {
522 Self::ToolsOzoneReportDefsReasonOther
523 }
524 "tools.ozone.report.defs#reasonViolenceAnimal" => {
525 Self::ToolsOzoneReportDefsReasonViolenceAnimal
526 }
527 "tools.ozone.report.defs#reasonViolenceThreats" => {
528 Self::ToolsOzoneReportDefsReasonViolenceThreats
529 }
530 "tools.ozone.report.defs#reasonViolenceGraphicContent" => {
531 Self::ToolsOzoneReportDefsReasonViolenceGraphicContent
532 }
533 "tools.ozone.report.defs#reasonViolenceGlorification" => {
534 Self::ToolsOzoneReportDefsReasonViolenceGlorification
535 }
536 "tools.ozone.report.defs#reasonViolenceExtremistContent" => {
537 Self::ToolsOzoneReportDefsReasonViolenceExtremistContent
538 }
539 "tools.ozone.report.defs#reasonViolenceTrafficking" => {
540 Self::ToolsOzoneReportDefsReasonViolenceTrafficking
541 }
542 "tools.ozone.report.defs#reasonViolenceOther" => {
543 Self::ToolsOzoneReportDefsReasonViolenceOther
544 }
545 "tools.ozone.report.defs#reasonSexualAbuseContent" => {
546 Self::ToolsOzoneReportDefsReasonSexualAbuseContent
547 }
548 "tools.ozone.report.defs#reasonSexualNCII" => {
549 Self::ToolsOzoneReportDefsReasonSexualNcii
550 }
551 "tools.ozone.report.defs#reasonSexualDeepfake" => {
552 Self::ToolsOzoneReportDefsReasonSexualDeepfake
553 }
554 "tools.ozone.report.defs#reasonSexualAnimal" => {
555 Self::ToolsOzoneReportDefsReasonSexualAnimal
556 }
557 "tools.ozone.report.defs#reasonSexualUnlabeled" => {
558 Self::ToolsOzoneReportDefsReasonSexualUnlabeled
559 }
560 "tools.ozone.report.defs#reasonSexualOther" => {
561 Self::ToolsOzoneReportDefsReasonSexualOther
562 }
563 "tools.ozone.report.defs#reasonChildSafetyCSAM" => {
564 Self::ToolsOzoneReportDefsReasonChildSafetyCsam
565 }
566 "tools.ozone.report.defs#reasonChildSafetyGroom" => {
567 Self::ToolsOzoneReportDefsReasonChildSafetyGroom
568 }
569 "tools.ozone.report.defs#reasonChildSafetyPrivacy" => {
570 Self::ToolsOzoneReportDefsReasonChildSafetyPrivacy
571 }
572 "tools.ozone.report.defs#reasonChildSafetyHarassment" => {
573 Self::ToolsOzoneReportDefsReasonChildSafetyHarassment
574 }
575 "tools.ozone.report.defs#reasonChildSafetyOther" => {
576 Self::ToolsOzoneReportDefsReasonChildSafetyOther
577 }
578 "tools.ozone.report.defs#reasonHarassmentTroll" => {
579 Self::ToolsOzoneReportDefsReasonHarassmentTroll
580 }
581 "tools.ozone.report.defs#reasonHarassmentTargeted" => {
582 Self::ToolsOzoneReportDefsReasonHarassmentTargeted
583 }
584 "tools.ozone.report.defs#reasonHarassmentHateSpeech" => {
585 Self::ToolsOzoneReportDefsReasonHarassmentHateSpeech
586 }
587 "tools.ozone.report.defs#reasonHarassmentDoxxing" => {
588 Self::ToolsOzoneReportDefsReasonHarassmentDoxxing
589 }
590 "tools.ozone.report.defs#reasonHarassmentOther" => {
591 Self::ToolsOzoneReportDefsReasonHarassmentOther
592 }
593 "tools.ozone.report.defs#reasonMisleadingBot" => {
594 Self::ToolsOzoneReportDefsReasonMisleadingBot
595 }
596 "tools.ozone.report.defs#reasonMisleadingImpersonation" => {
597 Self::ToolsOzoneReportDefsReasonMisleadingImpersonation
598 }
599 "tools.ozone.report.defs#reasonMisleadingSpam" => {
600 Self::ToolsOzoneReportDefsReasonMisleadingSpam
601 }
602 "tools.ozone.report.defs#reasonMisleadingScam" => {
603 Self::ToolsOzoneReportDefsReasonMisleadingScam
604 }
605 "tools.ozone.report.defs#reasonMisleadingElections" => {
606 Self::ToolsOzoneReportDefsReasonMisleadingElections
607 }
608 "tools.ozone.report.defs#reasonMisleadingOther" => {
609 Self::ToolsOzoneReportDefsReasonMisleadingOther
610 }
611 "tools.ozone.report.defs#reasonRuleSiteSecurity" => {
612 Self::ToolsOzoneReportDefsReasonRuleSiteSecurity
613 }
614 "tools.ozone.report.defs#reasonRuleProhibitedSales" => {
615 Self::ToolsOzoneReportDefsReasonRuleProhibitedSales
616 }
617 "tools.ozone.report.defs#reasonRuleBanEvasion" => {
618 Self::ToolsOzoneReportDefsReasonRuleBanEvasion
619 }
620 "tools.ozone.report.defs#reasonRuleOther" => {
621 Self::ToolsOzoneReportDefsReasonRuleOther
622 }
623 "tools.ozone.report.defs#reasonSelfHarmContent" => {
624 Self::ToolsOzoneReportDefsReasonSelfHarmContent
625 }
626 "tools.ozone.report.defs#reasonSelfHarmED" => {
627 Self::ToolsOzoneReportDefsReasonSelfHarmEd
628 }
629 "tools.ozone.report.defs#reasonSelfHarmStunts" => {
630 Self::ToolsOzoneReportDefsReasonSelfHarmStunts
631 }
632 "tools.ozone.report.defs#reasonSelfHarmSubstances" => {
633 Self::ToolsOzoneReportDefsReasonSelfHarmSubstances
634 }
635 "tools.ozone.report.defs#reasonSelfHarmOther" => {
636 Self::ToolsOzoneReportDefsReasonSelfHarmOther
637 }
638 _ => Self::Other(CowStr::from(s)),
639 }
640 }
641}
642
643impl<'a> From<String> for ReasonType<'a> {
644 fn from(s: String) -> Self {
645 match s.as_str() {
646 "tools.ozone.report.defs#reasonAppeal" => {
647 Self::ToolsOzoneReportDefsReasonAppeal
648 }
649 "tools.ozone.report.defs#reasonOther" => {
650 Self::ToolsOzoneReportDefsReasonOther
651 }
652 "tools.ozone.report.defs#reasonViolenceAnimal" => {
653 Self::ToolsOzoneReportDefsReasonViolenceAnimal
654 }
655 "tools.ozone.report.defs#reasonViolenceThreats" => {
656 Self::ToolsOzoneReportDefsReasonViolenceThreats
657 }
658 "tools.ozone.report.defs#reasonViolenceGraphicContent" => {
659 Self::ToolsOzoneReportDefsReasonViolenceGraphicContent
660 }
661 "tools.ozone.report.defs#reasonViolenceGlorification" => {
662 Self::ToolsOzoneReportDefsReasonViolenceGlorification
663 }
664 "tools.ozone.report.defs#reasonViolenceExtremistContent" => {
665 Self::ToolsOzoneReportDefsReasonViolenceExtremistContent
666 }
667 "tools.ozone.report.defs#reasonViolenceTrafficking" => {
668 Self::ToolsOzoneReportDefsReasonViolenceTrafficking
669 }
670 "tools.ozone.report.defs#reasonViolenceOther" => {
671 Self::ToolsOzoneReportDefsReasonViolenceOther
672 }
673 "tools.ozone.report.defs#reasonSexualAbuseContent" => {
674 Self::ToolsOzoneReportDefsReasonSexualAbuseContent
675 }
676 "tools.ozone.report.defs#reasonSexualNCII" => {
677 Self::ToolsOzoneReportDefsReasonSexualNcii
678 }
679 "tools.ozone.report.defs#reasonSexualDeepfake" => {
680 Self::ToolsOzoneReportDefsReasonSexualDeepfake
681 }
682 "tools.ozone.report.defs#reasonSexualAnimal" => {
683 Self::ToolsOzoneReportDefsReasonSexualAnimal
684 }
685 "tools.ozone.report.defs#reasonSexualUnlabeled" => {
686 Self::ToolsOzoneReportDefsReasonSexualUnlabeled
687 }
688 "tools.ozone.report.defs#reasonSexualOther" => {
689 Self::ToolsOzoneReportDefsReasonSexualOther
690 }
691 "tools.ozone.report.defs#reasonChildSafetyCSAM" => {
692 Self::ToolsOzoneReportDefsReasonChildSafetyCsam
693 }
694 "tools.ozone.report.defs#reasonChildSafetyGroom" => {
695 Self::ToolsOzoneReportDefsReasonChildSafetyGroom
696 }
697 "tools.ozone.report.defs#reasonChildSafetyPrivacy" => {
698 Self::ToolsOzoneReportDefsReasonChildSafetyPrivacy
699 }
700 "tools.ozone.report.defs#reasonChildSafetyHarassment" => {
701 Self::ToolsOzoneReportDefsReasonChildSafetyHarassment
702 }
703 "tools.ozone.report.defs#reasonChildSafetyOther" => {
704 Self::ToolsOzoneReportDefsReasonChildSafetyOther
705 }
706 "tools.ozone.report.defs#reasonHarassmentTroll" => {
707 Self::ToolsOzoneReportDefsReasonHarassmentTroll
708 }
709 "tools.ozone.report.defs#reasonHarassmentTargeted" => {
710 Self::ToolsOzoneReportDefsReasonHarassmentTargeted
711 }
712 "tools.ozone.report.defs#reasonHarassmentHateSpeech" => {
713 Self::ToolsOzoneReportDefsReasonHarassmentHateSpeech
714 }
715 "tools.ozone.report.defs#reasonHarassmentDoxxing" => {
716 Self::ToolsOzoneReportDefsReasonHarassmentDoxxing
717 }
718 "tools.ozone.report.defs#reasonHarassmentOther" => {
719 Self::ToolsOzoneReportDefsReasonHarassmentOther
720 }
721 "tools.ozone.report.defs#reasonMisleadingBot" => {
722 Self::ToolsOzoneReportDefsReasonMisleadingBot
723 }
724 "tools.ozone.report.defs#reasonMisleadingImpersonation" => {
725 Self::ToolsOzoneReportDefsReasonMisleadingImpersonation
726 }
727 "tools.ozone.report.defs#reasonMisleadingSpam" => {
728 Self::ToolsOzoneReportDefsReasonMisleadingSpam
729 }
730 "tools.ozone.report.defs#reasonMisleadingScam" => {
731 Self::ToolsOzoneReportDefsReasonMisleadingScam
732 }
733 "tools.ozone.report.defs#reasonMisleadingElections" => {
734 Self::ToolsOzoneReportDefsReasonMisleadingElections
735 }
736 "tools.ozone.report.defs#reasonMisleadingOther" => {
737 Self::ToolsOzoneReportDefsReasonMisleadingOther
738 }
739 "tools.ozone.report.defs#reasonRuleSiteSecurity" => {
740 Self::ToolsOzoneReportDefsReasonRuleSiteSecurity
741 }
742 "tools.ozone.report.defs#reasonRuleProhibitedSales" => {
743 Self::ToolsOzoneReportDefsReasonRuleProhibitedSales
744 }
745 "tools.ozone.report.defs#reasonRuleBanEvasion" => {
746 Self::ToolsOzoneReportDefsReasonRuleBanEvasion
747 }
748 "tools.ozone.report.defs#reasonRuleOther" => {
749 Self::ToolsOzoneReportDefsReasonRuleOther
750 }
751 "tools.ozone.report.defs#reasonSelfHarmContent" => {
752 Self::ToolsOzoneReportDefsReasonSelfHarmContent
753 }
754 "tools.ozone.report.defs#reasonSelfHarmED" => {
755 Self::ToolsOzoneReportDefsReasonSelfHarmEd
756 }
757 "tools.ozone.report.defs#reasonSelfHarmStunts" => {
758 Self::ToolsOzoneReportDefsReasonSelfHarmStunts
759 }
760 "tools.ozone.report.defs#reasonSelfHarmSubstances" => {
761 Self::ToolsOzoneReportDefsReasonSelfHarmSubstances
762 }
763 "tools.ozone.report.defs#reasonSelfHarmOther" => {
764 Self::ToolsOzoneReportDefsReasonSelfHarmOther
765 }
766 _ => Self::Other(CowStr::from(s)),
767 }
768 }
769}
770
771impl<'a> AsRef<str> for ReasonType<'a> {
772 fn as_ref(&self) -> &str {
773 self.as_str()
774 }
775}
776
777impl<'a> core::fmt::Display for ReasonType<'a> {
778 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
779 write!(f, "{}", self.as_str())
780 }
781}
782
783impl<'a> serde::Serialize for ReasonType<'a> {
784 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
785 where
786 S: serde::Serializer,
787 {
788 serializer.serialize_str(self.as_str())
789 }
790}
791
792impl<'de, 'a> serde::Deserialize<'de> for ReasonType<'a>
793where
794 'de: 'a,
795{
796 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
797 where
798 D: serde::Deserializer<'de>,
799 {
800 let s = <&'de str>::deserialize(deserializer)?;
801 Ok(Self::from(s))
802 }
803}
804
805impl jacquard_common::IntoStatic for ReasonType<'_> {
806 type Output = ReasonType<'static>;
807 fn into_static(self) -> Self::Output {
808 match self {
809 ReasonType::ToolsOzoneReportDefsReasonAppeal => {
810 ReasonType::ToolsOzoneReportDefsReasonAppeal
811 }
812 ReasonType::ToolsOzoneReportDefsReasonOther => {
813 ReasonType::ToolsOzoneReportDefsReasonOther
814 }
815 ReasonType::ToolsOzoneReportDefsReasonViolenceAnimal => {
816 ReasonType::ToolsOzoneReportDefsReasonViolenceAnimal
817 }
818 ReasonType::ToolsOzoneReportDefsReasonViolenceThreats => {
819 ReasonType::ToolsOzoneReportDefsReasonViolenceThreats
820 }
821 ReasonType::ToolsOzoneReportDefsReasonViolenceGraphicContent => {
822 ReasonType::ToolsOzoneReportDefsReasonViolenceGraphicContent
823 }
824 ReasonType::ToolsOzoneReportDefsReasonViolenceGlorification => {
825 ReasonType::ToolsOzoneReportDefsReasonViolenceGlorification
826 }
827 ReasonType::ToolsOzoneReportDefsReasonViolenceExtremistContent => {
828 ReasonType::ToolsOzoneReportDefsReasonViolenceExtremistContent
829 }
830 ReasonType::ToolsOzoneReportDefsReasonViolenceTrafficking => {
831 ReasonType::ToolsOzoneReportDefsReasonViolenceTrafficking
832 }
833 ReasonType::ToolsOzoneReportDefsReasonViolenceOther => {
834 ReasonType::ToolsOzoneReportDefsReasonViolenceOther
835 }
836 ReasonType::ToolsOzoneReportDefsReasonSexualAbuseContent => {
837 ReasonType::ToolsOzoneReportDefsReasonSexualAbuseContent
838 }
839 ReasonType::ToolsOzoneReportDefsReasonSexualNcii => {
840 ReasonType::ToolsOzoneReportDefsReasonSexualNcii
841 }
842 ReasonType::ToolsOzoneReportDefsReasonSexualDeepfake => {
843 ReasonType::ToolsOzoneReportDefsReasonSexualDeepfake
844 }
845 ReasonType::ToolsOzoneReportDefsReasonSexualAnimal => {
846 ReasonType::ToolsOzoneReportDefsReasonSexualAnimal
847 }
848 ReasonType::ToolsOzoneReportDefsReasonSexualUnlabeled => {
849 ReasonType::ToolsOzoneReportDefsReasonSexualUnlabeled
850 }
851 ReasonType::ToolsOzoneReportDefsReasonSexualOther => {
852 ReasonType::ToolsOzoneReportDefsReasonSexualOther
853 }
854 ReasonType::ToolsOzoneReportDefsReasonChildSafetyCsam => {
855 ReasonType::ToolsOzoneReportDefsReasonChildSafetyCsam
856 }
857 ReasonType::ToolsOzoneReportDefsReasonChildSafetyGroom => {
858 ReasonType::ToolsOzoneReportDefsReasonChildSafetyGroom
859 }
860 ReasonType::ToolsOzoneReportDefsReasonChildSafetyPrivacy => {
861 ReasonType::ToolsOzoneReportDefsReasonChildSafetyPrivacy
862 }
863 ReasonType::ToolsOzoneReportDefsReasonChildSafetyHarassment => {
864 ReasonType::ToolsOzoneReportDefsReasonChildSafetyHarassment
865 }
866 ReasonType::ToolsOzoneReportDefsReasonChildSafetyOther => {
867 ReasonType::ToolsOzoneReportDefsReasonChildSafetyOther
868 }
869 ReasonType::ToolsOzoneReportDefsReasonHarassmentTroll => {
870 ReasonType::ToolsOzoneReportDefsReasonHarassmentTroll
871 }
872 ReasonType::ToolsOzoneReportDefsReasonHarassmentTargeted => {
873 ReasonType::ToolsOzoneReportDefsReasonHarassmentTargeted
874 }
875 ReasonType::ToolsOzoneReportDefsReasonHarassmentHateSpeech => {
876 ReasonType::ToolsOzoneReportDefsReasonHarassmentHateSpeech
877 }
878 ReasonType::ToolsOzoneReportDefsReasonHarassmentDoxxing => {
879 ReasonType::ToolsOzoneReportDefsReasonHarassmentDoxxing
880 }
881 ReasonType::ToolsOzoneReportDefsReasonHarassmentOther => {
882 ReasonType::ToolsOzoneReportDefsReasonHarassmentOther
883 }
884 ReasonType::ToolsOzoneReportDefsReasonMisleadingBot => {
885 ReasonType::ToolsOzoneReportDefsReasonMisleadingBot
886 }
887 ReasonType::ToolsOzoneReportDefsReasonMisleadingImpersonation => {
888 ReasonType::ToolsOzoneReportDefsReasonMisleadingImpersonation
889 }
890 ReasonType::ToolsOzoneReportDefsReasonMisleadingSpam => {
891 ReasonType::ToolsOzoneReportDefsReasonMisleadingSpam
892 }
893 ReasonType::ToolsOzoneReportDefsReasonMisleadingScam => {
894 ReasonType::ToolsOzoneReportDefsReasonMisleadingScam
895 }
896 ReasonType::ToolsOzoneReportDefsReasonMisleadingElections => {
897 ReasonType::ToolsOzoneReportDefsReasonMisleadingElections
898 }
899 ReasonType::ToolsOzoneReportDefsReasonMisleadingOther => {
900 ReasonType::ToolsOzoneReportDefsReasonMisleadingOther
901 }
902 ReasonType::ToolsOzoneReportDefsReasonRuleSiteSecurity => {
903 ReasonType::ToolsOzoneReportDefsReasonRuleSiteSecurity
904 }
905 ReasonType::ToolsOzoneReportDefsReasonRuleProhibitedSales => {
906 ReasonType::ToolsOzoneReportDefsReasonRuleProhibitedSales
907 }
908 ReasonType::ToolsOzoneReportDefsReasonRuleBanEvasion => {
909 ReasonType::ToolsOzoneReportDefsReasonRuleBanEvasion
910 }
911 ReasonType::ToolsOzoneReportDefsReasonRuleOther => {
912 ReasonType::ToolsOzoneReportDefsReasonRuleOther
913 }
914 ReasonType::ToolsOzoneReportDefsReasonSelfHarmContent => {
915 ReasonType::ToolsOzoneReportDefsReasonSelfHarmContent
916 }
917 ReasonType::ToolsOzoneReportDefsReasonSelfHarmEd => {
918 ReasonType::ToolsOzoneReportDefsReasonSelfHarmEd
919 }
920 ReasonType::ToolsOzoneReportDefsReasonSelfHarmStunts => {
921 ReasonType::ToolsOzoneReportDefsReasonSelfHarmStunts
922 }
923 ReasonType::ToolsOzoneReportDefsReasonSelfHarmSubstances => {
924 ReasonType::ToolsOzoneReportDefsReasonSelfHarmSubstances
925 }
926 ReasonType::ToolsOzoneReportDefsReasonSelfHarmOther => {
927 ReasonType::ToolsOzoneReportDefsReasonSelfHarmOther
928 }
929 ReasonType::Other(v) => ReasonType::Other(v.into_static()),
930 }
931 }
932}
933
934#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
937pub struct ReasonViolenceAnimal;
938impl core::fmt::Display for ReasonViolenceAnimal {
939 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
940 write!(f, "reasonViolenceAnimal")
941 }
942}
943
944#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
947pub struct ReasonViolenceExtremistContent;
948impl core::fmt::Display for ReasonViolenceExtremistContent {
949 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
950 write!(f, "reasonViolenceExtremistContent")
951 }
952}
953
954#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
957pub struct ReasonViolenceGlorification;
958impl core::fmt::Display for ReasonViolenceGlorification {
959 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
960 write!(f, "reasonViolenceGlorification")
961 }
962}
963
964#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
967pub struct ReasonViolenceGraphicContent;
968impl core::fmt::Display for ReasonViolenceGraphicContent {
969 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
970 write!(f, "reasonViolenceGraphicContent")
971 }
972}
973
974#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
977pub struct ReasonViolenceOther;
978impl core::fmt::Display for ReasonViolenceOther {
979 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
980 write!(f, "reasonViolenceOther")
981 }
982}
983
984#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
987pub struct ReasonViolenceThreats;
988impl core::fmt::Display for ReasonViolenceThreats {
989 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
990 write!(f, "reasonViolenceThreats")
991 }
992}
993
994#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
997pub struct ReasonViolenceTrafficking;
998impl core::fmt::Display for ReasonViolenceTrafficking {
999 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1000 write!(f, "reasonViolenceTrafficking")
1001 }
1002}