forked from hiero-ledger/hiero-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 1
/
file_delete_transaction.go
56 lines (42 loc) · 1.9 KB
/
file_delete_transaction.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package hedera
import (
"github.com/hashgraph/hedera-sdk-go/proto"
"time"
)
type FileDeleteTransaction struct {
TransactionBuilder
pb *proto.FileDeleteTransactionBody
}
func NewFileDeleteTransaction() FileDeleteTransaction {
pb := &proto.FileDeleteTransactionBody{}
inner := newTransactionBuilder()
inner.pb.Data = &proto.TransactionBody_FileDelete{FileDelete: pb}
builder := FileDeleteTransaction{inner, pb}
return builder
}
func (builder FileDeleteTransaction) SetFileID(id FileID) FileDeleteTransaction {
builder.pb.FileID = id.toProto()
return builder
}
func (builder FileDeleteTransaction) Build(client *Client) (Transaction, error) {
return builder.TransactionBuilder.Build(client)
}
//
// The following _5_ must be copy-pasted at the bottom of **every** _transaction.go file
// We override the embedded fluent setter methods to return the outer type
//
func (builder FileDeleteTransaction) SetMaxTransactionFee(maxTransactionFee Hbar) FileDeleteTransaction {
return FileDeleteTransaction{builder.TransactionBuilder.SetMaxTransactionFee(maxTransactionFee), builder.pb}
}
func (builder FileDeleteTransaction) SetTransactionMemo(memo string) FileDeleteTransaction {
return FileDeleteTransaction{builder.TransactionBuilder.SetTransactionMemo(memo), builder.pb}
}
func (builder FileDeleteTransaction) SetTransactionValidDuration(validDuration time.Duration) FileDeleteTransaction {
return FileDeleteTransaction{builder.TransactionBuilder.SetTransactionValidDuration(validDuration), builder.pb}
}
func (builder FileDeleteTransaction) SetTransactionID(transactionID TransactionID) FileDeleteTransaction {
return FileDeleteTransaction{builder.TransactionBuilder.SetTransactionID(transactionID), builder.pb}
}
func (builder FileDeleteTransaction) SetNodeAccountID(nodeAccountID AccountID) FileDeleteTransaction {
return FileDeleteTransaction{builder.TransactionBuilder.SetNodeAccountID(nodeAccountID), builder.pb}
}