canton_api_client/models/
get_active_contracts_request.rs

1/*
2 * JSON Ledger API HTTP endpoints
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 3.3.0-SNAPSHOT
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// GetActiveContractsRequest : If the given offset is different than the ledger end, and there are (un)assignments in-flight at the given offset, the snapshot may fail with \"FAILED_PRECONDITION/PARTICIPANT_PRUNED_DATA_ACCESSED\". Note that it is ok to request acs snapshots for party migration with offsets other than ledger end, because party migration is not concerned with incomplete (un)assignments.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GetActiveContractsRequest {
17    #[serde(rename = "filter", skip_serializing_if = "Option::is_none")]
18    pub filter: Option<Box<models::TransactionFilter>>,
19    /// Provided for backwards compatibility, it will be removed in the Canton version 3.4.0. If enabled, values served over the API will contain more information than strictly necessary to interpret the data. In particular, setting the verbose flag to true triggers the ledger to include labels for record fields. Optional, if specified event_format must be unset.
20    #[serde(rename = "verbose")]
21    pub verbose: bool,
22    /// The offset at which the snapshot of the active contracts will be computed. Must be no greater than the current ledger end offset. Must be greater than or equal to the last pruning offset. Required, must be a valid absolute offset (positive integer) or ledger begin offset (zero). If zero, the empty set will be returned.
23    #[serde(rename = "activeAtOffset")]
24    pub active_at_offset: i64,
25    #[serde(rename = "eventFormat", skip_serializing_if = "Option::is_none")]
26    pub event_format: Option<Box<models::EventFormat>>,
27}
28
29impl GetActiveContractsRequest {
30    /// If the given offset is different than the ledger end, and there are (un)assignments in-flight at the given offset, the snapshot may fail with \"FAILED_PRECONDITION/PARTICIPANT_PRUNED_DATA_ACCESSED\". Note that it is ok to request acs snapshots for party migration with offsets other than ledger end, because party migration is not concerned with incomplete (un)assignments.
31    pub fn new(verbose: bool, active_at_offset: i64) -> GetActiveContractsRequest {
32        GetActiveContractsRequest {
33            filter: None,
34            verbose,
35            active_at_offset,
36            event_format: None,
37        }
38    }
39}
40