// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: com.atproto.identity.getRecommendedDidCredentials
//
// 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, BosStr, DefaultStr, FromStaticStr};
use jacquard_common::deps::smol_str::SmolStr;
use jacquard_common::types::value::Data;
use jacquard_derive::IntoStatic;
use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
pub struct GetRecommendedDidCredentialsOutput<S: BosStr = DefaultStr> {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub also_known_as: Option<Vec<S>>,
    ///Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub rotation_keys: Option<Vec<S>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub services: Option<Data<S>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub verification_methods: Option<Data<S>>,
    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}

/** Request marker for the `com.atproto.identity.getRecommendedDidCredentials` query.

This endpoint has no request parameters or input body; send this marker with `jacquard::Client`.*/

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Copy)]
pub struct GetRecommendedDidCredentials;
/** Response marker for the `com.atproto.identity.getRecommendedDidCredentials` query.

Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetRecommendedDidCredentialsOutput<S>` for this endpoint.*/
pub struct GetRecommendedDidCredentialsResponse;
impl jacquard_common::xrpc::XrpcResp for GetRecommendedDidCredentialsResponse {
    const NSID: &'static str = "com.atproto.identity.getRecommendedDidCredentials";
    const ENCODING: &'static str = "application/json";
    type Output<S: BosStr> = GetRecommendedDidCredentialsOutput<S>;
    type Err = jacquard_common::xrpc::GenericError;
}

impl jacquard_common::xrpc::XrpcRequest for GetRecommendedDidCredentials {
    const NSID: &'static str = "com.atproto.identity.getRecommendedDidCredentials";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Response = GetRecommendedDidCredentialsResponse;
}

/** Endpoint marker for the `com.atproto.identity.getRecommendedDidCredentials` query.

Path: `/xrpc/com.atproto.identity.getRecommendedDidCredentials`. The request payload type is `GetRecommendedDidCredentials`; use this marker with lower-level `XrpcEndpoint` APIs when you need endpoint metadata.*/
pub struct GetRecommendedDidCredentialsRequest;
impl jacquard_common::xrpc::XrpcEndpoint for GetRecommendedDidCredentialsRequest {
    const PATH: &'static str = "/xrpc/com.atproto.identity.getRecommendedDidCredentials";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Request<S: BosStr> = GetRecommendedDidCredentials;
    type Response = GetRecommendedDidCredentialsResponse;
}