nominal_api/conjure/objects/ingest/api/
search_ingest_jobs_request.rs1#[derive(
2 Debug,
3 Clone,
4 conjure_object::serde::Serialize,
5 conjure_object::serde::Deserialize,
6 PartialEq,
7 Eq,
8 PartialOrd,
9 Ord,
10 Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct SearchIngestJobsRequest {
16 #[builder(default, into)]
17 #[serde(rename = "pageSize", skip_serializing_if = "Option::is_none", default)]
18 page_size: Option<i32>,
19 #[builder(default, into)]
20 #[serde(rename = "nextPageToken", skip_serializing_if = "Option::is_none", default)]
21 next_page_token: Option<String>,
22 #[builder(
23 default,
24 custom(
25 type = impl
26 Into<Option<super::IngestJobSearchFilter>>,
27 convert = |v|v.into().map(Box::new)
28 )
29 )]
30 #[serde(rename = "filter", skip_serializing_if = "Option::is_none", default)]
31 filter: Option<Box<super::IngestJobSearchFilter>>,
32 #[builder(
33 default,
34 custom(
35 type = impl
36 Into<Option<super::IngestJobSortOptions>>,
37 convert = |v|v.into().map(Box::new)
38 )
39 )]
40 #[serde(rename = "sort", skip_serializing_if = "Option::is_none", default)]
41 sort: Option<Box<super::IngestJobSortOptions>>,
42}
43impl SearchIngestJobsRequest {
44 #[inline]
46 pub fn new() -> Self {
47 Self::builder().build()
48 }
49 #[inline]
51 pub fn page_size(&self) -> Option<i32> {
52 self.page_size.as_ref().map(|o| *o)
53 }
54 #[inline]
55 pub fn next_page_token(&self) -> Option<&str> {
56 self.next_page_token.as_ref().map(|o| &**o)
57 }
58 #[inline]
59 pub fn filter(&self) -> Option<&super::IngestJobSearchFilter> {
60 self.filter.as_ref().map(|o| &**o)
61 }
62 #[inline]
64 pub fn sort(&self) -> Option<&super::IngestJobSortOptions> {
65 self.sort.as_ref().map(|o| &**o)
66 }
67}