@@ -13490,6 +13490,8 @@ impl Client {
13490
13490
///
13491
13491
/// ```ignore
13492
13492
/// let response = client.list_jobs()
13493
+ /// .limit(limit)
13494
+ /// .offset(offset)
13493
13495
/// .rfd(rfd)
13494
13496
/// .send()
13495
13497
/// .await;
@@ -15709,17 +15711,43 @@ pub mod builder {
15709
15711
#[derive(Debug, Clone)]
15710
15712
pub struct ListJobs<'a> {
15711
15713
client: &'a super::Client,
15714
+ limit: Result<Option<i64>, String>,
15715
+ offset: Result<Option<i64>, String>,
15712
15716
rfd: Result<::std::string::String, String>,
15713
15717
}
15714
15718
15715
15719
impl<'a> ListJobs<'a> {
15716
15720
pub fn new(client: &'a super::Client) -> Self {
15717
15721
Self {
15718
15722
client: client,
15723
+ limit: Ok(None),
15724
+ offset: Ok(None),
15719
15725
rfd: Err("rfd was not initialized".to_string()),
15720
15726
}
15721
15727
}
15722
15728
15729
+ pub fn limit<V>(mut self, value: V) -> Self
15730
+ where
15731
+ V: std::convert::TryInto<i64>,
15732
+ {
15733
+ self.limit = value
15734
+ .try_into()
15735
+ .map(Some)
15736
+ .map_err(|_| "conversion to `i64` for limit failed".to_string());
15737
+ self
15738
+ }
15739
+
15740
+ pub fn offset<V>(mut self, value: V) -> Self
15741
+ where
15742
+ V: std::convert::TryInto<i64>,
15743
+ {
15744
+ self.offset = value
15745
+ .try_into()
15746
+ .map(Some)
15747
+ .map_err(|_| "conversion to `i64` for offset failed".to_string());
15748
+ self
15749
+ }
15750
+
15723
15751
pub fn rfd<V>(mut self, value: V) -> Self
15724
15752
where
15725
15753
V: std::convert::TryInto<::std::string::String>,
@@ -15734,7 +15762,14 @@ pub mod builder {
15734
15762
pub async fn send(
15735
15763
self,
15736
15764
) -> Result<ResponseValue<::std::vec::Vec<types::Job>>, Error<types::Error>> {
15737
- let Self { client, rfd } = self;
15765
+ let Self {
15766
+ client,
15767
+ limit,
15768
+ offset,
15769
+ rfd,
15770
+ } = self;
15771
+ let limit = limit.map_err(Error::InvalidRequest)?;
15772
+ let offset = offset.map_err(Error::InvalidRequest)?;
15738
15773
let rfd = rfd.map_err(Error::InvalidRequest)?;
15739
15774
let url = format!("{}/job", client.baseurl,);
15740
15775
#[allow(unused_mut)]
@@ -15745,6 +15780,8 @@ pub mod builder {
15745
15780
::reqwest::header::ACCEPT,
15746
15781
::reqwest::header::HeaderValue::from_static("application/json"),
15747
15782
)
15783
+ .query(&progenitor_client::QueryParam::new("limit", &limit))
15784
+ .query(&progenitor_client::QueryParam::new("offset", &offset))
15748
15785
.query(&progenitor_client::QueryParam::new("rfd", &rfd))
15749
15786
.build()?;
15750
15787
let result = client.client.execute(request).await;
0 commit comments