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

Envelope   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 70
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
c 1
b 1
f 1
dl 0
loc 70
rs 10
wmc 5
1
<?php
2
# Generated by the protocol buffer compiler.  DO NOT EDIT!
3
# source: common/common.proto
4
5
namespace Hyperledger\Fabric\Protos\Common;
6
7
use Google\Protobuf\Internal\GPBType;
8
use Google\Protobuf\Internal\RepeatedField;
9
use Google\Protobuf\Internal\GPBUtil;
10
11
/**
12
 * Envelope wraps a Payload with a signature so that the message may be authenticated
13
 *
14
 * Generated from protobuf message <code>common.Envelope</code>
15
 */
16
class Envelope extends \Google\Protobuf\Internal\Message
17
{
18
    /**
19
     * A marshaled Payload
20
     *
21
     * Generated from protobuf field <code>bytes payload = 1;</code>
22
     */
23
    private $payload = '';
24
    /**
25
     * A signature by the creator specified in the Payload header
26
     *
27
     * Generated from protobuf field <code>bytes signature = 2;</code>
28
     */
29
    private $signature = '';
30
31
    public function __construct() {
32
        \GPBMetadata\Common\Common::initOnce();
33
        parent::__construct();
34
    }
35
36
    /**
37
     * A marshaled Payload
38
     *
39
     * Generated from protobuf field <code>bytes payload = 1;</code>
40
     * @return string
41
     */
42
    public function getPayload()
43
    {
44
        return $this->payload;
45
    }
46
47
    /**
48
     * A marshaled Payload
49
     *
50
     * Generated from protobuf field <code>bytes payload = 1;</code>
51
     * @param string $var
52
     * @return $this
53
     */
54
    public function setPayload($var)
55
    {
56
        GPBUtil::checkString($var, False);
57
        $this->payload = $var;
58
59
        return $this;
60
    }
61
62
    /**
63
     * A signature by the creator specified in the Payload header
64
     *
65
     * Generated from protobuf field <code>bytes signature = 2;</code>
66
     * @return string
67
     */
68
    public function getSignature()
69
    {
70
        return $this->signature;
71
    }
72
73
    /**
74
     * A signature by the creator specified in the Payload header
75
     *
76
     * Generated from protobuf field <code>bytes signature = 2;</code>
77
     * @param string $var
78
     * @return $this
79
     */
80
    public function setSignature($var)
81
    {
82
        GPBUtil::checkString($var, False);
83
        $this->signature = $var;
84
85
        return $this;
86
    }
87
88
}
89
90