Skip to main content

dfns_sdk_rust/allocations/
types.rs

1// Code generated by rust-sdk-generator. DO NOT EDIT.
2
3#![allow(clippy::all)]
4
5/// List Allocations
6#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
7pub struct ListAllocationsResponse {
8    #[serde(rename = "items")]
9    pub items: Vec<crate::types::Allocation>,
10    #[serde(
11        rename = "nextPageToken",
12        default,
13        skip_serializing_if = "Option::is_none"
14    )]
15    pub next_page_token: Option<String>,
16}
17
18/// Query parameters for the ListAllocationsQuery operation.
19#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
20pub struct ListAllocationsQuery {
21    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
22    pub limit: Option<i64>,
23    #[serde(
24        rename = "paginationToken",
25        default,
26        skip_serializing_if = "Option::is_none"
27    )]
28    pub pagination_token: Option<String>,
29}
30
31/// Request body for the createAllocation operation.
32pub type CreateAllocationRequest = serde_json::Value;
33
34/// Create Allocation
35#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
36pub struct CreateAllocationResponse {
37    #[serde(rename = "id")]
38    pub id: String,
39    #[serde(rename = "walletId")]
40    pub wallet_id: String,
41    #[serde(rename = "protocol")]
42    pub protocol: String,
43    #[serde(rename = "provider", default, skip_serializing_if = "Option::is_none")]
44    pub provider: Option<String>,
45    #[serde(rename = "amount")]
46    pub amount: serde_json::Value,
47    #[serde(rename = "rewards")]
48    pub rewards: serde_json::Value,
49    #[serde(rename = "dateCreated")]
50    pub date_created: String,
51    #[serde(rename = "actions")]
52    pub actions: Vec<crate::types::AllocationAction>,
53}
54
55/// List Allocation Actions
56#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
57pub struct ListAllocationActionsResponse {
58    #[serde(rename = "items")]
59    pub items: Vec<crate::types::AllocationAction>,
60    #[serde(
61        rename = "nextPageToken",
62        default,
63        skip_serializing_if = "Option::is_none"
64    )]
65    pub next_page_token: Option<String>,
66}
67
68/// Query parameters for the ListAllocationActionsQuery operation.
69#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
70pub struct ListAllocationActionsQuery {
71    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
72    pub limit: Option<i64>,
73    #[serde(
74        rename = "paginationToken",
75        default,
76        skip_serializing_if = "Option::is_none"
77    )]
78    pub pagination_token: Option<String>,
79}
80
81/// Request body for the createAllocationAction operation.
82pub type CreateAllocationActionRequest = serde_json::Value;
83
84/// Create Allocation Action
85#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
86pub struct CreateAllocationActionResponse {
87    #[serde(rename = "id")]
88    pub id: String,
89    #[serde(rename = "walletId")]
90    pub wallet_id: String,
91    #[serde(rename = "protocol")]
92    pub protocol: String,
93    #[serde(rename = "provider", default, skip_serializing_if = "Option::is_none")]
94    pub provider: Option<String>,
95    #[serde(rename = "amount")]
96    pub amount: serde_json::Value,
97    #[serde(rename = "rewards")]
98    pub rewards: serde_json::Value,
99    #[serde(rename = "dateCreated")]
100    pub date_created: String,
101    #[serde(rename = "actions")]
102    pub actions: Vec<crate::types::AllocationAction>,
103}
104
105/// Get Allocation
106#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
107pub struct GetAllocationResponse {
108    #[serde(rename = "id")]
109    pub id: String,
110    #[serde(rename = "walletId")]
111    pub wallet_id: String,
112    #[serde(rename = "protocol")]
113    pub protocol: String,
114    #[serde(rename = "provider", default, skip_serializing_if = "Option::is_none")]
115    pub provider: Option<String>,
116    #[serde(rename = "amount")]
117    pub amount: serde_json::Value,
118    #[serde(rename = "rewards")]
119    pub rewards: serde_json::Value,
120    #[serde(rename = "dateCreated")]
121    pub date_created: String,
122    #[serde(rename = "actions")]
123    pub actions: Vec<crate::types::AllocationAction>,
124}
125
126/// Get Allocations Info
127#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
128pub struct GetAllocationsInfoResponse {
129    #[serde(rename = "0fns", default, skip_serializing_if = "Option::is_none")]
130    pub n0fns: Option<serde_json::Value>,
131    #[serde(rename = "SkySusds", default, skip_serializing_if = "Option::is_none")]
132    pub sky_susds: Option<serde_json::Value>,
133    #[serde(
134        rename = "GauntletUsdcPrime",
135        default,
136        skip_serializing_if = "Option::is_none"
137    )]
138    pub gauntlet_usdc_prime: Option<serde_json::Value>,
139    #[serde(
140        rename = "SteakhouseUsdt",
141        default,
142        skip_serializing_if = "Option::is_none"
143    )]
144    pub steakhouse_usdt: Option<serde_json::Value>,
145    #[serde(
146        rename = "GauntletUsdcPrimeBase",
147        default,
148        skip_serializing_if = "Option::is_none"
149    )]
150    pub gauntlet_usdc_prime_base: Option<serde_json::Value>,
151    #[serde(
152        rename = "SteakhouseUsdcBase",
153        default,
154        skip_serializing_if = "Option::is_none"
155    )]
156    pub steakhouse_usdc_base: Option<serde_json::Value>,
157    #[serde(
158        rename = "SentoraPyusdMain",
159        default,
160        skip_serializing_if = "Option::is_none"
161    )]
162    pub sentora_pyusd_main: Option<serde_json::Value>,
163}