// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: app.chronosky.plan.listAssignments
//
// 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::app_chronosky::plan::get_assignment::PlanAssignment;

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct ListAssignmentsOutput<'a> {
    ///List of plan assignments
    #[serde(borrow)]
    pub assignments: Vec<PlanAssignment<'a>>,
}

/// XRPC request marker type.

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Copy)]
pub struct ListAssignments;
/// Response type for app.chronosky.plan.listAssignments
pub struct ListAssignmentsResponse;
impl jacquard_common::xrpc::XrpcResp for ListAssignmentsResponse {
    const NSID: &'static str = "app.chronosky.plan.listAssignments";
    const ENCODING: &'static str = "application/json";
    type Output<'de> = ListAssignmentsOutput<'de>;
    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}

impl jacquard_common::xrpc::XrpcRequest for ListAssignments {
    const NSID: &'static str = "app.chronosky.plan.listAssignments";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Response = ListAssignmentsResponse;
}

/// Endpoint type for app.chronosky.plan.listAssignments
pub struct ListAssignmentsRequest;
impl jacquard_common::xrpc::XrpcEndpoint for ListAssignmentsRequest {
    const PATH: &'static str = "/xrpc/app.chronosky.plan.listAssignments";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Request<'de> = ListAssignments;
    type Response = ListAssignmentsResponse;
}