pub struct CreateMeterRequest {
pub slug: String,
pub name: Option<String>,
pub description: Option<String>,
pub aggregation: String,
pub event_type: String,
pub event_from: Option<String>,
pub value_property: Option<String>,
pub group_by: Option<Value>,
pub metadata: Option<Value>,
}
Expand description
Request body to create a meter.
This mirrors the required format for POST /api/v1/meters.
Fields§
§slug: String
A unique, human-readable identifier for the meter. Must consist only of alphanumeric and underscore characters.
name: Option<String>
Human-readable name for the resource. Defaults to the slug if not specified.
description: Option<String>
Optional description for the meter.
aggregation: String
The aggregation type to use for the meter (SUM, UNIQUE_COUNT, COUNT, etc.).
event_type: String
The event type to aggregate.
event_from: Option<String>
The date since the meter should include events. Example “2023-01-01T00:00:00Z”. If not specified, all events are included.
value_property: Option<String>
JSONPath expression to extract the value from the ingested event’s data property.
group_by: Option<Value>
Named JSONPath expressions to extract the group by values from the event data.
metadata: Option<Value>
Additional metadata for the resource.
Trait Implementations§
Source§impl Debug for CreateMeterRequest
impl Debug for CreateMeterRequest
Source§impl<'de> Deserialize<'de> for CreateMeterRequest
impl<'de> Deserialize<'de> for CreateMeterRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CreateMeterRequest
impl RefUnwindSafe for CreateMeterRequest
impl Send for CreateMeterRequest
impl Sync for CreateMeterRequest
impl Unpin for CreateMeterRequest
impl UnwindSafe for CreateMeterRequest
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