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 Stakes
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct ListStakesResponse {
    #[serde(rename = "items")]
    pub items: Vec<serde_json::Value>,
    #[serde(
        rename = "nextPageToken",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub next_page_token: Option<String>,
}

/// Query parameters for the ListStakesQuery operation.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct ListStakesQuery {
    #[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>,
}

/// Create Stake
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct CreateStakeRequest {
    #[serde(
        rename = "externalId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub external_id: Option<String>,
}

/// Create Stake
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct CreateStakeResponse {
    #[serde(rename = "actions")]
    pub actions: Vec<crate::types::StakeAction>,
}

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

/// Query parameters for the ListStakeActionsQuery operation.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct ListStakeActionsQuery {
    #[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>,
}

/// Create Stake Action
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct CreateStakeActionRequest {
    #[serde(
        rename = "externalId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub external_id: Option<String>,
}

/// Create Stake Action
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct CreateStakeActionResponse {
    #[serde(rename = "actions")]
    pub actions: Vec<crate::types::StakeAction>,
}

/// Get Stakes
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct GetStakesResponse {
    #[serde(rename = "actions")]
    pub actions: Vec<crate::types::StakeAction>,
}

/// Query parameters for the GetStakesQuery operation.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct GetStakesQuery {
    #[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>,
}

/// Get Stake Rewards
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct GetStakeRewardsResponse {
    #[serde(rename = "symbol")]
    pub symbol: String,
    #[serde(rename = "balance")]
    pub balance: String,
}