| 1 |
<?php |
| 2 |
|
| 3 |
# Generated by the protocol buffer compiler. DO NOT EDIT! |
| 4 |
# source: google/api/visibility.proto |
| 5 |
namespace Dudlewebs\WPMCS\Google\Api; |
| 6 |
|
| 7 |
use Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType; |
| 8 |
use Dudlewebs\WPMCS\Google\Protobuf\Internal\RepeatedField; |
| 9 |
use Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBUtil; |
| 10 |
/** |
| 11 |
* `Visibility` restricts service consumer's access to service elements, |
| 12 |
* such as whether an application can call a visibility-restricted method. |
| 13 |
* The restriction is expressed by applying visibility labels on service |
| 14 |
* elements. The visibility labels are elsewhere linked to service consumers. |
| 15 |
* A service can define multiple visibility labels, but a service consumer |
| 16 |
* should be granted at most one visibility label. Multiple visibility |
| 17 |
* labels for a single service consumer are not supported. |
| 18 |
* If an element and all its parents have no visibility label, its visibility |
| 19 |
* is unconditionally granted. |
| 20 |
* Example: |
| 21 |
* visibility: |
| 22 |
* rules: |
| 23 |
* - selector: google.calendar.Calendar.EnhancedSearch |
| 24 |
* restriction: PREVIEW |
| 25 |
* - selector: google.calendar.Calendar.Delegate |
| 26 |
* restriction: INTERNAL |
| 27 |
* Here, all methods are publicly visible except for the restricted methods |
| 28 |
* EnhancedSearch and Delegate. |
| 29 |
* |
| 30 |
* Generated from protobuf message <code>google.api.Visibility</code> |
| 31 |
*/ |
| 32 |
class Visibility extends \Dudlewebs\WPMCS\Google\Protobuf\Internal\Message |
| 33 |
{ |
| 34 |
/** |
| 35 |
* A list of visibility rules that apply to individual API elements. |
| 36 |
* **NOTE:** All service configuration rules follow "last one wins" order. |
| 37 |
* |
| 38 |
* Generated from protobuf field <code>repeated .google.api.VisibilityRule rules = 1;</code> |
| 39 |
*/ |
| 40 |
private $rules; |
| 41 |
/** |
| 42 |
* Constructor. |
| 43 |
* |
| 44 |
* @param array $data { |
| 45 |
* Optional. Data for populating the Message object. |
| 46 |
* |
| 47 |
* @type array<\Google\Api\VisibilityRule>|\Google\Protobuf\Internal\RepeatedField $rules |
| 48 |
* A list of visibility rules that apply to individual API elements. |
| 49 |
* **NOTE:** All service configuration rules follow "last one wins" order. |
| 50 |
* } |
| 51 |
*/ |
| 52 |
public function __construct($data = NULL) |
| 53 |
{ |
| 54 |
\Dudlewebs\WPMCS\GPBMetadata\Google\Api\Visibility::initOnce(); |
| 55 |
parent::__construct($data); |
| 56 |
} |
| 57 |
/** |
| 58 |
* A list of visibility rules that apply to individual API elements. |
| 59 |
* **NOTE:** All service configuration rules follow "last one wins" order. |
| 60 |
* |
| 61 |
* Generated from protobuf field <code>repeated .google.api.VisibilityRule rules = 1;</code> |
| 62 |
* @return \Google\Protobuf\Internal\RepeatedField |
| 63 |
*/ |
| 64 |
public function getRules() |
| 65 |
{ |
| 66 |
return $this->rules; |
| 67 |
} |
| 68 |
/** |
| 69 |
* A list of visibility rules that apply to individual API elements. |
| 70 |
* **NOTE:** All service configuration rules follow "last one wins" order. |
| 71 |
* |
| 72 |
* Generated from protobuf field <code>repeated .google.api.VisibilityRule rules = 1;</code> |
| 73 |
* @param array<\Google\Api\VisibilityRule>|\Google\Protobuf\Internal\RepeatedField $var |
| 74 |
* @return $this |
| 75 |
*/ |
| 76 |
public function setRules($var) |
| 77 |
{ |
| 78 |
$arr = GPBUtil::checkRepeatedField($var, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::MESSAGE, \Dudlewebs\WPMCS\Google\Api\VisibilityRule::class); |
| 79 |
$this->rules = $arr; |
| 80 |
return $this; |
| 81 |
} |
| 82 |
} |
| 83 |
|