// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: tools.ozone.verification.listVerifications // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ListVerifications<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub created_after: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub created_before: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub is_revoked: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub issuers: std::option::Option>>, ///(default: 50, min: 1, max: 100) #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, ///(default: "desc") #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub sort_direction: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub subjects: std::option::Option>>, } pub mod list_verifications_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed {} /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty {} /// Marker types for field names #[allow(non_camel_case_types)] pub mod members {} } /// Builder for constructing an instance of this type pub struct ListVerificationsBuilder<'a, S: list_verifications_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option, ::core::option::Option, ::core::option::Option>, ::core::option::Option, ::core::option::Option>>, ::core::option::Option, ::core::option::Option>, ::core::option::Option>>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> ListVerifications<'a> { /// Create a new builder for this type pub fn new() -> ListVerificationsBuilder<'a, list_verifications_state::Empty> { ListVerificationsBuilder::new() } } impl<'a> ListVerificationsBuilder<'a, list_verifications_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ListVerificationsBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None, None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: list_verifications_state::State> ListVerificationsBuilder<'a, S> { /// Set the `createdAfter` field (optional) pub fn created_after( mut self, value: impl Into>, ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `createdAfter` field to an Option value (optional) pub fn maybe_created_after( mut self, value: Option, ) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S: list_verifications_state::State> ListVerificationsBuilder<'a, S> { /// Set the `createdBefore` field (optional) pub fn created_before( mut self, value: impl Into>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `createdBefore` field to an Option value (optional) pub fn maybe_created_before( mut self, value: Option, ) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S: list_verifications_state::State> ListVerificationsBuilder<'a, S> { /// Set the `cursor` field (optional) pub fn cursor( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `cursor` field to an Option value (optional) pub fn maybe_cursor(mut self, value: Option>) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S: list_verifications_state::State> ListVerificationsBuilder<'a, S> { /// Set the `isRevoked` field (optional) pub fn is_revoked(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.3 = value.into(); self } /// Set the `isRevoked` field to an Option value (optional) pub fn maybe_is_revoked(mut self, value: Option) -> Self { self.__unsafe_private_named.3 = value; self } } impl<'a, S: list_verifications_state::State> ListVerificationsBuilder<'a, S> { /// Set the `issuers` field (optional) pub fn issuers( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.4 = value.into(); self } /// Set the `issuers` field to an Option value (optional) pub fn maybe_issuers( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.4 = value; self } } impl<'a, S: list_verifications_state::State> ListVerificationsBuilder<'a, S> { /// Set the `limit` field (optional) pub fn limit(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.5 = value.into(); self } /// Set the `limit` field to an Option value (optional) pub fn maybe_limit(mut self, value: Option) -> Self { self.__unsafe_private_named.5 = value; self } } impl<'a, S: list_verifications_state::State> ListVerificationsBuilder<'a, S> { /// Set the `sortDirection` field (optional) pub fn sort_direction( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.6 = value.into(); self } /// Set the `sortDirection` field to an Option value (optional) pub fn maybe_sort_direction( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.6 = value; self } } impl<'a, S: list_verifications_state::State> ListVerificationsBuilder<'a, S> { /// Set the `subjects` field (optional) pub fn subjects( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.7 = value.into(); self } /// Set the `subjects` field to an Option value (optional) pub fn maybe_subjects( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.7 = value; self } } impl<'a, S> ListVerificationsBuilder<'a, S> where S: list_verifications_state::State, { /// Build the final struct pub fn build(self) -> ListVerifications<'a> { ListVerifications { created_after: self.__unsafe_private_named.0, created_before: self.__unsafe_private_named.1, cursor: self.__unsafe_private_named.2, is_revoked: self.__unsafe_private_named.3, issuers: self.__unsafe_private_named.4, limit: self.__unsafe_private_named.5, sort_direction: self.__unsafe_private_named.6, subjects: self.__unsafe_private_named.7, } } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ListVerificationsOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, #[serde(borrow)] pub verifications: Vec>, } /// Response type for ///tools.ozone.verification.listVerifications pub struct ListVerificationsResponse; impl jacquard_common::xrpc::XrpcResp for ListVerificationsResponse { const NSID: &'static str = "tools.ozone.verification.listVerifications"; const ENCODING: &'static str = "application/json"; type Output<'de> = ListVerificationsOutput<'de>; type Err<'de> = jacquard_common::xrpc::GenericError<'de>; } impl<'a> jacquard_common::xrpc::XrpcRequest for ListVerifications<'a> { const NSID: &'static str = "tools.ozone.verification.listVerifications"; const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; type Response = ListVerificationsResponse; } /// Endpoint type for ///tools.ozone.verification.listVerifications pub struct ListVerificationsRequest; impl jacquard_common::xrpc::XrpcEndpoint for ListVerificationsRequest { const PATH: &'static str = "/xrpc/tools.ozone.verification.listVerifications"; const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; type Request<'de> = ListVerifications<'de>; type Response = ListVerificationsResponse; }