Passed
Pull Request — master (#3)
by Timothy
11:06 queued 05:35
created

TransactionAction   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 73
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
c 1
b 1
f 1
dl 0
loc 73
rs 10
wmc 5
1
<?php
2
# Generated by the protocol buffer compiler.  DO NOT EDIT!
3
# source: peer/transaction.proto
4
5
namespace Hyperledger\Fabric\Protos\Peer;
6
7
use Google\Protobuf\Internal\GPBType;
8
use Google\Protobuf\Internal\RepeatedField;
9
use Google\Protobuf\Internal\GPBUtil;
10
11
/**
12
 * TransactionAction binds a proposal to its action.  The type field in the
13
 * header dictates the type of action to be applied to the ledger.
14
 *
15
 * Generated from protobuf message <code>protos.TransactionAction</code>
16
 */
17
class TransactionAction extends \Google\Protobuf\Internal\Message
18
{
19
    /**
20
     * The header of the proposal action, which is the proposal header
21
     *
22
     * Generated from protobuf field <code>bytes header = 1;</code>
23
     */
24
    private $header = '';
25
    /**
26
     * The payload of the action as defined by the type in the header For
27
     * chaincode, it's the bytes of ChaincodeActionPayload
28
     *
29
     * Generated from protobuf field <code>bytes payload = 2;</code>
30
     */
31
    private $payload = '';
32
33
    public function __construct() {
34
        \GPBMetadata\Peer\Transaction::initOnce();
35
        parent::__construct();
36
    }
37
38
    /**
39
     * The header of the proposal action, which is the proposal header
40
     *
41
     * Generated from protobuf field <code>bytes header = 1;</code>
42
     * @return string
43
     */
44
    public function getHeader()
45
    {
46
        return $this->header;
47
    }
48
49
    /**
50
     * The header of the proposal action, which is the proposal header
51
     *
52
     * Generated from protobuf field <code>bytes header = 1;</code>
53
     * @param string $var
54
     * @return $this
55
     */
56
    public function setHeader($var)
57
    {
58
        GPBUtil::checkString($var, False);
59
        $this->header = $var;
60
61
        return $this;
62
    }
63
64
    /**
65
     * The payload of the action as defined by the type in the header For
66
     * chaincode, it's the bytes of ChaincodeActionPayload
67
     *
68
     * Generated from protobuf field <code>bytes payload = 2;</code>
69
     * @return string
70
     */
71
    public function getPayload()
72
    {
73
        return $this->payload;
74
    }
75
76
    /**
77
     * The payload of the action as defined by the type in the header For
78
     * chaincode, it's the bytes of ChaincodeActionPayload
79
     *
80
     * Generated from protobuf field <code>bytes payload = 2;</code>
81
     * @param string $var
82
     * @return $this
83
     */
84
    public function setPayload($var)
85
    {
86
        GPBUtil::checkString($var, False);
87
        $this->payload = $var;
88
89
        return $this;
90
    }
91
92
}
93
94