objectiveai_sdk/agent/
request.rs1use schemars::JsonSchema;
4use serde::{Deserialize, Serialize};
5
6#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
8#[schemars(rename = "agent.ListAgentsRequest")]
9pub struct ListAgentsRequest {
10 #[serde(skip_serializing_if = "Option::is_none")]
12 #[schemars(extend("omitempty" = true))]
13 pub source: Option<ListAgentsSource>,
14}
15
16#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
18#[schemars(rename = "agent.ListAgentsSource")]
19#[serde(rename_all = "snake_case")]
20pub enum ListAgentsSource {
21 All,
22 Mock,
23 Filesystem,
24 Objectiveai,
25}
26
27impl ListAgentsSource {
28 pub fn as_str(&self) -> &str {
29 match self {
30 ListAgentsSource::All => "all",
31 ListAgentsSource::Mock => "mock",
32 ListAgentsSource::Filesystem => "filesystem",
33 ListAgentsSource::Objectiveai => "objectiveai",
34 }
35 }
36}
37
38pub type GetAgentRequest = crate::RemotePathCommitOptional;