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

PeerEndpoint   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
c 1
b 1
f 1
dl 0
loc 58
rs 10
wmc 5
1
<?php
2
# Generated by the protocol buffer compiler.  DO NOT EDIT!
3
# source: peer/peer.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
 * Generated from protobuf message <code>protos.PeerEndpoint</code>
13
 */
14
class PeerEndpoint extends \Google\Protobuf\Internal\Message
15
{
16
    /**
17
     * Generated from protobuf field <code>.protos.PeerID id = 1;</code>
18
     */
19
    private $id = null;
20
    /**
21
     * Generated from protobuf field <code>string address = 2;</code>
22
     */
23
    private $address = '';
24
25
    public function __construct() {
26
        \GPBMetadata\Peer\Peer::initOnce();
27
        parent::__construct();
28
    }
29
30
    /**
31
     * Generated from protobuf field <code>.protos.PeerID id = 1;</code>
32
     * @return \Hyperledger\Fabric\Protos\Peer\PeerID
33
     */
34
    public function getId()
35
    {
36
        return $this->id;
37
    }
38
39
    /**
40
     * Generated from protobuf field <code>.protos.PeerID id = 1;</code>
41
     * @param \Hyperledger\Fabric\Protos\Peer\PeerID $var
42
     * @return $this
43
     */
44
    public function setId($var)
45
    {
46
        GPBUtil::checkMessage($var, \Hyperledger\Fabric\Protos\Peer\PeerID::class);
47
        $this->id = $var;
48
49
        return $this;
50
    }
51
52
    /**
53
     * Generated from protobuf field <code>string address = 2;</code>
54
     * @return string
55
     */
56
    public function getAddress()
57
    {
58
        return $this->address;
59
    }
60
61
    /**
62
     * Generated from protobuf field <code>string address = 2;</code>
63
     * @param string $var
64
     * @return $this
65
     */
66
    public function setAddress($var)
67
    {
68
        GPBUtil::checkString($var, True);
69
        $this->address = $var;
70
71
        return $this;
72
    }
73
74
}
75
76