Passed
Pull Request — master (#3)
by Timothy
06:14
created

Endorsement   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/proposal_response.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
 * An endorsement is a signature of an endorser over a proposal response.  By
13
 * producing an endorsement message, an endorser implicitly "approves" that
14
 * proposal response and the actions contained therein. When enough
15
 * endorsements have been collected, a transaction can be generated out of a
16
 * set of proposal responses.  Note that this message only contains an identity
17
 * and a signature but no signed payload. This is intentional because
18
 * endorsements are supposed to be collected in a transaction, and they are all
19
 * expected to endorse a single proposal response/action (many endorsements
20
 * over a single proposal response)
21
 *
22
 * Generated from protobuf message <code>protos.Endorsement</code>
23
 */
24
class Endorsement extends \Google\Protobuf\Internal\Message
25
{
26
    /**
27
     * Identity of the endorser (e.g. its certificate)
28
     *
29
     * Generated from protobuf field <code>bytes endorser = 1;</code>
30
     */
31
    private $endorser = '';
32
    /**
33
     * Signature of the payload included in ProposalResponse concatenated with
34
     * the endorser's certificate; ie, sign(ProposalResponse.payload + endorser)
35
     *
36
     * Generated from protobuf field <code>bytes signature = 2;</code>
37
     */
38
    private $signature = '';
39
40
    public function __construct() {
41
        \GPBMetadata\Peer\ProposalResponse::initOnce();
42
        parent::__construct();
43
    }
44
45
    /**
46
     * Identity of the endorser (e.g. its certificate)
47
     *
48
     * Generated from protobuf field <code>bytes endorser = 1;</code>
49
     * @return string
50
     */
51
    public function getEndorser()
52
    {
53
        return $this->endorser;
54
    }
55
56
    /**
57
     * Identity of the endorser (e.g. its certificate)
58
     *
59
     * Generated from protobuf field <code>bytes endorser = 1;</code>
60
     * @param string $var
61
     * @return $this
62
     */
63
    public function setEndorser($var)
64
    {
65
        GPBUtil::checkString($var, False);
66
        $this->endorser = $var;
67
68
        return $this;
69
    }
70
71
    /**
72
     * Signature of the payload included in ProposalResponse concatenated with
73
     * the endorser's certificate; ie, sign(ProposalResponse.payload + endorser)
74
     *
75
     * Generated from protobuf field <code>bytes signature = 2;</code>
76
     * @return string
77
     */
78
    public function getSignature()
79
    {
80
        return $this->signature;
81
    }
82
83
    /**
84
     * Signature of the payload included in ProposalResponse concatenated with
85
     * the endorser's certificate; ie, sign(ProposalResponse.payload + endorser)
86
     *
87
     * Generated from protobuf field <code>bytes signature = 2;</code>
88
     * @param string $var
89
     * @return $this
90
     */
91
    public function setSignature($var)
92
    {
93
        GPBUtil::checkString($var, False);
94
        $this->signature = $var;
95
96
        return $this;
97
    }
98
99
}
100
101