// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: social.clippr.actor.getPreferences
//
// 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::social_clippr::actor::Preferences;

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct GetPreferences;

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct GetPreferencesOutput<'a> {
    ///A ref to the user's preferences
    #[serde(borrow)]
    pub preferences: Preferences<'a>,
}

/// Response type for social.clippr.actor.getPreferences
pub struct GetPreferencesResponse;
impl jacquard_common::xrpc::XrpcResp for GetPreferencesResponse {
    const NSID: &'static str = "social.clippr.actor.getPreferences";
    const ENCODING: &'static str = "application/json";
    type Output<'de> = GetPreferencesOutput<'de>;
    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}

impl jacquard_common::xrpc::XrpcRequest for GetPreferences {
    const NSID: &'static str = "social.clippr.actor.getPreferences";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Response = GetPreferencesResponse;
}

/// Endpoint type for social.clippr.actor.getPreferences
pub struct GetPreferencesRequest;
impl jacquard_common::xrpc::XrpcEndpoint for GetPreferencesRequest {
    const PATH: &'static str = "/xrpc/social.clippr.actor.getPreferences";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Request<'de> = GetPreferences;
    type Response = GetPreferencesResponse;
}