// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: sh.tangled.label.op // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, bon::Builder )] #[serde(rename_all = "camelCase")] pub struct Op<'a> { #[serde(borrow)] pub add: Vec>, #[serde(borrow)] pub delete: Vec>, pub performed_at: jacquard_common::types::string::Datetime, /// The subject (task, pull or discussion) of this label. Appviews may apply a `scope` check and refuse this op. #[serde(borrow)] pub subject: jacquard_common::types::string::AtUri<'a>, } /// Typed wrapper for GetRecord response with this collection's record type. #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct OpGetRecordOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cid: std::option::Option>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(borrow)] pub value: Op<'a>, } /// Marker type for deserializing records from this collection. pub struct OpRecord; impl jacquard_common::xrpc::XrpcResp for OpRecord { const NSID: &'static str = "sh.tangled.label.op"; const ENCODING: &'static str = "application/json"; type Output<'de> = OpGetRecordOutput<'de>; type Err<'de> = jacquard_common::types::collection::RecordError<'de>; } impl jacquard_common::types::collection::Collection for Op<'_> { const NSID: &'static str = "sh.tangled.label.op"; type Record = OpRecord; } impl From> for Op<'_> { fn from(output: OpGetRecordOutput<'_>) -> Self { use jacquard_common::IntoStatic; output.value.into_static() } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, bon::Builder )] #[serde(rename_all = "camelCase")] pub struct Operand<'a> { /// ATURI to the label definition #[serde(borrow)] pub key: jacquard_common::types::string::AtUri<'a>, /// Stringified value of the label. This is first unstringed by appviews and then interpreted as a concrete value. #[serde(borrow)] #[builder(into)] pub value: jacquard_common::CowStr<'a>, }