aptos_client_icp/models/write_set_change_delete_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 WriteSetChangeDeleteResource {
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 /// String representation of a MoveStructTag (on-chain Move struct type). This exists so you can specify MoveStructTags as path / query parameters, e.g. for get_events_by_event_handle. It is a combination of: 1. `move_module_address`, `module_name` and `struct_name`, all joined by `::` 2. `struct generic type parameters` joined by `, ` Examples: * `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>` * `0x1::account::Account` Note: 1. Empty chars should be ignored when comparing 2 struct tag ids. 2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding). See [doc](https://aptos.dev/concepts/accounts) for more details.
23 #[serde(rename = "resource")]
24 pub resource: String,
25 #[serde(rename = "type")]
26 pub r#type: Type,
27}
28
29impl WriteSetChangeDeleteResource {
30 pub fn new(address: String, state_key_hash: String, resource: String, r#type: Type) -> WriteSetChangeDeleteResource {
31 WriteSetChangeDeleteResource {
32 address,
33 state_key_hash,
34 resource,
35 r#type,
36 }
37 }
38}
39///
40#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
41pub enum Type {
42 #[serde(rename = "delete_resource")]
43 DeleteResource,
44}
45
46impl Default for Type {
47 fn default() -> Type {
48 Self::DeleteResource
49 }
50}
51