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

Policy   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
c 1
b 1
f 1
dl 0
loc 64
rs 10
wmc 5
1
<?php
2
# Generated by the protocol buffer compiler.  DO NOT EDIT!
3
# source: common/policies.proto
4
5
namespace Hyperledger\Fabric\Protos\Common;
6
7
use Google\Protobuf\Internal\GPBType;
8
use Google\Protobuf\Internal\RepeatedField;
9
use Google\Protobuf\Internal\GPBUtil;
10
11
/**
12
 * Policy expresses a policy which the orderer can evaluate, because there has been some desire expressed to support
13
 * multiple policy engines, this is typed as a oneof for now
14
 *
15
 * Generated from protobuf message <code>common.Policy</code>
16
 */
17
class Policy extends \Google\Protobuf\Internal\Message
18
{
19
    /**
20
     * For outside implementors, consider the first 1000 types reserved, otherwise one of PolicyType
21
     *
22
     * Generated from protobuf field <code>int32 type = 1;</code>
23
     */
24
    private $type = 0;
25
    /**
26
     * Generated from protobuf field <code>bytes value = 2;</code>
27
     */
28
    private $value = '';
29
30
    public function __construct() {
31
        \GPBMetadata\Common\Policies::initOnce();
32
        parent::__construct();
33
    }
34
35
    /**
36
     * For outside implementors, consider the first 1000 types reserved, otherwise one of PolicyType
37
     *
38
     * Generated from protobuf field <code>int32 type = 1;</code>
39
     * @return int
40
     */
41
    public function getType()
42
    {
43
        return $this->type;
44
    }
45
46
    /**
47
     * For outside implementors, consider the first 1000 types reserved, otherwise one of PolicyType
48
     *
49
     * Generated from protobuf field <code>int32 type = 1;</code>
50
     * @param int $var
51
     * @return $this
52
     */
53
    public function setType($var)
54
    {
55
        GPBUtil::checkInt32($var);
56
        $this->type = $var;
57
58
        return $this;
59
    }
60
61
    /**
62
     * Generated from protobuf field <code>bytes value = 2;</code>
63
     * @return string
64
     */
65
    public function getValue()
66
    {
67
        return $this->value;
68
    }
69
70
    /**
71
     * Generated from protobuf field <code>bytes value = 2;</code>
72
     * @param string $var
73
     * @return $this
74
     */
75
    public function setValue($var)
76
    {
77
        GPBUtil::checkString($var, False);
78
        $this->value = $var;
79
80
        return $this;
81
    }
82
83
}
84
85