sindri_openapi/models/project_info_response.rs
1/*
2 * Sindri Labs API
3 *
4 * ## 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
5 *
6 * The version of the OpenAPI document: v1.17.28
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ProjectInfoResponse : Response for getting project info.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ProjectInfoResponse {
17 /// The UTC datetime the project was created in ISO8601 format.
18 #[serde(rename = "date_created")]
19 pub date_created: String,
20 /// Whether the project is public.
21 #[serde(rename = "is_public")]
22 pub is_public: bool,
23 /// Labels for the project.
24 #[serde(rename = "labels")]
25 pub labels: Vec<String>,
26 #[serde(
27 rename = "latest_circuit",
28 default,
29 with = "::serde_with::rust::double_option",
30 skip_serializing_if = "Option::is_none"
31 )]
32 pub latest_circuit: Option<Option<Box<models::ProjectLatestCircuitResponse>>>,
33 /// The name of the project.
34 #[serde(rename = "name")]
35 pub name: String,
36 #[serde(rename = "num_proofs", deserialize_with = "Option::deserialize")]
37 pub num_proofs: Option<i64>,
38 /// A unique identifier generated for the project. UUID4 format.
39 #[serde(rename = "project_id")]
40 pub project_id: String,
41 /// Tags for the project.
42 #[serde(rename = "tags")]
43 pub tags: Vec<String>,
44 /// The name of the team that owns this project.
45 #[serde(rename = "team")]
46 pub team: String,
47 /// URL for the avatar image of the team that owns this project.
48 #[serde(rename = "team_avatar_url")]
49 pub team_avatar_url: String,
50 /// The name of the team that owns this project.
51 #[serde(rename = "team_name")]
52 pub team_name: String,
53 /// The slug of the team that owns this project.
54 #[serde(rename = "team_slug")]
55 pub team_slug: String,
56}
57
58impl ProjectInfoResponse {
59 /// Response for getting project info.
60 pub fn new(
61 date_created: String,
62 is_public: bool,
63 labels: Vec<String>,
64 name: String,
65 num_proofs: Option<i64>,
66 project_id: String,
67 tags: Vec<String>,
68 team: String,
69 team_avatar_url: String,
70 team_name: String,
71 team_slug: String,
72 ) -> ProjectInfoResponse {
73 ProjectInfoResponse {
74 date_created,
75 is_public,
76 labels,
77 latest_circuit: None,
78 name,
79 num_proofs,
80 project_id,
81 tags,
82 team,
83 team_avatar_url,
84 team_name,
85 team_slug,
86 }
87 }
88}