dfns-sdk-rust 0.2.0

Dfns API SDK for Rust
Documentation
// Code generated by rust-sdk-generator. DO NOT EDIT.

#![allow(clippy::all)]

/// List Allocations
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct ListAllocationsResponse {
    #[serde(rename = "items")]
    pub items: Vec<crate::types::Allocation>,
    #[serde(
        rename = "nextPageToken",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub next_page_token: Option<String>,
}

/// Query parameters for the ListAllocationsQuery operation.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct ListAllocationsQuery {
    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,
    #[serde(
        rename = "paginationToken",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub pagination_token: Option<String>,
}

/// Request body for the createAllocation operation.
pub type CreateAllocationRequest = serde_json::Value;

/// Create Allocation
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct CreateAllocationResponse {
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "walletId")]
    pub wallet_id: String,
    #[serde(rename = "protocol")]
    pub protocol: String,
    #[serde(rename = "provider", default, skip_serializing_if = "Option::is_none")]
    pub provider: Option<String>,
    #[serde(rename = "amount")]
    pub amount: serde_json::Value,
    #[serde(rename = "rewards")]
    pub rewards: serde_json::Value,
    #[serde(rename = "dateCreated")]
    pub date_created: String,
    #[serde(rename = "actions")]
    pub actions: Vec<crate::types::AllocationAction>,
}

/// List Allocation Actions
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct ListAllocationActionsResponse {
    #[serde(rename = "items")]
    pub items: Vec<crate::types::AllocationAction>,
    #[serde(
        rename = "nextPageToken",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub next_page_token: Option<String>,
}

/// Query parameters for the ListAllocationActionsQuery operation.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct ListAllocationActionsQuery {
    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,
    #[serde(
        rename = "paginationToken",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub pagination_token: Option<String>,
}

/// Request body for the createAllocationAction operation.
pub type CreateAllocationActionRequest = serde_json::Value;

/// Create Allocation Action
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct CreateAllocationActionResponse {
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "walletId")]
    pub wallet_id: String,
    #[serde(rename = "protocol")]
    pub protocol: String,
    #[serde(rename = "provider", default, skip_serializing_if = "Option::is_none")]
    pub provider: Option<String>,
    #[serde(rename = "amount")]
    pub amount: serde_json::Value,
    #[serde(rename = "rewards")]
    pub rewards: serde_json::Value,
    #[serde(rename = "dateCreated")]
    pub date_created: String,
    #[serde(rename = "actions")]
    pub actions: Vec<crate::types::AllocationAction>,
}

/// Get Allocation
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct GetAllocationResponse {
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "walletId")]
    pub wallet_id: String,
    #[serde(rename = "protocol")]
    pub protocol: String,
    #[serde(rename = "provider", default, skip_serializing_if = "Option::is_none")]
    pub provider: Option<String>,
    #[serde(rename = "amount")]
    pub amount: serde_json::Value,
    #[serde(rename = "rewards")]
    pub rewards: serde_json::Value,
    #[serde(rename = "dateCreated")]
    pub date_created: String,
    #[serde(rename = "actions")]
    pub actions: Vec<crate::types::AllocationAction>,
}

/// Get Allocations Info
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct GetAllocationsInfoResponse {
    #[serde(rename = "0fns", default, skip_serializing_if = "Option::is_none")]
    pub n0fns: Option<serde_json::Value>,
    #[serde(rename = "SkySusds", default, skip_serializing_if = "Option::is_none")]
    pub sky_susds: Option<serde_json::Value>,
    #[serde(
        rename = "GauntletUsdcPrime",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub gauntlet_usdc_prime: Option<serde_json::Value>,
    #[serde(
        rename = "SteakhouseUsdt",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub steakhouse_usdt: Option<serde_json::Value>,
    #[serde(
        rename = "GauntletUsdcPrimeBase",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub gauntlet_usdc_prime_base: Option<serde_json::Value>,
    #[serde(
        rename = "SteakhouseUsdcBase",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub steakhouse_usdc_base: Option<serde_json::Value>,
    #[serde(
        rename = "SentoraPyusdMain",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub sentora_pyusd_main: Option<serde_json::Value>,
}