Skip to main content

jacquard_api/tools_ozone/moderation/
query_statuses.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: tools.ozone.moderation.queryStatuses
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[allow(unused_imports)]
9use alloc::collections::BTreeMap;
10
11#[allow(unused_imports)]
12use core::marker::PhantomData;
13use jacquard_common::CowStr;
14use jacquard_common::types::string::{Did, Nsid, Datetime, UriValue};
15use jacquard_derive::{IntoStatic, lexicon};
16use serde::{Serialize, Deserialize};
17use crate::tools_ozone::moderation::SubjectStatusView;
18
19#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
20#[serde(rename_all = "camelCase")]
21pub struct QueryStatuses<'a> {
22    #[serde(skip_serializing_if = "Option::is_none")]
23    #[serde(borrow)]
24    pub age_assurance_state: Option<CowStr<'a>>,
25    #[serde(skip_serializing_if = "Option::is_none")]
26    pub appealed: Option<bool>,
27    #[serde(skip_serializing_if = "Option::is_none")]
28    #[serde(borrow)]
29    pub collections: Option<Vec<Nsid<'a>>>,
30    #[serde(skip_serializing_if = "Option::is_none")]
31    #[serde(borrow)]
32    pub comment: Option<CowStr<'a>>,
33    #[serde(skip_serializing_if = "Option::is_none")]
34    #[serde(borrow)]
35    pub cursor: Option<CowStr<'a>>,
36    #[serde(skip_serializing_if = "Option::is_none")]
37    #[serde(borrow)]
38    pub exclude_tags: Option<Vec<CowStr<'a>>>,
39    #[serde(skip_serializing_if = "Option::is_none")]
40    pub hosting_deleted_after: Option<Datetime>,
41    #[serde(skip_serializing_if = "Option::is_none")]
42    pub hosting_deleted_before: Option<Datetime>,
43    #[serde(skip_serializing_if = "Option::is_none")]
44    #[serde(borrow)]
45    pub hosting_statuses: Option<Vec<CowStr<'a>>>,
46    #[serde(skip_serializing_if = "Option::is_none")]
47    pub hosting_updated_after: Option<Datetime>,
48    #[serde(skip_serializing_if = "Option::is_none")]
49    pub hosting_updated_before: Option<Datetime>,
50    #[serde(skip_serializing_if = "Option::is_none")]
51    #[serde(borrow)]
52    pub ignore_subjects: Option<Vec<UriValue<'a>>>,
53    #[serde(skip_serializing_if = "Option::is_none")]
54    pub include_all_user_records: Option<bool>,
55    #[serde(skip_serializing_if = "Option::is_none")]
56    pub include_muted: Option<bool>,
57    #[serde(skip_serializing_if = "Option::is_none")]
58    #[serde(borrow)]
59    pub last_reviewed_by: Option<Did<'a>>,
60    ///Defaults to `50`. Min: 1. Max: 100.
61    #[serde(default = "_default_limit")]
62    #[serde(skip_serializing_if = "Option::is_none")]
63    pub limit: Option<i64>,
64    #[serde(skip_serializing_if = "Option::is_none")]
65    pub min_account_suspend_count: Option<i64>,
66    ///(min: 0, max: 100)
67    #[serde(skip_serializing_if = "Option::is_none")]
68    pub min_priority_score: Option<i64>,
69    #[serde(skip_serializing_if = "Option::is_none")]
70    pub min_reported_records_count: Option<i64>,
71    ///(min: 1)
72    #[serde(skip_serializing_if = "Option::is_none")]
73    pub min_strike_count: Option<i64>,
74    #[serde(skip_serializing_if = "Option::is_none")]
75    pub min_takendown_records_count: Option<i64>,
76    #[serde(skip_serializing_if = "Option::is_none")]
77    pub only_muted: Option<bool>,
78    #[serde(skip_serializing_if = "Option::is_none")]
79    pub queue_count: Option<i64>,
80    #[serde(skip_serializing_if = "Option::is_none")]
81    pub queue_index: Option<i64>,
82    #[serde(skip_serializing_if = "Option::is_none")]
83    #[serde(borrow)]
84    pub queue_seed: Option<CowStr<'a>>,
85    #[serde(skip_serializing_if = "Option::is_none")]
86    pub reported_after: Option<Datetime>,
87    #[serde(skip_serializing_if = "Option::is_none")]
88    pub reported_before: Option<Datetime>,
89    #[serde(skip_serializing_if = "Option::is_none")]
90    #[serde(borrow)]
91    pub review_state: Option<CowStr<'a>>,
92    #[serde(skip_serializing_if = "Option::is_none")]
93    pub reviewed_after: Option<Datetime>,
94    #[serde(skip_serializing_if = "Option::is_none")]
95    pub reviewed_before: Option<Datetime>,
96    ///Defaults to `"desc"`.
97    #[serde(default = "_default_sort_direction")]
98    #[serde(skip_serializing_if = "Option::is_none")]
99    #[serde(borrow)]
100    pub sort_direction: Option<CowStr<'a>>,
101    ///Defaults to `"lastReportedAt"`.
102    #[serde(default = "_default_sort_field")]
103    #[serde(skip_serializing_if = "Option::is_none")]
104    #[serde(borrow)]
105    pub sort_field: Option<CowStr<'a>>,
106    #[serde(skip_serializing_if = "Option::is_none")]
107    #[serde(borrow)]
108    pub subject: Option<UriValue<'a>>,
109    #[serde(skip_serializing_if = "Option::is_none")]
110    #[serde(borrow)]
111    pub subject_type: Option<CowStr<'a>>,
112    #[serde(skip_serializing_if = "Option::is_none")]
113    #[serde(borrow)]
114    pub tags: Option<Vec<CowStr<'a>>>,
115    #[serde(skip_serializing_if = "Option::is_none")]
116    pub takendown: Option<bool>,
117}
118
119
120#[lexicon]
121#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
122#[serde(rename_all = "camelCase")]
123pub struct QueryStatusesOutput<'a> {
124    #[serde(skip_serializing_if = "Option::is_none")]
125    #[serde(borrow)]
126    pub cursor: Option<CowStr<'a>>,
127    #[serde(borrow)]
128    pub subject_statuses: Vec<SubjectStatusView<'a>>,
129}
130
131/// Response type for tools.ozone.moderation.queryStatuses
132pub struct QueryStatusesResponse;
133impl jacquard_common::xrpc::XrpcResp for QueryStatusesResponse {
134    const NSID: &'static str = "tools.ozone.moderation.queryStatuses";
135    const ENCODING: &'static str = "application/json";
136    type Output<'de> = QueryStatusesOutput<'de>;
137    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
138}
139
140impl<'a> jacquard_common::xrpc::XrpcRequest for QueryStatuses<'a> {
141    const NSID: &'static str = "tools.ozone.moderation.queryStatuses";
142    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
143    type Response = QueryStatusesResponse;
144}
145
146/// Endpoint type for tools.ozone.moderation.queryStatuses
147pub struct QueryStatusesRequest;
148impl jacquard_common::xrpc::XrpcEndpoint for QueryStatusesRequest {
149    const PATH: &'static str = "/xrpc/tools.ozone.moderation.queryStatuses";
150    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
151    type Request<'de> = QueryStatuses<'de>;
152    type Response = QueryStatusesResponse;
153}
154
155fn _default_limit() -> Option<i64> {
156    Some(50i64)
157}
158
159fn _default_sort_direction() -> Option<CowStr<'static>> {
160    Some(CowStr::from("desc"))
161}
162
163fn _default_sort_field() -> Option<CowStr<'static>> {
164    Some(CowStr::from("lastReportedAt"))
165}
166
167pub mod query_statuses_state {
168
169    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
170    #[allow(unused)]
171    use ::core::marker::PhantomData;
172    mod sealed {
173        pub trait Sealed {}
174    }
175    /// State trait tracking which required fields have been set
176    pub trait State: sealed::Sealed {}
177    /// Empty state - all required fields are unset
178    pub struct Empty(());
179    impl sealed::Sealed for Empty {}
180    impl State for Empty {}
181    /// Marker types for field names
182    #[allow(non_camel_case_types)]
183    pub mod members {}
184}
185
186/// Builder for constructing an instance of this type
187pub struct QueryStatusesBuilder<'a, S: query_statuses_state::State> {
188    _state: PhantomData<fn() -> S>,
189    _fields: (
190        Option<CowStr<'a>>,
191        Option<bool>,
192        Option<Vec<Nsid<'a>>>,
193        Option<CowStr<'a>>,
194        Option<CowStr<'a>>,
195        Option<Vec<CowStr<'a>>>,
196        Option<Datetime>,
197        Option<Datetime>,
198        Option<Vec<CowStr<'a>>>,
199        Option<Datetime>,
200        Option<Datetime>,
201        Option<Vec<UriValue<'a>>>,
202        Option<bool>,
203        Option<bool>,
204        Option<Did<'a>>,
205        Option<i64>,
206        Option<i64>,
207        Option<i64>,
208        Option<i64>,
209        Option<i64>,
210        Option<i64>,
211        Option<bool>,
212        Option<i64>,
213        Option<i64>,
214        Option<CowStr<'a>>,
215        Option<Datetime>,
216        Option<Datetime>,
217        Option<CowStr<'a>>,
218        Option<Datetime>,
219        Option<Datetime>,
220        Option<CowStr<'a>>,
221        Option<CowStr<'a>>,
222        Option<UriValue<'a>>,
223        Option<CowStr<'a>>,
224        Option<Vec<CowStr<'a>>>,
225        Option<bool>,
226    ),
227    _lifetime: PhantomData<&'a ()>,
228}
229
230impl<'a> QueryStatuses<'a> {
231    /// Create a new builder for this type
232    pub fn new() -> QueryStatusesBuilder<'a, query_statuses_state::Empty> {
233        QueryStatusesBuilder::new()
234    }
235}
236
237impl<'a> QueryStatusesBuilder<'a, query_statuses_state::Empty> {
238    /// Create a new builder with all fields unset
239    pub fn new() -> Self {
240        QueryStatusesBuilder {
241            _state: PhantomData,
242            _fields: (
243                None,
244                None,
245                None,
246                None,
247                None,
248                None,
249                None,
250                None,
251                None,
252                None,
253                None,
254                None,
255                None,
256                None,
257                None,
258                None,
259                None,
260                None,
261                None,
262                None,
263                None,
264                None,
265                None,
266                None,
267                None,
268                None,
269                None,
270                None,
271                None,
272                None,
273                None,
274                None,
275                None,
276                None,
277                None,
278                None,
279            ),
280            _lifetime: PhantomData,
281        }
282    }
283}
284
285impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
286    /// Set the `ageAssuranceState` field (optional)
287    pub fn age_assurance_state(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
288        self._fields.0 = value.into();
289        self
290    }
291    /// Set the `ageAssuranceState` field to an Option value (optional)
292    pub fn maybe_age_assurance_state(mut self, value: Option<CowStr<'a>>) -> Self {
293        self._fields.0 = value;
294        self
295    }
296}
297
298impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
299    /// Set the `appealed` field (optional)
300    pub fn appealed(mut self, value: impl Into<Option<bool>>) -> Self {
301        self._fields.1 = value.into();
302        self
303    }
304    /// Set the `appealed` field to an Option value (optional)
305    pub fn maybe_appealed(mut self, value: Option<bool>) -> Self {
306        self._fields.1 = value;
307        self
308    }
309}
310
311impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
312    /// Set the `collections` field (optional)
313    pub fn collections(mut self, value: impl Into<Option<Vec<Nsid<'a>>>>) -> Self {
314        self._fields.2 = value.into();
315        self
316    }
317    /// Set the `collections` field to an Option value (optional)
318    pub fn maybe_collections(mut self, value: Option<Vec<Nsid<'a>>>) -> Self {
319        self._fields.2 = value;
320        self
321    }
322}
323
324impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
325    /// Set the `comment` field (optional)
326    pub fn comment(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
327        self._fields.3 = value.into();
328        self
329    }
330    /// Set the `comment` field to an Option value (optional)
331    pub fn maybe_comment(mut self, value: Option<CowStr<'a>>) -> Self {
332        self._fields.3 = value;
333        self
334    }
335}
336
337impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
338    /// Set the `cursor` field (optional)
339    pub fn cursor(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
340        self._fields.4 = value.into();
341        self
342    }
343    /// Set the `cursor` field to an Option value (optional)
344    pub fn maybe_cursor(mut self, value: Option<CowStr<'a>>) -> Self {
345        self._fields.4 = value;
346        self
347    }
348}
349
350impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
351    /// Set the `excludeTags` field (optional)
352    pub fn exclude_tags(mut self, value: impl Into<Option<Vec<CowStr<'a>>>>) -> Self {
353        self._fields.5 = value.into();
354        self
355    }
356    /// Set the `excludeTags` field to an Option value (optional)
357    pub fn maybe_exclude_tags(mut self, value: Option<Vec<CowStr<'a>>>) -> Self {
358        self._fields.5 = value;
359        self
360    }
361}
362
363impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
364    /// Set the `hostingDeletedAfter` field (optional)
365    pub fn hosting_deleted_after(mut self, value: impl Into<Option<Datetime>>) -> Self {
366        self._fields.6 = value.into();
367        self
368    }
369    /// Set the `hostingDeletedAfter` field to an Option value (optional)
370    pub fn maybe_hosting_deleted_after(mut self, value: Option<Datetime>) -> Self {
371        self._fields.6 = value;
372        self
373    }
374}
375
376impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
377    /// Set the `hostingDeletedBefore` field (optional)
378    pub fn hosting_deleted_before(mut self, value: impl Into<Option<Datetime>>) -> Self {
379        self._fields.7 = value.into();
380        self
381    }
382    /// Set the `hostingDeletedBefore` field to an Option value (optional)
383    pub fn maybe_hosting_deleted_before(mut self, value: Option<Datetime>) -> Self {
384        self._fields.7 = value;
385        self
386    }
387}
388
389impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
390    /// Set the `hostingStatuses` field (optional)
391    pub fn hosting_statuses(
392        mut self,
393        value: impl Into<Option<Vec<CowStr<'a>>>>,
394    ) -> Self {
395        self._fields.8 = value.into();
396        self
397    }
398    /// Set the `hostingStatuses` field to an Option value (optional)
399    pub fn maybe_hosting_statuses(mut self, value: Option<Vec<CowStr<'a>>>) -> Self {
400        self._fields.8 = value;
401        self
402    }
403}
404
405impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
406    /// Set the `hostingUpdatedAfter` field (optional)
407    pub fn hosting_updated_after(mut self, value: impl Into<Option<Datetime>>) -> Self {
408        self._fields.9 = value.into();
409        self
410    }
411    /// Set the `hostingUpdatedAfter` field to an Option value (optional)
412    pub fn maybe_hosting_updated_after(mut self, value: Option<Datetime>) -> Self {
413        self._fields.9 = value;
414        self
415    }
416}
417
418impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
419    /// Set the `hostingUpdatedBefore` field (optional)
420    pub fn hosting_updated_before(mut self, value: impl Into<Option<Datetime>>) -> Self {
421        self._fields.10 = value.into();
422        self
423    }
424    /// Set the `hostingUpdatedBefore` field to an Option value (optional)
425    pub fn maybe_hosting_updated_before(mut self, value: Option<Datetime>) -> Self {
426        self._fields.10 = value;
427        self
428    }
429}
430
431impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
432    /// Set the `ignoreSubjects` field (optional)
433    pub fn ignore_subjects(
434        mut self,
435        value: impl Into<Option<Vec<UriValue<'a>>>>,
436    ) -> Self {
437        self._fields.11 = value.into();
438        self
439    }
440    /// Set the `ignoreSubjects` field to an Option value (optional)
441    pub fn maybe_ignore_subjects(mut self, value: Option<Vec<UriValue<'a>>>) -> Self {
442        self._fields.11 = value;
443        self
444    }
445}
446
447impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
448    /// Set the `includeAllUserRecords` field (optional)
449    pub fn include_all_user_records(mut self, value: impl Into<Option<bool>>) -> Self {
450        self._fields.12 = value.into();
451        self
452    }
453    /// Set the `includeAllUserRecords` field to an Option value (optional)
454    pub fn maybe_include_all_user_records(mut self, value: Option<bool>) -> Self {
455        self._fields.12 = value;
456        self
457    }
458}
459
460impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
461    /// Set the `includeMuted` field (optional)
462    pub fn include_muted(mut self, value: impl Into<Option<bool>>) -> Self {
463        self._fields.13 = value.into();
464        self
465    }
466    /// Set the `includeMuted` field to an Option value (optional)
467    pub fn maybe_include_muted(mut self, value: Option<bool>) -> Self {
468        self._fields.13 = value;
469        self
470    }
471}
472
473impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
474    /// Set the `lastReviewedBy` field (optional)
475    pub fn last_reviewed_by(mut self, value: impl Into<Option<Did<'a>>>) -> Self {
476        self._fields.14 = value.into();
477        self
478    }
479    /// Set the `lastReviewedBy` field to an Option value (optional)
480    pub fn maybe_last_reviewed_by(mut self, value: Option<Did<'a>>) -> Self {
481        self._fields.14 = value;
482        self
483    }
484}
485
486impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
487    /// Set the `limit` field (optional)
488    pub fn limit(mut self, value: impl Into<Option<i64>>) -> Self {
489        self._fields.15 = value.into();
490        self
491    }
492    /// Set the `limit` field to an Option value (optional)
493    pub fn maybe_limit(mut self, value: Option<i64>) -> Self {
494        self._fields.15 = value;
495        self
496    }
497}
498
499impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
500    /// Set the `minAccountSuspendCount` field (optional)
501    pub fn min_account_suspend_count(mut self, value: impl Into<Option<i64>>) -> Self {
502        self._fields.16 = value.into();
503        self
504    }
505    /// Set the `minAccountSuspendCount` field to an Option value (optional)
506    pub fn maybe_min_account_suspend_count(mut self, value: Option<i64>) -> Self {
507        self._fields.16 = value;
508        self
509    }
510}
511
512impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
513    /// Set the `minPriorityScore` field (optional)
514    pub fn min_priority_score(mut self, value: impl Into<Option<i64>>) -> Self {
515        self._fields.17 = value.into();
516        self
517    }
518    /// Set the `minPriorityScore` field to an Option value (optional)
519    pub fn maybe_min_priority_score(mut self, value: Option<i64>) -> Self {
520        self._fields.17 = value;
521        self
522    }
523}
524
525impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
526    /// Set the `minReportedRecordsCount` field (optional)
527    pub fn min_reported_records_count(mut self, value: impl Into<Option<i64>>) -> Self {
528        self._fields.18 = value.into();
529        self
530    }
531    /// Set the `minReportedRecordsCount` field to an Option value (optional)
532    pub fn maybe_min_reported_records_count(mut self, value: Option<i64>) -> Self {
533        self._fields.18 = value;
534        self
535    }
536}
537
538impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
539    /// Set the `minStrikeCount` field (optional)
540    pub fn min_strike_count(mut self, value: impl Into<Option<i64>>) -> Self {
541        self._fields.19 = value.into();
542        self
543    }
544    /// Set the `minStrikeCount` field to an Option value (optional)
545    pub fn maybe_min_strike_count(mut self, value: Option<i64>) -> Self {
546        self._fields.19 = value;
547        self
548    }
549}
550
551impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
552    /// Set the `minTakendownRecordsCount` field (optional)
553    pub fn min_takendown_records_count(mut self, value: impl Into<Option<i64>>) -> Self {
554        self._fields.20 = value.into();
555        self
556    }
557    /// Set the `minTakendownRecordsCount` field to an Option value (optional)
558    pub fn maybe_min_takendown_records_count(mut self, value: Option<i64>) -> Self {
559        self._fields.20 = value;
560        self
561    }
562}
563
564impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
565    /// Set the `onlyMuted` field (optional)
566    pub fn only_muted(mut self, value: impl Into<Option<bool>>) -> Self {
567        self._fields.21 = value.into();
568        self
569    }
570    /// Set the `onlyMuted` field to an Option value (optional)
571    pub fn maybe_only_muted(mut self, value: Option<bool>) -> Self {
572        self._fields.21 = value;
573        self
574    }
575}
576
577impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
578    /// Set the `queueCount` field (optional)
579    pub fn queue_count(mut self, value: impl Into<Option<i64>>) -> Self {
580        self._fields.22 = value.into();
581        self
582    }
583    /// Set the `queueCount` field to an Option value (optional)
584    pub fn maybe_queue_count(mut self, value: Option<i64>) -> Self {
585        self._fields.22 = value;
586        self
587    }
588}
589
590impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
591    /// Set the `queueIndex` field (optional)
592    pub fn queue_index(mut self, value: impl Into<Option<i64>>) -> Self {
593        self._fields.23 = value.into();
594        self
595    }
596    /// Set the `queueIndex` field to an Option value (optional)
597    pub fn maybe_queue_index(mut self, value: Option<i64>) -> Self {
598        self._fields.23 = value;
599        self
600    }
601}
602
603impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
604    /// Set the `queueSeed` field (optional)
605    pub fn queue_seed(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
606        self._fields.24 = value.into();
607        self
608    }
609    /// Set the `queueSeed` field to an Option value (optional)
610    pub fn maybe_queue_seed(mut self, value: Option<CowStr<'a>>) -> Self {
611        self._fields.24 = value;
612        self
613    }
614}
615
616impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
617    /// Set the `reportedAfter` field (optional)
618    pub fn reported_after(mut self, value: impl Into<Option<Datetime>>) -> Self {
619        self._fields.25 = value.into();
620        self
621    }
622    /// Set the `reportedAfter` field to an Option value (optional)
623    pub fn maybe_reported_after(mut self, value: Option<Datetime>) -> Self {
624        self._fields.25 = value;
625        self
626    }
627}
628
629impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
630    /// Set the `reportedBefore` field (optional)
631    pub fn reported_before(mut self, value: impl Into<Option<Datetime>>) -> Self {
632        self._fields.26 = value.into();
633        self
634    }
635    /// Set the `reportedBefore` field to an Option value (optional)
636    pub fn maybe_reported_before(mut self, value: Option<Datetime>) -> Self {
637        self._fields.26 = value;
638        self
639    }
640}
641
642impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
643    /// Set the `reviewState` field (optional)
644    pub fn review_state(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
645        self._fields.27 = value.into();
646        self
647    }
648    /// Set the `reviewState` field to an Option value (optional)
649    pub fn maybe_review_state(mut self, value: Option<CowStr<'a>>) -> Self {
650        self._fields.27 = value;
651        self
652    }
653}
654
655impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
656    /// Set the `reviewedAfter` field (optional)
657    pub fn reviewed_after(mut self, value: impl Into<Option<Datetime>>) -> Self {
658        self._fields.28 = value.into();
659        self
660    }
661    /// Set the `reviewedAfter` field to an Option value (optional)
662    pub fn maybe_reviewed_after(mut self, value: Option<Datetime>) -> Self {
663        self._fields.28 = value;
664        self
665    }
666}
667
668impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
669    /// Set the `reviewedBefore` field (optional)
670    pub fn reviewed_before(mut self, value: impl Into<Option<Datetime>>) -> Self {
671        self._fields.29 = value.into();
672        self
673    }
674    /// Set the `reviewedBefore` field to an Option value (optional)
675    pub fn maybe_reviewed_before(mut self, value: Option<Datetime>) -> Self {
676        self._fields.29 = value;
677        self
678    }
679}
680
681impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
682    /// Set the `sortDirection` field (optional)
683    pub fn sort_direction(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
684        self._fields.30 = value.into();
685        self
686    }
687    /// Set the `sortDirection` field to an Option value (optional)
688    pub fn maybe_sort_direction(mut self, value: Option<CowStr<'a>>) -> Self {
689        self._fields.30 = value;
690        self
691    }
692}
693
694impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
695    /// Set the `sortField` field (optional)
696    pub fn sort_field(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
697        self._fields.31 = value.into();
698        self
699    }
700    /// Set the `sortField` field to an Option value (optional)
701    pub fn maybe_sort_field(mut self, value: Option<CowStr<'a>>) -> Self {
702        self._fields.31 = value;
703        self
704    }
705}
706
707impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
708    /// Set the `subject` field (optional)
709    pub fn subject(mut self, value: impl Into<Option<UriValue<'a>>>) -> Self {
710        self._fields.32 = value.into();
711        self
712    }
713    /// Set the `subject` field to an Option value (optional)
714    pub fn maybe_subject(mut self, value: Option<UriValue<'a>>) -> Self {
715        self._fields.32 = value;
716        self
717    }
718}
719
720impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
721    /// Set the `subjectType` field (optional)
722    pub fn subject_type(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
723        self._fields.33 = value.into();
724        self
725    }
726    /// Set the `subjectType` field to an Option value (optional)
727    pub fn maybe_subject_type(mut self, value: Option<CowStr<'a>>) -> Self {
728        self._fields.33 = value;
729        self
730    }
731}
732
733impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
734    /// Set the `tags` field (optional)
735    pub fn tags(mut self, value: impl Into<Option<Vec<CowStr<'a>>>>) -> Self {
736        self._fields.34 = value.into();
737        self
738    }
739    /// Set the `tags` field to an Option value (optional)
740    pub fn maybe_tags(mut self, value: Option<Vec<CowStr<'a>>>) -> Self {
741        self._fields.34 = value;
742        self
743    }
744}
745
746impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
747    /// Set the `takendown` field (optional)
748    pub fn takendown(mut self, value: impl Into<Option<bool>>) -> Self {
749        self._fields.35 = value.into();
750        self
751    }
752    /// Set the `takendown` field to an Option value (optional)
753    pub fn maybe_takendown(mut self, value: Option<bool>) -> Self {
754        self._fields.35 = value;
755        self
756    }
757}
758
759impl<'a, S> QueryStatusesBuilder<'a, S>
760where
761    S: query_statuses_state::State,
762{
763    /// Build the final struct
764    pub fn build(self) -> QueryStatuses<'a> {
765        QueryStatuses {
766            age_assurance_state: self._fields.0,
767            appealed: self._fields.1,
768            collections: self._fields.2,
769            comment: self._fields.3,
770            cursor: self._fields.4,
771            exclude_tags: self._fields.5,
772            hosting_deleted_after: self._fields.6,
773            hosting_deleted_before: self._fields.7,
774            hosting_statuses: self._fields.8,
775            hosting_updated_after: self._fields.9,
776            hosting_updated_before: self._fields.10,
777            ignore_subjects: self._fields.11,
778            include_all_user_records: self._fields.12,
779            include_muted: self._fields.13,
780            last_reviewed_by: self._fields.14,
781            limit: self._fields.15,
782            min_account_suspend_count: self._fields.16,
783            min_priority_score: self._fields.17,
784            min_reported_records_count: self._fields.18,
785            min_strike_count: self._fields.19,
786            min_takendown_records_count: self._fields.20,
787            only_muted: self._fields.21,
788            queue_count: self._fields.22,
789            queue_index: self._fields.23,
790            queue_seed: self._fields.24,
791            reported_after: self._fields.25,
792            reported_before: self._fields.26,
793            review_state: self._fields.27,
794            reviewed_after: self._fields.28,
795            reviewed_before: self._fields.29,
796            sort_direction: self._fields.30,
797            sort_field: self._fields.31,
798            subject: self._fields.32,
799            subject_type: self._fields.33,
800            tags: self._fields.34,
801            takendown: self._fields.35,
802        }
803    }
804}