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