atrium_api/tools/ozone/verification/
grant_verifications.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `tools.ozone.verification.grantVerifications` namespace.
3pub const NSID: &str = "tools.ozone.verification.grantVerifications";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct InputData {
7    ///Array of verification requests to process
8    pub verifications: Vec<VerificationInput>,
9}
10pub type Input = crate::types::Object<InputData>;
11#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
12#[serde(rename_all = "camelCase")]
13pub struct OutputData {
14    pub failed_verifications: Vec<GrantError>,
15    pub verifications: Vec<crate::tools::ozone::verification::defs::VerificationView>,
16}
17pub type Output = crate::types::Object<OutputData>;
18#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
19#[serde(tag = "error", content = "message")]
20pub enum Error {}
21impl std::fmt::Display for Error {
22    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
23        Ok(())
24    }
25}
26///Error object for failed verifications.
27#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
28#[serde(rename_all = "camelCase")]
29pub struct GrantErrorData {
30    ///Error message describing the reason for failure.
31    pub error: String,
32    ///The did of the subject being verified
33    pub subject: crate::types::string::Did,
34}
35pub type GrantError = crate::types::Object<GrantErrorData>;
36#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
37#[serde(rename_all = "camelCase")]
38pub struct VerificationInputData {
39    ///Timestamp for verification record. Defaults to current time when not specified.
40    #[serde(skip_serializing_if = "core::option::Option::is_none")]
41    pub created_at: core::option::Option<String>,
42    ///Display name of the subject the verification applies to at the moment of verifying.
43    pub display_name: String,
44    ///Handle of the subject the verification applies to at the moment of verifying.
45    pub handle: crate::types::string::Handle,
46    ///The did of the subject being verified
47    pub subject: crate::types::string::Did,
48}
49pub type VerificationInput = crate::types::Object<VerificationInputData>;