1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: network.slices.slice.startSync
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 Default
18)]
19#[serde(rename_all = "camelCase")]
20pub struct StartSync<'a> {
21 /// List of collection NSIDs to sync (primary collections matching slice domain)
22 #[serde(skip_serializing_if = "std::option::Option::is_none")]
23 #[serde(borrow)]
24 pub collections: std::option::Option<Vec<jacquard_common::types::string::Nsid<'a>>>,
25 /// List of external collection NSIDs to sync (collections outside slice domain)
26 #[serde(skip_serializing_if = "std::option::Option::is_none")]
27 #[serde(borrow)]
28 pub external_collections: std::option::Option<
29 Vec<jacquard_common::types::string::Nsid<'a>>,
30 >,
31 /// Maximum number of records to sync per repository
32 #[serde(skip_serializing_if = "std::option::Option::is_none")]
33 pub limit_per_repo: std::option::Option<i64>,
34 /// List of specific repository DIDs to sync from
35 #[serde(skip_serializing_if = "std::option::Option::is_none")]
36 #[serde(borrow)]
37 pub repos: std::option::Option<Vec<jacquard_common::types::string::Did<'a>>>,
38 /// Skip lexicon validation during sync
39 #[serde(skip_serializing_if = "std::option::Option::is_none")]
40 pub skip_validation: std::option::Option<bool>,
41 /// AT-URI of the slice to sync data into
42 #[serde(borrow)]
43 pub slice: jacquard_common::CowStr<'a>,
44}
45
46#[jacquard_derive::lexicon]
47#[derive(
48 serde::Serialize,
49 serde::Deserialize,
50 Debug,
51 Clone,
52 PartialEq,
53 Eq,
54 jacquard_derive::IntoStatic,
55 Default
56)]
57#[serde(rename_all = "camelCase")]
58pub struct StartSyncOutput<'a> {
59 /// UUID of the enqueued sync job
60 #[serde(borrow)]
61 pub job_id: jacquard_common::CowStr<'a>,
62 /// Success message confirming job enqueue
63 #[serde(borrow)]
64 pub message: jacquard_common::CowStr<'a>,
65}
66
67///Response type for
68///network.slices.slice.startSync
69pub struct StartSyncResponse;
70impl jacquard_common::xrpc::XrpcResp for StartSyncResponse {
71 const NSID: &'static str = "network.slices.slice.startSync";
72 const ENCODING: &'static str = "application/json";
73 type Output<'de> = StartSyncOutput<'de>;
74 type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
75}
76
77impl<'a> jacquard_common::xrpc::XrpcRequest for StartSync<'a> {
78 const NSID: &'static str = "network.slices.slice.startSync";
79 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
80 "application/json",
81 );
82 type Response = StartSyncResponse;
83}
84
85///Endpoint type for
86///network.slices.slice.startSync
87pub struct StartSyncRequest;
88impl jacquard_common::xrpc::XrpcEndpoint for StartSyncRequest {
89 const PATH: &'static str = "/xrpc/network.slices.slice.startSync";
90 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
91 "application/json",
92 );
93 type Request<'de> = StartSync<'de>;
94 type Response = StartSyncResponse;
95}