| 1 |
<?php |
| 2 |
|
| 3 |
# Generated by the protocol buffer compiler. DO NOT EDIT! |
| 4 |
# source: google/api/usage.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 |
* Configuration controlling usage of a service. |
| 12 |
* |
| 13 |
* Generated from protobuf message <code>google.api.Usage</code> |
| 14 |
*/ |
| 15 |
class Usage extends \Dudlewebs\WPMCS\Google\Protobuf\Internal\Message |
| 16 |
{ |
| 17 |
/** |
| 18 |
* Requirements that must be satisfied before a consumer project can use the |
| 19 |
* service. Each requirement is of the form <service.name>/<requirement-id>; |
| 20 |
* for example 'serviceusage.googleapis.com/billing-enabled'. |
| 21 |
* For Google APIs, a Terms of Service requirement must be included here. |
| 22 |
* Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". |
| 23 |
* Other Google APIs should include |
| 24 |
* "serviceusage.googleapis.com/tos/universal". Additional ToS can be |
| 25 |
* included based on the business needs. |
| 26 |
* |
| 27 |
* Generated from protobuf field <code>repeated string requirements = 1;</code> |
| 28 |
*/ |
| 29 |
private $requirements; |
| 30 |
/** |
| 31 |
* A list of usage rules that apply to individual API methods. |
| 32 |
* **NOTE:** All service configuration rules follow "last one wins" order. |
| 33 |
* |
| 34 |
* Generated from protobuf field <code>repeated .google.api.UsageRule rules = 6;</code> |
| 35 |
*/ |
| 36 |
private $rules; |
| 37 |
/** |
| 38 |
* The full resource name of a channel used for sending notifications to the |
| 39 |
* service producer. |
| 40 |
* Google Service Management currently only supports |
| 41 |
* [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification |
| 42 |
* channel. To use Google Cloud Pub/Sub as the channel, this must be the name |
| 43 |
* of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format |
| 44 |
* documented in https://cloud.google.com/pubsub/docs/overview. |
| 45 |
* |
| 46 |
* Generated from protobuf field <code>string producer_notification_channel = 7;</code> |
| 47 |
*/ |
| 48 |
protected $producer_notification_channel = ''; |
| 49 |
/** |
| 50 |
* Constructor. |
| 51 |
* |
| 52 |
* @param array $data { |
| 53 |
* Optional. Data for populating the Message object. |
| 54 |
* |
| 55 |
* @type array<string>|\Google\Protobuf\Internal\RepeatedField $requirements |
| 56 |
* Requirements that must be satisfied before a consumer project can use the |
| 57 |
* service. Each requirement is of the form <service.name>/<requirement-id>; |
| 58 |
* for example 'serviceusage.googleapis.com/billing-enabled'. |
| 59 |
* For Google APIs, a Terms of Service requirement must be included here. |
| 60 |
* Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". |
| 61 |
* Other Google APIs should include |
| 62 |
* "serviceusage.googleapis.com/tos/universal". Additional ToS can be |
| 63 |
* included based on the business needs. |
| 64 |
* @type array<\Google\Api\UsageRule>|\Google\Protobuf\Internal\RepeatedField $rules |
| 65 |
* A list of usage rules that apply to individual API methods. |
| 66 |
* **NOTE:** All service configuration rules follow "last one wins" order. |
| 67 |
* @type string $producer_notification_channel |
| 68 |
* The full resource name of a channel used for sending notifications to the |
| 69 |
* service producer. |
| 70 |
* Google Service Management currently only supports |
| 71 |
* [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification |
| 72 |
* channel. To use Google Cloud Pub/Sub as the channel, this must be the name |
| 73 |
* of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format |
| 74 |
* documented in https://cloud.google.com/pubsub/docs/overview. |
| 75 |
* } |
| 76 |
*/ |
| 77 |
public function __construct($data = NULL) |
| 78 |
{ |
| 79 |
\Dudlewebs\WPMCS\GPBMetadata\Google\Api\Usage::initOnce(); |
| 80 |
parent::__construct($data); |
| 81 |
} |
| 82 |
/** |
| 83 |
* Requirements that must be satisfied before a consumer project can use the |
| 84 |
* service. Each requirement is of the form <service.name>/<requirement-id>; |
| 85 |
* for example 'serviceusage.googleapis.com/billing-enabled'. |
| 86 |
* For Google APIs, a Terms of Service requirement must be included here. |
| 87 |
* Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". |
| 88 |
* Other Google APIs should include |
| 89 |
* "serviceusage.googleapis.com/tos/universal". Additional ToS can be |
| 90 |
* included based on the business needs. |
| 91 |
* |
| 92 |
* Generated from protobuf field <code>repeated string requirements = 1;</code> |
| 93 |
* @return \Google\Protobuf\Internal\RepeatedField |
| 94 |
*/ |
| 95 |
public function getRequirements() |
| 96 |
{ |
| 97 |
return $this->requirements; |
| 98 |
} |
| 99 |
/** |
| 100 |
* Requirements that must be satisfied before a consumer project can use the |
| 101 |
* service. Each requirement is of the form <service.name>/<requirement-id>; |
| 102 |
* for example 'serviceusage.googleapis.com/billing-enabled'. |
| 103 |
* For Google APIs, a Terms of Service requirement must be included here. |
| 104 |
* Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". |
| 105 |
* Other Google APIs should include |
| 106 |
* "serviceusage.googleapis.com/tos/universal". Additional ToS can be |
| 107 |
* included based on the business needs. |
| 108 |
* |
| 109 |
* Generated from protobuf field <code>repeated string requirements = 1;</code> |
| 110 |
* @param array<string>|\Google\Protobuf\Internal\RepeatedField $var |
| 111 |
* @return $this |
| 112 |
*/ |
| 113 |
public function setRequirements($var) |
| 114 |
{ |
| 115 |
$arr = GPBUtil::checkRepeatedField($var, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::STRING); |
| 116 |
$this->requirements = $arr; |
| 117 |
return $this; |
| 118 |
} |
| 119 |
/** |
| 120 |
* A list of usage rules that apply to individual API methods. |
| 121 |
* **NOTE:** All service configuration rules follow "last one wins" order. |
| 122 |
* |
| 123 |
* Generated from protobuf field <code>repeated .google.api.UsageRule rules = 6;</code> |
| 124 |
* @return \Google\Protobuf\Internal\RepeatedField |
| 125 |
*/ |
| 126 |
public function getRules() |
| 127 |
{ |
| 128 |
return $this->rules; |
| 129 |
} |
| 130 |
/** |
| 131 |
* A list of usage rules that apply to individual API methods. |
| 132 |
* **NOTE:** All service configuration rules follow "last one wins" order. |
| 133 |
* |
| 134 |
* Generated from protobuf field <code>repeated .google.api.UsageRule rules = 6;</code> |
| 135 |
* @param array<\Google\Api\UsageRule>|\Google\Protobuf\Internal\RepeatedField $var |
| 136 |
* @return $this |
| 137 |
*/ |
| 138 |
public function setRules($var) |
| 139 |
{ |
| 140 |
$arr = GPBUtil::checkRepeatedField($var, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::MESSAGE, \Dudlewebs\WPMCS\Google\Api\UsageRule::class); |
| 141 |
$this->rules = $arr; |
| 142 |
return $this; |
| 143 |
} |
| 144 |
/** |
| 145 |
* The full resource name of a channel used for sending notifications to the |
| 146 |
* service producer. |
| 147 |
* Google Service Management currently only supports |
| 148 |
* [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification |
| 149 |
* channel. To use Google Cloud Pub/Sub as the channel, this must be the name |
| 150 |
* of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format |
| 151 |
* documented in https://cloud.google.com/pubsub/docs/overview. |
| 152 |
* |
| 153 |
* Generated from protobuf field <code>string producer_notification_channel = 7;</code> |
| 154 |
* @return string |
| 155 |
*/ |
| 156 |
public function getProducerNotificationChannel() |
| 157 |
{ |
| 158 |
return $this->producer_notification_channel; |
| 159 |
} |
| 160 |
/** |
| 161 |
* The full resource name of a channel used for sending notifications to the |
| 162 |
* service producer. |
| 163 |
* Google Service Management currently only supports |
| 164 |
* [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification |
| 165 |
* channel. To use Google Cloud Pub/Sub as the channel, this must be the name |
| 166 |
* of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format |
| 167 |
* documented in https://cloud.google.com/pubsub/docs/overview. |
| 168 |
* |
| 169 |
* Generated from protobuf field <code>string producer_notification_channel = 7;</code> |
| 170 |
* @param string $var |
| 171 |
* @return $this |
| 172 |
*/ |
| 173 |
public function setProducerNotificationChannel($var) |
| 174 |
{ |
| 175 |
GPBUtil::checkString($var, True); |
| 176 |
$this->producer_notification_channel = $var; |
| 177 |
return $this; |
| 178 |
} |
| 179 |
} |
| 180 |
|