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

ChaincodeID   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 105
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
c 1
b 1
f 1
dl 0
loc 105
rs 10
wmc 7
1
<?php
2
# Generated by the protocol buffer compiler.  DO NOT EDIT!
3
# source: peer/chaincode.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
 *ChaincodeID contains the path as specified by the deploy transaction
13
 *that created it as well as the hashCode that is generated by the
14
 *system for the path. From the user level (ie, CLI, REST API and so on)
15
 *deploy transaction is expected to provide the path and other requests
16
 *are expected to provide the hashCode. The other value will be ignored.
17
 *Internally, the structure could contain both values. For instance, the
18
 *hashCode will be set when first generated using the path
19
 *
20
 * Generated from protobuf message <code>protos.ChaincodeID</code>
21
 */
22
class ChaincodeID extends \Google\Protobuf\Internal\Message
23
{
24
    /**
25
     *deploy transaction will use the path
26
     *
27
     * Generated from protobuf field <code>string path = 1;</code>
28
     */
29
    private $path = '';
30
    /**
31
     *all other requests will use the name (really a hashcode) generated by
32
     *the deploy transaction
33
     *
34
     * Generated from protobuf field <code>string name = 2;</code>
35
     */
36
    private $name = '';
37
    /**
38
     *user friendly version name for the chaincode
39
     *
40
     * Generated from protobuf field <code>string version = 3;</code>
41
     */
42
    private $version = '';
43
44
    public function __construct() {
45
        \GPBMetadata\Peer\Chaincode::initOnce();
46
        parent::__construct();
47
    }
48
49
    /**
50
     *deploy transaction will use the path
51
     *
52
     * Generated from protobuf field <code>string path = 1;</code>
53
     * @return string
54
     */
55
    public function getPath()
56
    {
57
        return $this->path;
58
    }
59
60
    /**
61
     *deploy transaction will use the path
62
     *
63
     * Generated from protobuf field <code>string path = 1;</code>
64
     * @param string $var
65
     * @return $this
66
     */
67
    public function setPath($var)
68
    {
69
        GPBUtil::checkString($var, True);
70
        $this->path = $var;
71
72
        return $this;
73
    }
74
75
    /**
76
     *all other requests will use the name (really a hashcode) generated by
77
     *the deploy transaction
78
     *
79
     * Generated from protobuf field <code>string name = 2;</code>
80
     * @return string
81
     */
82
    public function getName()
83
    {
84
        return $this->name;
85
    }
86
87
    /**
88
     *all other requests will use the name (really a hashcode) generated by
89
     *the deploy transaction
90
     *
91
     * Generated from protobuf field <code>string name = 2;</code>
92
     * @param string $var
93
     * @return $this
94
     */
95
    public function setName($var)
96
    {
97
        GPBUtil::checkString($var, True);
98
        $this->name = $var;
99
100
        return $this;
101
    }
102
103
    /**
104
     *user friendly version name for the chaincode
105
     *
106
     * Generated from protobuf field <code>string version = 3;</code>
107
     * @return string
108
     */
109
    public function getVersion()
110
    {
111
        return $this->version;
112
    }
113
114
    /**
115
     *user friendly version name for the chaincode
116
     *
117
     * Generated from protobuf field <code>string version = 3;</code>
118
     * @param string $var
119
     * @return $this
120
     */
121
    public function setVersion($var)
122
    {
123
        GPBUtil::checkString($var, True);
124
        $this->version = $var;
125
126
        return $this;
127
    }
128
129
}
130
131