// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: com.atproto.server.requestEmailUpdate
//
// 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};

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct RequestEmailUpdateOutput<'a> {
    pub token_required: bool,
}

/// XRPC request marker type.

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Copy)]
pub struct RequestEmailUpdate;
/// Response type for com.atproto.server.requestEmailUpdate
pub struct RequestEmailUpdateResponse;
impl jacquard_common::xrpc::XrpcResp for RequestEmailUpdateResponse {
    const NSID: &'static str = "com.atproto.server.requestEmailUpdate";
    const ENCODING: &'static str = "application/json";
    type Output<'de> = RequestEmailUpdateOutput<'de>;
    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}

impl jacquard_common::xrpc::XrpcRequest for RequestEmailUpdate {
    const NSID: &'static str = "com.atproto.server.requestEmailUpdate";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
        "application/json",
    );
    type Response = RequestEmailUpdateResponse;
}

/// Endpoint type for com.atproto.server.requestEmailUpdate
pub struct RequestEmailUpdateRequest;
impl jacquard_common::xrpc::XrpcEndpoint for RequestEmailUpdateRequest {
    const PATH: &'static str = "/xrpc/com.atproto.server.requestEmailUpdate";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
        "application/json",
    );
    type Request<'de> = RequestEmailUpdate;
    type Response = RequestEmailUpdateResponse;
}