|
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
|
|
|
* ImplicitMetaPolicy is a policy type which depends on the hierarchical nature of the configuration |
|
13
|
|
|
* It is implicit because the rule is generate implicitly based on the number of sub policies |
|
14
|
|
|
* It is meta because it depends only on the result of other policies |
|
15
|
|
|
* When evaluated, this policy iterates over all immediate child sub-groups, retrieves the policy |
|
16
|
|
|
* of name sub_policy, evaluates the collection and applies the rule. |
|
17
|
|
|
* For example, with 4 sub-groups, and a policy name of "foo", ImplicitMetaPolicy retrieves |
|
18
|
|
|
* each sub-group, retrieves policy "foo" for each subgroup, evaluates it, and, in the case of ANY |
|
19
|
|
|
* 1 satisfied is sufficient, ALL would require 4 signatures, and MAJORITY would require 3 signatures. |
|
20
|
|
|
* |
|
21
|
|
|
* Generated from protobuf message <code>common.ImplicitMetaPolicy</code> |
|
22
|
|
|
*/ |
|
23
|
|
|
class ImplicitMetaPolicy extends \Google\Protobuf\Internal\Message |
|
24
|
|
|
{ |
|
25
|
|
|
/** |
|
26
|
|
|
* Generated from protobuf field <code>string sub_policy = 1;</code> |
|
27
|
|
|
*/ |
|
28
|
|
|
private $sub_policy = ''; |
|
29
|
|
|
/** |
|
30
|
|
|
* Generated from protobuf field <code>.common.ImplicitMetaPolicy.Rule rule = 2;</code> |
|
31
|
|
|
*/ |
|
32
|
|
|
private $rule = 0; |
|
33
|
|
|
|
|
34
|
|
|
public function __construct() { |
|
35
|
|
|
\GPBMetadata\Common\Policies::initOnce(); |
|
36
|
|
|
parent::__construct(); |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* Generated from protobuf field <code>string sub_policy = 1;</code> |
|
41
|
|
|
* @return string |
|
42
|
|
|
*/ |
|
43
|
|
|
public function getSubPolicy() |
|
44
|
|
|
{ |
|
45
|
|
|
return $this->sub_policy; |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* Generated from protobuf field <code>string sub_policy = 1;</code> |
|
50
|
|
|
* @param string $var |
|
51
|
|
|
* @return $this |
|
52
|
|
|
*/ |
|
53
|
|
|
public function setSubPolicy($var) |
|
54
|
|
|
{ |
|
55
|
|
|
GPBUtil::checkString($var, True); |
|
56
|
|
|
$this->sub_policy = $var; |
|
57
|
|
|
|
|
58
|
|
|
return $this; |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
/** |
|
62
|
|
|
* Generated from protobuf field <code>.common.ImplicitMetaPolicy.Rule rule = 2;</code> |
|
63
|
|
|
* @return int |
|
64
|
|
|
*/ |
|
65
|
|
|
public function getRule() |
|
66
|
|
|
{ |
|
67
|
|
|
return $this->rule; |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
/** |
|
71
|
|
|
* Generated from protobuf field <code>.common.ImplicitMetaPolicy.Rule rule = 2;</code> |
|
72
|
|
|
* @param int $var |
|
73
|
|
|
* @return $this |
|
74
|
|
|
*/ |
|
75
|
|
|
public function setRule($var) |
|
76
|
|
|
{ |
|
77
|
|
|
GPBUtil::checkEnum($var, \Hyperledger\Fabric\Protos\Common\ImplicitMetaPolicy_Rule::class); |
|
78
|
|
|
$this->rule = $var; |
|
79
|
|
|
|
|
80
|
|
|
return $this; |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
} |
|
84
|
|
|
|
|
85
|
|
|
|