pub struct UsageQueryParamsArgs { /* private fields */ }Available on crate feature
administration-types only.Expand description
Builder for UsageQueryParams.
Implementations§
Source§impl UsageQueryParamsArgs
impl UsageQueryParamsArgs
Sourcepub fn start_time<VALUE: Into<u64>>(&mut self, value: VALUE) -> &mut Self
pub fn start_time<VALUE: Into<u64>>(&mut self, value: VALUE) -> &mut Self
Start time (Unix seconds) of the query time range, inclusive.
Sourcepub fn end_time<VALUE: Into<u64>>(&mut self, value: VALUE) -> &mut Self
pub fn end_time<VALUE: Into<u64>>(&mut self, value: VALUE) -> &mut Self
End time (Unix seconds) of the query time range, exclusive.
Sourcepub fn bucket_width<VALUE: Into<UsageBucketWidth>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn bucket_width<VALUE: Into<UsageBucketWidth>>( &mut self, value: VALUE, ) -> &mut Self
Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d.
Sourcepub fn project_ids<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn project_ids<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Return only usage for these projects.
Sourcepub fn user_ids<VALUE: Into<Vec<String>>>(&mut self, value: VALUE) -> &mut Self
pub fn user_ids<VALUE: Into<Vec<String>>>(&mut self, value: VALUE) -> &mut Self
Return only usage for these users.
Sourcepub fn api_key_ids<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn api_key_ids<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Return only usage for these API keys.
Sourcepub fn models<VALUE: Into<Vec<String>>>(&mut self, value: VALUE) -> &mut Self
pub fn models<VALUE: Into<Vec<String>>>(&mut self, value: VALUE) -> &mut Self
Return only usage for these models.
Sourcepub fn batch<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn batch<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
If true, return batch jobs only. If false, return non-batch jobs only. By default, return both.
Sourcepub fn group_by<VALUE: Into<Vec<UsageGroupBy>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn group_by<VALUE: Into<Vec<UsageGroupBy>>>( &mut self, value: VALUE, ) -> &mut Self
Group the usage data by the specified fields.
Sourcepub fn limit<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self
pub fn limit<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self
Specifies the number of buckets to return.
Sourcepub fn page<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn page<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
A cursor for use in pagination. Corresponding to the next_page field from the previous response.
Sourcepub fn build(&self) -> Result<UsageQueryParams, OpenAIError>
pub fn build(&self) -> Result<UsageQueryParams, OpenAIError>
Trait Implementations§
Source§impl Clone for UsageQueryParamsArgs
impl Clone for UsageQueryParamsArgs
Source§fn clone(&self) -> UsageQueryParamsArgs
fn clone(&self) -> UsageQueryParamsArgs
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UsageQueryParamsArgs
impl Debug for UsageQueryParamsArgs
Auto Trait Implementations§
impl Freeze for UsageQueryParamsArgs
impl RefUnwindSafe for UsageQueryParamsArgs
impl Send for UsageQueryParamsArgs
impl Sync for UsageQueryParamsArgs
impl Unpin for UsageQueryParamsArgs
impl UnwindSafe for UsageQueryParamsArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more