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

MSPConfig   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: msp/msp_config.proto
4
5
namespace Hyperledger\Fabric\Protos\MSP;
6
7
use Google\Protobuf\Internal\GPBType;
8
use Google\Protobuf\Internal\RepeatedField;
9
use Google\Protobuf\Internal\GPBUtil;
10
11
/**
12
 * MSPConfig collects all the configuration information for
13
 * an MSP. The Config field should be unmarshalled in a way
14
 * that depends on the Type
15
 *
16
 * Generated from protobuf message <code>msp.MSPConfig</code>
17
 */
18
class MSPConfig extends \Google\Protobuf\Internal\Message
19
{
20
    /**
21
     * Type holds the type of the MSP; the default one would
22
     * be of type FABRIC implementing an X.509 based provider
23
     *
24
     * Generated from protobuf field <code>int32 type = 1;</code>
25
     */
26
    private $type = 0;
27
    /**
28
     * Config is MSP dependent configuration info
29
     *
30
     * Generated from protobuf field <code>bytes config = 2;</code>
31
     */
32
    private $config = '';
33
34
    public function __construct() {
35
        \GPBMetadata\Msp\MspConfig::initOnce();
36
        parent::__construct();
37
    }
38
39
    /**
40
     * Type holds the type of the MSP; the default one would
41
     * be of type FABRIC implementing an X.509 based provider
42
     *
43
     * Generated from protobuf field <code>int32 type = 1;</code>
44
     * @return int
45
     */
46
    public function getType()
47
    {
48
        return $this->type;
49
    }
50
51
    /**
52
     * Type holds the type of the MSP; the default one would
53
     * be of type FABRIC implementing an X.509 based provider
54
     *
55
     * Generated from protobuf field <code>int32 type = 1;</code>
56
     * @param int $var
57
     * @return $this
58
     */
59
    public function setType($var)
60
    {
61
        GPBUtil::checkInt32($var);
62
        $this->type = $var;
63
64
        return $this;
65
    }
66
67
    /**
68
     * Config is MSP dependent configuration info
69
     *
70
     * Generated from protobuf field <code>bytes config = 2;</code>
71
     * @return string
72
     */
73
    public function getConfig()
74
    {
75
        return $this->config;
76
    }
77
78
    /**
79
     * Config is MSP dependent configuration info
80
     *
81
     * Generated from protobuf field <code>bytes config = 2;</code>
82
     * @param string $var
83
     * @return $this
84
     */
85
    public function setConfig($var)
86
    {
87
        GPBUtil::checkString($var, False);
88
        $this->config = $var;
89
90
        return $this;
91
    }
92
93
}
94
95