A better Rust ATProto crate
at lifetimes 2.8 kB view raw
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 bon::Builder, 17 jacquard_derive::IntoStatic 18)] 19#[serde(rename_all = "camelCase")] 20#[builder(start_fn = new)] 21pub struct SyncUserCollections<'a> { 22 ///AT-URI of the slice to sync user data into 23 #[serde(borrow)] 24 #[builder(into)] 25 pub slice: jacquard_common::CowStr<'a>, 26 ///Timeout in seconds for the sync operation 27 #[serde(skip_serializing_if = "std::option::Option::is_none")] 28 pub timeout_seconds: std::option::Option<i64>, 29 #[serde(flatten)] 30 #[serde(borrow)] 31 #[builder(default)] 32 pub extra_data: ::std::collections::BTreeMap< 33 ::jacquard_common::smol_str::SmolStr, 34 ::jacquard_common::types::value::Data<'a>, 35 >, 36} 37 38#[jacquard_derive::lexicon] 39#[derive( 40 serde::Serialize, 41 serde::Deserialize, 42 Debug, 43 Clone, 44 PartialEq, 45 Eq, 46 jacquard_derive::IntoStatic 47)] 48#[serde(rename_all = "camelCase")] 49pub struct SyncUserCollectionsOutput<'a> { 50 ///Number of records successfully synced 51 pub records_synced: i64, 52 ///Number of repositories processed during sync 53 pub repos_processed: i64, 54 ///Whether the sync operation exceeded the timeout 55 pub timed_out: bool, 56} 57 58///Response type for 59///network.slices.slice.syncUserCollections 60pub struct SyncUserCollectionsResponse; 61impl jacquard_common::xrpc::XrpcResp for SyncUserCollectionsResponse { 62 const NSID: &'static str = "network.slices.slice.syncUserCollections"; 63 const ENCODING: &'static str = "application/json"; 64 type Output<'de> = SyncUserCollectionsOutput<'de>; 65 type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 66} 67 68impl<'de> jacquard_common::xrpc::XrpcRequest<'de> for SyncUserCollections<'de> { 69 const NSID: &'static str = "network.slices.slice.syncUserCollections"; 70 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( 71 "application/json", 72 ); 73 type Response = SyncUserCollectionsResponse; 74} 75 76///Endpoint type for 77///network.slices.slice.syncUserCollections 78pub struct SyncUserCollectionsRequest; 79impl jacquard_common::xrpc::XrpcEndpoint for SyncUserCollectionsRequest { 80 const PATH: &'static str = "/xrpc/network.slices.slice.syncUserCollections"; 81 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( 82 "application/json", 83 ); 84 type Request<'de> = SyncUserCollections<'de>; 85 type Response = SyncUserCollectionsResponse; 86}