// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: chat.bsky.convo.deleteMessageForSelf
//
// 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::chat_bsky::convo::DeletedMessageView;

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct DeleteMessageForSelf<'a> {
    #[serde(borrow)]
    pub convo_id: CowStr<'a>,
    #[serde(borrow)]
    pub message_id: CowStr<'a>,
}


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

/// Response type for chat.bsky.convo.deleteMessageForSelf
pub struct DeleteMessageForSelfResponse;
impl jacquard_common::xrpc::XrpcResp for DeleteMessageForSelfResponse {
    const NSID: &'static str = "chat.bsky.convo.deleteMessageForSelf";
    const ENCODING: &'static str = "application/json";
    type Output<'de> = DeleteMessageForSelfOutput<'de>;
    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}

impl<'a> jacquard_common::xrpc::XrpcRequest for DeleteMessageForSelf<'a> {
    const NSID: &'static str = "chat.bsky.convo.deleteMessageForSelf";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
        "application/json",
    );
    type Response = DeleteMessageForSelfResponse;
}

/// Endpoint type for chat.bsky.convo.deleteMessageForSelf
pub struct DeleteMessageForSelfRequest;
impl jacquard_common::xrpc::XrpcEndpoint for DeleteMessageForSelfRequest {
    const PATH: &'static str = "/xrpc/chat.bsky.convo.deleteMessageForSelf";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
        "application/json",
    );
    type Request<'de> = DeleteMessageForSelf<'de>;
    type Response = DeleteMessageForSelfResponse;
}