photon_api/models/
account_with_optional_token_data_v2.rs

1/*
2 * photon-indexer
3 *
4 * Solana indexer for general compression
5 *
6 * The version of the OpenAPI document: 0.50.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct AccountWithOptionalTokenDataV2 {
15    #[serde(rename = "account")]
16    pub account: Box<models::AccountV2>,
17    #[serde(rename = "optionalTokenData", skip_serializing_if = "Option::is_none")]
18    pub optional_token_data: Option<Box<models::TokenData>>,
19}
20
21impl AccountWithOptionalTokenDataV2 {
22    pub fn new(account: models::AccountV2) -> AccountWithOptionalTokenDataV2 {
23        AccountWithOptionalTokenDataV2 {
24            account: Box::new(account),
25            optional_token_data: None,
26        }
27    }
28}