#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_derive::IntoStatic;
use serde::{Serialize, Deserialize};
use crate::app_rocksky::feed::NowPlayingsView;
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct GetNowPlayings {
#[serde(skip_serializing_if = "Option::is_none")]
pub size: Option<i64>,
}
#[jacquard_derive::lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct GetNowPlayingsOutput<'a> {
#[serde(flatten)]
#[serde(borrow)]
pub value: NowPlayingsView<'a>,
}
pub struct GetNowPlayingsResponse;
impl jacquard_common::xrpc::XrpcResp for GetNowPlayingsResponse {
const NSID: &'static str = "app.rocksky.feed.getNowPlayings";
const ENCODING: &'static str = "application/json";
type Output<'de> = GetNowPlayingsOutput<'de>;
type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}
impl jacquard_common::xrpc::XrpcRequest for GetNowPlayings {
const NSID: &'static str = "app.rocksky.feed.getNowPlayings";
const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
type Response = GetNowPlayingsResponse;
}
pub struct GetNowPlayingsRequest;
impl jacquard_common::xrpc::XrpcEndpoint for GetNowPlayingsRequest {
const PATH: &'static str = "/xrpc/app.rocksky.feed.getNowPlayings";
const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
type Request<'de> = GetNowPlayings;
type Response = GetNowPlayingsResponse;
}
pub mod get_now_playings_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {}
#[allow(non_camel_case_types)]
pub mod members {}
}
pub struct GetNowPlayingsBuilder<S: get_now_playings_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (Option<i64>,),
}
impl GetNowPlayings {
pub fn new() -> GetNowPlayingsBuilder<get_now_playings_state::Empty> {
GetNowPlayingsBuilder::new()
}
}
impl GetNowPlayingsBuilder<get_now_playings_state::Empty> {
pub fn new() -> Self {
GetNowPlayingsBuilder {
_state: PhantomData,
_fields: (None,),
}
}
}
impl<S: get_now_playings_state::State> GetNowPlayingsBuilder<S> {
pub fn size(mut self, value: impl Into<Option<i64>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_size(mut self, value: Option<i64>) -> Self {
self._fields.0 = value;
self
}
}
impl<S> GetNowPlayingsBuilder<S>
where
S: get_now_playings_state::State,
{
pub fn build(self) -> GetNowPlayings {
GetNowPlayings {
size: self._fields.0,
}
}
}