pub struct AgentRoleStatsResponse {
pub period: HistoryPeriod,
pub roles: Vec<AgentRoleStatsEntryResponse>,
}Expand description
Cost, executions and failures per agent role over a period, all workflows combined.
§Examples
use ironflow_api::entities::AgentRoleStatsResponse;
use ironflow_store::entities::HistoryPeriod;
let response = AgentRoleStatsResponse {
period: HistoryPeriod::SevenDays,
roles: Vec::new(),
};
assert!(response.roles.is_empty());JSON schema
{
"description": "Cost, executions and failures per agent role over a period, all workflows\ncombined.\n\n# Examples\n\n```\nuse ironflow_api::entities::AgentRoleStatsResponse;\nuse ironflow_store::entities::HistoryPeriod;\n\nlet response = AgentRoleStatsResponse {\n period: HistoryPeriod::SevenDays,\n roles: Vec::new(),\n};\nassert!(response.roles.is_empty());\n```",
"type": "object",
"required": [
"period",
"roles"
],
"properties": {
"period": {
"$ref": "#/components/schemas/HistoryPeriod"
},
"roles": {
"description": "One entry per role that ran an agent step in the period, sorted by\ntotal cost descending, then by role name.",
"type": "array",
"items": {
"$ref": "#/components/schemas/AgentRoleStatsEntryResponse"
}
}
}
}
```ignore
</details>Fields§
§period: HistoryPeriod§roles: Vec<AgentRoleStatsEntryResponse>One entry per role that ran an agent step in the period, sorted by total cost descending, then by role name.
Implementations§
Source§impl AgentRoleStatsResponse
impl AgentRoleStatsResponse
pub fn builder() -> AgentRoleStatsResponse
Trait Implementations§
Source§impl Clone for AgentRoleStatsResponse
impl Clone for AgentRoleStatsResponse
Source§impl Debug for AgentRoleStatsResponse
impl Debug for AgentRoleStatsResponse
Source§impl<'de> Deserialize<'de> for AgentRoleStatsResponse
impl<'de> Deserialize<'de> for AgentRoleStatsResponse
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
Source§impl From<AgentRoleStatsResponse> for AgentRoleStatsResponse
impl From<AgentRoleStatsResponse> for AgentRoleStatsResponse
Source§fn from(value: AgentRoleStatsResponse) -> Self
fn from(value: AgentRoleStatsResponse) -> Self
Converts to this type from the input type.
Source§impl Serialize for AgentRoleStatsResponse
impl Serialize for AgentRoleStatsResponse
Source§impl TryFrom<AgentRoleStatsResponse> for AgentRoleStatsResponse
impl TryFrom<AgentRoleStatsResponse> for AgentRoleStatsResponse
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: AgentRoleStatsResponse) -> Result<Self, ConversionError>
fn try_from(value: AgentRoleStatsResponse) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for AgentRoleStatsResponse
impl RefUnwindSafe for AgentRoleStatsResponse
impl Send for AgentRoleStatsResponse
impl Sync for AgentRoleStatsResponse
impl Unpin for AgentRoleStatsResponse
impl UnsafeUnpin for AgentRoleStatsResponse
impl UnwindSafe for AgentRoleStatsResponse
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