1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: network.slices.slice.getJobLogs
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[jacquard_derive::lexicon]
9#[derive(
10 serde::Serialize,
11 serde::Deserialize,
12 Debug,
13 Clone,
14 PartialEq,
15 Eq,
16 jacquard_derive::IntoStatic,
17 bon::Builder
18)]
19#[serde(rename_all = "camelCase")]
20pub struct LogEntry<'a> {
21 /// When the log entry was created
22 pub created_at: jacquard_common::types::string::Datetime,
23 /// Log entry ID
24 pub id: i64,
25 /// UUID of related job if applicable
26 #[serde(skip_serializing_if = "std::option::Option::is_none")]
27 #[builder(into)]
28 #[serde(borrow)]
29 pub job_id: Option<jacquard_common::CowStr<'a>>,
30 /// Log level
31 #[serde(borrow)]
32 #[builder(into)]
33 pub level: jacquard_common::CowStr<'a>,
34 /// Type of log entry
35 #[serde(borrow)]
36 #[builder(into)]
37 pub log_type: jacquard_common::CowStr<'a>,
38 /// Log message
39 #[serde(borrow)]
40 #[builder(into)]
41 pub message: jacquard_common::CowStr<'a>,
42 /// Additional metadata associated with the log entry
43 #[serde(skip_serializing_if = "std::option::Option::is_none")]
44 #[builder(into)]
45 #[serde(borrow)]
46 pub metadata: Option<jacquard_common::types::value::Data<'a>>,
47 /// AT-URI of related slice if applicable
48 #[serde(skip_serializing_if = "std::option::Option::is_none")]
49 #[builder(into)]
50 #[serde(borrow)]
51 pub slice_uri: Option<jacquard_common::CowStr<'a>>,
52 /// DID of related user if applicable
53 #[serde(skip_serializing_if = "std::option::Option::is_none")]
54 #[builder(into)]
55 #[serde(borrow)]
56 pub user_did: Option<jacquard_common::types::string::Did<'a>>,
57}
58
59#[derive(
60 serde::Serialize,
61 serde::Deserialize,
62 Debug,
63 Clone,
64 PartialEq,
65 Eq,
66 bon::Builder,
67 jacquard_derive::IntoStatic
68)]
69#[builder(start_fn = new)]
70#[serde(rename_all = "camelCase")]
71pub struct GetJobLogs<'a> {
72 #[serde(borrow)]
73 #[builder(into)]
74 pub job_id: jacquard_common::CowStr<'a>,
75 ///(default: 100, min: 1, max: 1000)
76 #[serde(skip_serializing_if = "std::option::Option::is_none")]
77 pub limit: std::option::Option<i64>,
78}
79
80#[jacquard_derive::lexicon]
81#[derive(
82 serde::Serialize,
83 serde::Deserialize,
84 Debug,
85 Clone,
86 PartialEq,
87 Eq,
88 jacquard_derive::IntoStatic
89)]
90#[serde(rename_all = "camelCase")]
91pub struct GetJobLogsOutput<'a> {
92 #[serde(borrow)]
93 pub logs: Vec<jacquard_common::types::value::Data<'a>>,
94}
95
96///Response type for
97///network.slices.slice.getJobLogs
98pub struct GetJobLogsResponse;
99impl jacquard_common::xrpc::XrpcResp for GetJobLogsResponse {
100 const NSID: &'static str = "network.slices.slice.getJobLogs";
101 const ENCODING: &'static str = "application/json";
102 type Output<'de> = GetJobLogsOutput<'de>;
103 type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
104}
105
106impl<'a> jacquard_common::xrpc::XrpcRequest for GetJobLogs<'a> {
107 const NSID: &'static str = "network.slices.slice.getJobLogs";
108 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
109 type Response = GetJobLogsResponse;
110}
111
112///Endpoint type for
113///network.slices.slice.getJobLogs
114pub struct GetJobLogsRequest;
115impl jacquard_common::xrpc::XrpcEndpoint for GetJobLogsRequest {
116 const PATH: &'static str = "/xrpc/network.slices.slice.getJobLogs";
117 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
118 type Request<'de> = GetJobLogs<'de>;
119 type Response = GetJobLogsResponse;
120}