/*
* Sindri Labs API
*
* ## About [Sindri Labs](https://www.sindri.app/)' API simplifies the developer experience to enable fast and scalable zero-knowledge proof generation. Front-End Dashboard: [https://sindri.app/login](https://sindri.app/login) ## Documentation The [Sindri Documentation](https://sindri.app/docs) contains everything you need to get started! ## Sindri Resources The [sindri-resources GitHub repo](https://github.com/Sindri-Labs/sindri-resources) contains contains resources and sample data for the Sindri API. ## Using this Page This is a standard [OpenAPI (Swagger)](https://swagger.io/specification/) API documentation page. It provides detailed documentation for each endpoint. This page enables easy prototyping via the \"Try it out\" feature! Since all Sindri endpoints require a valid API Key, in order to use the \"Try it out\" feature for any endpoint in this documentation you must first obtain an API key. Do this in one of two ways: 1. Enter your username and password in the `/api/apikey/generate` endpoint of the **Authorization** section below. Use the API key returned in the `access` field of the response. 2. Obtain an API key from the Sindri Dashboard team \"Account Settings\". After obtaining your API key, authorize your page session by entering your API Key in the `SindriAPIKeyBearerAuth` section, reached by clicking \"Authorize\" below. Proving Backend Version: v1.2.17
*
* The version of the OpenAPI document: v1.17.28
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// ProofInfoResponse : Response for getting proof info.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ProofInfoResponse {
/// A unique identifier generated for the proof. UUID4 format.
#[serde(rename = "proof_id")]
pub proof_id: String,
#[serde(rename = "circuit_name")]
pub circuit_name: String,
/// The name of the project associated with this proof.
#[serde(rename = "project_name")]
pub project_name: String,
/// The circuit_id of the circuit associated with this proof. UUID4 format.
#[serde(rename = "circuit_id")]
pub circuit_id: String,
/// The development framework used to write the circuit. This is specified during creation in the included sindri.json file.
#[serde(rename = "circuit_type")]
pub circuit_type: models::CircuitType,
/// The UTC datetime the circuit was uploaded in ISO8601 format.
#[serde(rename = "date_created")]
pub date_created: String,
/// Metadata keys and values for the proof that were specified at creation time.
#[serde(rename = "meta")]
pub meta: std::collections::HashMap<String, String>,
/// A boolean indicating whether an internal verification check occurred during the proof creation.
#[serde(rename = "perform_verify")]
pub perform_verify: bool,
/// The status of the proof job.
#[serde(rename = "status")]
pub status: models::JobStatus,
/// The job is finished processing and waiting/polling can be terminated.
#[serde(rename = "finished_processing")]
pub finished_processing: bool,
#[serde(rename = "verified", deserialize_with = "Option::deserialize")]
pub verified: Option<bool>,
/// The name of the team that owns this proof.
#[serde(rename = "team")]
pub team: String,
/// URL for the avatar image of the team that owns this proof.
#[serde(rename = "team_avatar_url")]
pub team_avatar_url: String,
/// The name of the team that owns this proof.
#[serde(rename = "team_name")]
pub team_name: String,
/// The slug of the team that owns this proof.
#[serde(rename = "team_slug")]
pub team_slug: String,
/// The name of the team that owns the circuit associated with this proof.
#[serde(rename = "circuit_team")]
pub circuit_team: String,
/// URL for the avatar image of the team that owns the circuit associated with this proof.
#[serde(rename = "circuit_team_avatar_url")]
pub circuit_team_avatar_url: String,
/// The slug of the team that owns the circuit associated with this proof.
#[serde(rename = "circuit_team_slug")]
pub circuit_team_slug: String,
#[serde(
rename = "compute_time",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub compute_time: Option<Option<String>>,
#[serde(
rename = "compute_time_sec",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub compute_time_sec: Option<Option<f64>>,
/// Detailed compute times for the proof generation.
#[serde(
rename = "compute_times",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub compute_times: Option<Option<Box<models::AnyOfLessThanGreaterThan>>>,
#[serde(
rename = "file_size",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub file_size: Option<Option<i64>>,
#[serde(
rename = "proof",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub proof: Option<Option<serde_json::Value>>,
/// The public outputs of the circuit.
#[serde(
rename = "public",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub public: Option<Option<Box<models::AnyOfLessThanGreaterThan>>>,
#[serde(
rename = "queue_time",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub queue_time: Option<Option<String>>,
#[serde(
rename = "queue_time_sec",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub queue_time_sec: Option<Option<f64>>,
#[serde(
rename = "smart_contract_calldata",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub smart_contract_calldata: Option<Option<String>>,
/// Boolean indicating whether this proof has smart contract calldata available.
#[serde(
rename = "has_smart_contract_calldata",
skip_serializing_if = "Option::is_none"
)]
pub has_smart_contract_calldata: Option<bool>,
/// Boolean indicating whether this proof's circuit has a verification key available.
#[serde(
rename = "has_verification_key",
skip_serializing_if = "Option::is_none"
)]
pub has_verification_key: Option<bool>,
#[serde(
rename = "verification_key",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub verification_key: Option<Option<serde_json::Value>>,
#[serde(
rename = "warnings",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub warnings: Option<Option<Vec<String>>>,
#[serde(
rename = "error",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub error: Option<Option<String>>,
}
impl ProofInfoResponse {
/// Response for getting proof info.
pub fn new(
proof_id: String,
circuit_name: String,
project_name: String,
circuit_id: String,
circuit_type: models::CircuitType,
date_created: String,
meta: std::collections::HashMap<String, String>,
perform_verify: bool,
status: models::JobStatus,
finished_processing: bool,
verified: Option<bool>,
team: String,
team_avatar_url: String,
team_name: String,
team_slug: String,
circuit_team: String,
circuit_team_avatar_url: String,
circuit_team_slug: String,
) -> ProofInfoResponse {
ProofInfoResponse {
proof_id,
circuit_name,
project_name,
circuit_id,
circuit_type,
date_created,
meta,
perform_verify,
status,
finished_processing,
verified,
team,
team_avatar_url,
team_name,
team_slug,
circuit_team,
circuit_team_avatar_url,
circuit_team_slug,
compute_time: None,
compute_time_sec: None,
compute_times: None,
file_size: None,
proof: None,
public: None,
queue_time: None,
queue_time_sec: None,
smart_contract_calldata: None,
has_smart_contract_calldata: None,
has_verification_key: None,
verification_key: None,
warnings: None,
error: None,
}
}
}