// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: at.inlay.Slot
//
// 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_common::CowStr;
use jacquard_derive::{IntoStatic, lexicon};
use serde::{Serialize, Deserialize};
use crate::at_inlay::Response;

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct Slot<'a> {
    ///Key into the host's stash map
    #[serde(borrow)]
    pub id: CowStr<'a>,
}


#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct SlotOutput<'a> {
    #[serde(flatten)]
    #[serde(borrow)]
    pub value: Response<'a>,
}

/// Response type for at.inlay.Slot
pub struct SlotResponse;
impl jacquard_common::xrpc::XrpcResp for SlotResponse {
    const NSID: &'static str = "at.inlay.Slot";
    const ENCODING: &'static str = "application/json";
    type Output<'de> = SlotOutput<'de>;
    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}

impl<'a> jacquard_common::xrpc::XrpcRequest for Slot<'a> {
    const NSID: &'static str = "at.inlay.Slot";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
        "application/json",
    );
    type Response = SlotResponse;
}

/// Endpoint type for at.inlay.Slot
pub struct SlotRequest;
impl jacquard_common::xrpc::XrpcEndpoint for SlotRequest {
    const PATH: &'static str = "/xrpc/at.inlay.Slot";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
        "application/json",
    );
    type Request<'de> = Slot<'de>;
    type Response = SlotResponse;
}