// @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, jacquard_derive::IntoStatic )] #[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>, >, } #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, thiserror::Error, miette::Diagnostic, jacquard_derive::IntoStatic )] #[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), } } } ///Response type for ///tools.ozone.set.deleteValues pub struct DeleteValuesResponse; impl jacquard_common::xrpc::XrpcResp for DeleteValuesResponse { const NSID: &'static str = "tools.ozone.set.deleteValues"; const ENCODING: &'static str = "application/json"; type Output<'de> = (); type Err<'de> = DeleteValuesError<'de>; } impl<'a> jacquard_common::xrpc::XrpcRequest for DeleteValues<'a> { const NSID: &'static str = "tools.ozone.set.deleteValues"; const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( "application/json", ); type Response = DeleteValuesResponse; } ///Endpoint type for ///tools.ozone.set.deleteValues pub struct DeleteValuesRequest; impl jacquard_common::xrpc::XrpcEndpoint for DeleteValuesRequest { const PATH: &'static str = "/xrpc/tools.ozone.set.deleteValues"; const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( "application/json", ); type Request<'de> = DeleteValues<'de>; type Response = DeleteValuesResponse; }