// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: tools.ozone.communication.listTemplates
//
// This file was automatically generated from Lexicon schemas.
// Any manual changes will be overwritten on the next regeneration.

#[allow(unused_imports)]
use alloc::collections::BTreeMap;

#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_derive::{IntoStatic, lexicon};
use serde::{Serialize, Deserialize};
use crate::tools_ozone::communication::TemplateView;

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct ListTemplatesOutput<'a> {
    #[serde(borrow)]
    pub communication_templates: Vec<TemplateView<'a>>,
}

/// XRPC request marker type.

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Copy)]
pub struct ListTemplates;
/// Response type for tools.ozone.communication.listTemplates
pub struct ListTemplatesResponse;
impl jacquard_common::xrpc::XrpcResp for ListTemplatesResponse {
    const NSID: &'static str = "tools.ozone.communication.listTemplates";
    const ENCODING: &'static str = "application/json";
    type Output<'de> = ListTemplatesOutput<'de>;
    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}

impl jacquard_common::xrpc::XrpcRequest for ListTemplates {
    const NSID: &'static str = "tools.ozone.communication.listTemplates";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Response = ListTemplatesResponse;
}

/// Endpoint type for tools.ozone.communication.listTemplates
pub struct ListTemplatesRequest;
impl jacquard_common::xrpc::XrpcEndpoint for ListTemplatesRequest {
    const PATH: &'static str = "/xrpc/tools.ozone.communication.listTemplates";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Request<'de> = ListTemplates;
    type Response = ListTemplatesResponse;
}