jacquard_api/network_slices/slice/
sync_user_collections.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: network.slices.slice.syncUserCollections
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 SyncUserCollections<'a> {
21    /// AT-URI of the slice to sync user data into
22    #[serde(borrow)]
23    pub slice: jacquard_common::CowStr<'a>,
24    /// Timeout in seconds for the sync operation
25    #[serde(skip_serializing_if = "std::option::Option::is_none")]
26    pub timeout_seconds: std::option::Option<i64>,
27}
28
29#[jacquard_derive::lexicon]
30#[derive(
31    serde::Serialize,
32    serde::Deserialize,
33    Debug,
34    Clone,
35    PartialEq,
36    Eq,
37    jacquard_derive::IntoStatic
38)]
39#[serde(rename_all = "camelCase")]
40pub struct SyncUserCollectionsOutput<'a> {
41    /// Number of records successfully synced
42    pub records_synced: i64,
43    /// Number of repositories processed during sync
44    pub repos_processed: i64,
45    /// Whether the sync operation exceeded the timeout
46    pub timed_out: bool,
47}
48
49/// Response type for
50///network.slices.slice.syncUserCollections
51pub struct SyncUserCollectionsResponse;
52impl jacquard_common::xrpc::XrpcResp for SyncUserCollectionsResponse {
53    const NSID: &'static str = "network.slices.slice.syncUserCollections";
54    const ENCODING: &'static str = "application/json";
55    type Output<'de> = SyncUserCollectionsOutput<'de>;
56    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
57}
58
59impl<'a> jacquard_common::xrpc::XrpcRequest for SyncUserCollections<'a> {
60    const NSID: &'static str = "network.slices.slice.syncUserCollections";
61    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
62        "application/json",
63    );
64    type Response = SyncUserCollectionsResponse;
65}
66
67/// Endpoint type for
68///network.slices.slice.syncUserCollections
69pub struct SyncUserCollectionsRequest;
70impl jacquard_common::xrpc::XrpcEndpoint for SyncUserCollectionsRequest {
71    const PATH: &'static str = "/xrpc/network.slices.slice.syncUserCollections";
72    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
73        "application/json",
74    );
75    type Request<'de> = SyncUserCollections<'de>;
76    type Response = SyncUserCollectionsResponse;
77}