nominal-api-conjure 0.1292.1

Conjure HTTP API bindings for the Nominal platform
Documentation
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct QuotaResourceUsage {
    #[serde(rename = "resource")]
    resource: super::QuotaResourceType,
    #[serde(rename = "used")]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    used: f64,
    #[serde(rename = "limit")]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    limit: f64,
}
impl QuotaResourceUsage {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(resource: super::QuotaResourceType, used: f64, limit: f64) -> Self {
        Self::builder().resource(resource).used(used).limit(limit).build()
    }
    #[inline]
    pub fn resource(&self) -> &super::QuotaResourceType {
        &self.resource
    }
    /// Amount consumed within the current window, in the resource's native unit (rows,
    /// bytes, query count, or seconds for EXECUTION_TIME).
    #[inline]
    pub fn used(&self) -> f64 {
        self.used
    }
    /// The cap for this resource in this window.
    #[inline]
    pub fn limit(&self) -> f64 {
        self.limit
    }
}