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