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

AnchorPeer   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: peer/configuration.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
 * AnchorPeer message structure which provides information about anchor peer, it includes host name,
13
 * port number and peer certificate.
14
 *
15
 * Generated from protobuf message <code>protos.AnchorPeer</code>
16
 */
17
class AnchorPeer extends \Google\Protobuf\Internal\Message
18
{
19
    /**
20
     * DNS host name of the anchor peer
21
     *
22
     * Generated from protobuf field <code>string host = 1;</code>
23
     */
24
    private $host = '';
25
    /**
26
     * The port number
27
     *
28
     * Generated from protobuf field <code>int32 port = 2;</code>
29
     */
30
    private $port = 0;
31
32
    public function __construct() {
33
        \GPBMetadata\Peer\Configuration::initOnce();
34
        parent::__construct();
35
    }
36
37
    /**
38
     * DNS host name of the anchor peer
39
     *
40
     * Generated from protobuf field <code>string host = 1;</code>
41
     * @return string
42
     */
43
    public function getHost()
44
    {
45
        return $this->host;
46
    }
47
48
    /**
49
     * DNS host name of the anchor peer
50
     *
51
     * Generated from protobuf field <code>string host = 1;</code>
52
     * @param string $var
53
     * @return $this
54
     */
55
    public function setHost($var)
56
    {
57
        GPBUtil::checkString($var, True);
58
        $this->host = $var;
59
60
        return $this;
61
    }
62
63
    /**
64
     * The port number
65
     *
66
     * Generated from protobuf field <code>int32 port = 2;</code>
67
     * @return int
68
     */
69
    public function getPort()
70
    {
71
        return $this->port;
72
    }
73
74
    /**
75
     * The port number
76
     *
77
     * Generated from protobuf field <code>int32 port = 2;</code>
78
     * @param int $var
79
     * @return $this
80
     */
81
    public function setPort($var)
82
    {
83
        GPBUtil::checkInt32($var);
84
        $this->port = $var;
85
86
        return $this;
87
    }
88
89
}
90
91