canton-api-client 3.3.0-0.1.1

Canton Ledger API rust client
Documentation
/*
 * JSON Ledger API HTTP endpoints
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 3.3.0-SNAPSHOT
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetLatestPrunedOffsetsResponse {
    /// It will always be a non-negative integer. If positive, the absolute offset up to which the ledger has been pruned, disregarding the state of all divulged contracts pruning. If zero, the ledger has not been pruned yet.
    #[serde(rename = "participantPrunedUpToInclusive")]
    pub participant_pruned_up_to_inclusive: i64,
    /// It will always be a non-negative integer. If positive, the absolute offset up to which all divulged events have been pruned on the ledger. It can be at or before the ``participant_pruned_up_to_inclusive`` offset. For more details about all divulged events pruning, see ``PruneRequest.prune_all_divulged_contracts`` in ``participant_pruning_service.proto``. If zero, the divulged events have not been pruned yet.
    #[serde(rename = "allDivulgedContractsPrunedUpToInclusive")]
    pub all_divulged_contracts_pruned_up_to_inclusive: i64,
}

impl GetLatestPrunedOffsetsResponse {
    pub fn new(participant_pruned_up_to_inclusive: i64, all_divulged_contracts_pruned_up_to_inclusive: i64) -> GetLatestPrunedOffsetsResponse {
        GetLatestPrunedOffsetsResponse {
            participant_pruned_up_to_inclusive,
            all_divulged_contracts_pruned_up_to_inclusive,
        }
    }
}