Skip to main content

ark_rest/models/
get_intent_response.rs

1/*
2 * Ark API
3 *
4 * Combined Ark Service, Indexer, Admin, Signer Manager, and Wallet API
5 *
6 * The version of the OpenAPI document: 1.0.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::Deserialize;
13use serde::Serialize;
14
15/// GetIntentResponse : The repeated intents field is always populated with the matching results.
16/// The singular intent field is only set for backward compatibility when the request uses the txid
17/// filter, in which case it mirrors intents[0].
18#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
19pub struct GetIntentResponse {
20    #[serde(rename = "intent", skip_serializing_if = "Option::is_none")]
21    pub intent: Option<models::Intent>,
22    #[serde(rename = "intents", skip_serializing_if = "Option::is_none")]
23    pub intents: Option<Vec<models::Intent>>,
24}
25
26impl GetIntentResponse {
27    /// The repeated intents field is always populated with the matching results. The singular
28    /// intent field is only set for backward compatibility when the request uses the txid filter,
29    /// in which case it mirrors intents[0].
30    pub fn new() -> GetIntentResponse {
31        GetIntentResponse {
32            intent: None,
33            intents: None,
34        }
35    }
36}