// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: tools.ozone.set.deleteValues // // 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, bon::Builder )] #[serde(rename_all = "camelCase")] #[builder(start_fn = new)] pub struct DeleteValues<'a> { ///Name of the set to delete values from #[serde(borrow)] #[builder(into)] pub name: jacquard_common::CowStr<'a>, ///Array of string values to delete from the set #[serde(borrow)] pub values: Vec>, #[serde(flatten)] #[serde(borrow)] #[builder(default)] pub extra_data: ::std::collections::BTreeMap< ::jacquard_common::smol_str::SmolStr, ::jacquard_common::types::value::Data<'a>, >, } impl jacquard_common::IntoStatic for DeleteValues<'_> { type Output = DeleteValues<'static>; fn into_static(self) -> Self::Output { DeleteValues { name: self.name.into_static(), values: self.values.into_static(), extra_data: self.extra_data.into_static(), } } } #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, thiserror::Error, miette::Diagnostic )] #[serde(tag = "error", content = "message")] #[serde(bound(deserialize = "'de: 'a"))] pub enum DeleteValuesError<'a> { ///set with the given name does not exist #[serde(rename = "SetNotFound")] SetNotFound(std::option::Option), } impl std::fmt::Display for DeleteValuesError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::SetNotFound(msg) => { write!(f, "SetNotFound")?; if let Some(msg) = msg { write!(f, ": {}", msg)?; } Ok(()) } Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), } } } impl jacquard_common::IntoStatic for DeleteValuesError<'_> { type Output = DeleteValuesError<'static>; fn into_static(self) -> Self::Output { match self { DeleteValuesError::SetNotFound(v) => { DeleteValuesError::SetNotFound(v.into_static()) } DeleteValuesError::Unknown(v) => DeleteValuesError::Unknown(v.into_static()), } } } impl jacquard_common::types::xrpc::XrpcRequest for DeleteValues<'_> { const NSID: &'static str = "tools.ozone.set.deleteValues"; const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( "application/json", ); const OUTPUT_ENCODING: &'static str = "application/json"; type Output<'de> = (); type Err<'de> = DeleteValuesError<'de>; }