Skip to main content

aptos_client_icp/models/
write_set_change_delete_table_item.rs

1/*
2 * Aptos Node API
3 *
4 * The Aptos Node API is a RESTful API for client applications to interact with the Aptos blockchain.
5 *
6 * The version of the OpenAPI document: 1.2.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct WriteSetChangeDeleteTableItem {
16    #[serde(rename = "state_key_hash")]
17    pub state_key_hash: String,
18    /// All bytes (Vec<u8>) data is represented as hex-encoded string prefixed with `0x` and fulfilled with two hex digits per byte.  Unlike the `Address` type, HexEncodedBytes will not trim any zeros. 
19    #[serde(rename = "handle")]
20    pub handle: String,
21    /// All bytes (Vec<u8>) data is represented as hex-encoded string prefixed with `0x` and fulfilled with two hex digits per byte.  Unlike the `Address` type, HexEncodedBytes will not trim any zeros. 
22    #[serde(rename = "key")]
23    pub key: String,
24    #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
25    pub data: Option<Box<models::DeletedTableData>>,
26    #[serde(rename = "type")]
27    pub r#type: Type,
28}
29
30impl WriteSetChangeDeleteTableItem {
31    pub fn new(state_key_hash: String, handle: String, key: String, r#type: Type) -> WriteSetChangeDeleteTableItem {
32        WriteSetChangeDeleteTableItem {
33            state_key_hash,
34            handle,
35            key,
36            data: None,
37            r#type,
38        }
39    }
40}
41/// 
42#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
43pub enum Type {
44    #[serde(rename = "delete_table_item")]
45    DeleteTableItem,
46}
47
48impl Default for Type {
49    fn default() -> Type {
50        Self::DeleteTableItem
51    }
52}
53