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

ChaincodeQueryResponse   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
c 1
b 1
f 1
dl 0
loc 32
rs 10
wmc 3
1
<?php
2
# Generated by the protocol buffer compiler.  DO NOT EDIT!
3
# source: peer/query.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
 * ChaincodeQueryResponse returns information about each chaincode that pertains
13
 * to a query in lscc.go, such as GetChaincodes (returns all chaincodes
14
 * instantiated on a channel), and GetInstalledChaincodes (returns all chaincodes
15
 * installed on a peer)
16
 *
17
 * Generated from protobuf message <code>protos.ChaincodeQueryResponse</code>
18
 */
19
class ChaincodeQueryResponse extends \Google\Protobuf\Internal\Message
20
{
21
    /**
22
     * Generated from protobuf field <code>repeated .protos.ChaincodeInfo chaincodes = 1;</code>
23
     */
24
    private $chaincodes;
25
26
    public function __construct() {
27
        \GPBMetadata\Peer\Query::initOnce();
28
        parent::__construct();
29
    }
30
31
    /**
32
     * Generated from protobuf field <code>repeated .protos.ChaincodeInfo chaincodes = 1;</code>
33
     * @return \Google\Protobuf\Internal\RepeatedField
34
     */
35
    public function getChaincodes()
36
    {
37
        return $this->chaincodes;
38
    }
39
40
    /**
41
     * Generated from protobuf field <code>repeated .protos.ChaincodeInfo chaincodes = 1;</code>
42
     * @param \Hyperledger\Fabric\Protos\Peer\ChaincodeInfo[]|\Google\Protobuf\Internal\RepeatedField $var
43
     * @return $this
44
     */
45
    public function setChaincodes($var)
46
    {
47
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Hyperledger\Fabric\Protos\Peer\ChaincodeInfo::class);
48
        $this->chaincodes = $arr;
49
50
        return $this;
51
    }
52
53
}
54
55