canton_api_client/models/get_transaction_by_offset_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/// GetTransactionByOffsetRequest : Provided for backwards compatibility, it will be removed in the Canton version 3.4.0.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GetTransactionByOffsetRequest {
17 /// The offset of the transaction being looked up. Must be a valid absolute offset (positive integer). Required
18 #[serde(rename = "offset")]
19 pub offset: i64,
20 /// Provided for backwards compatibility, it will be removed in the Canton version 3.4.0. The parties whose events the client expects to see. Events that are not visible for the parties in this collection will not be present in the response. Each element must be a valid PartyIdString (as described in ``value.proto``). Must be set for GetTransactionTreeByOffset request. Optional for backwards compatibility for GetTransactionByOffset request: if defined transaction_format must be unset (falling back to defaults).
21 #[serde(rename = "requestingParties", skip_serializing_if = "Option::is_none")]
22 pub requesting_parties: Option<Vec<String>>,
23 #[serde(rename = "transactionFormat", skip_serializing_if = "Option::is_none")]
24 pub transaction_format: Option<Box<models::TransactionFormat>>,
25}
26
27impl GetTransactionByOffsetRequest {
28 /// Provided for backwards compatibility, it will be removed in the Canton version 3.4.0.
29 pub fn new(offset: i64) -> GetTransactionByOffsetRequest {
30 GetTransactionByOffsetRequest {
31 offset,
32 requesting_parties: None,
33 transaction_format: None,
34 }
35 }
36}
37