Skip to main content

aptos_client_icp/models/
write_set_change_write_resource.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 WriteSetChangeWriteResource {
16    /// A hex encoded 32 byte Aptos account address.  This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.  For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1. 
17    #[serde(rename = "address")]
18    pub address: String,
19    /// State key hash
20    #[serde(rename = "state_key_hash")]
21    pub state_key_hash: String,
22    #[serde(rename = "data")]
23    pub data: Box<models::MoveResource>,
24    #[serde(rename = "type")]
25    pub r#type: Type,
26}
27
28impl WriteSetChangeWriteResource {
29    pub fn new(address: String, state_key_hash: String, data: models::MoveResource, r#type: Type) -> WriteSetChangeWriteResource {
30        WriteSetChangeWriteResource {
31            address,
32            state_key_hash,
33            data: Box::new(data),
34            r#type,
35        }
36    }
37}
38/// 
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
40pub enum Type {
41    #[serde(rename = "write_resource")]
42    WriteResource,
43}
44
45impl Default for Type {
46    fn default() -> Type {
47        Self::WriteResource
48    }
49}
50