media-cloud-sync
/
includes
/
sdk
/
google
/
google
/
common-protos
/
src
/
Api
/
ResourceDescriptor.php
ResourceDescriptor.php in Media Cloud Sync 1.2.3, at includes/sdk/google/google/common-protos/src/Api/ResourceDescriptor.php
| 1 | <?php |
| 2 | |
| 3 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 4 | # source: google/api/resource.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 | * A simple descriptor of a resource type. |
| 12 | * ResourceDescriptor annotates a resource message (either by means of a |
| 13 | * protobuf annotation or use in the service config), and associates the |
| 14 | * resource's schema, the resource type, and the pattern of the resource name. |
| 15 | * Example: |
| 16 | * message Topic { |
| 17 | * // Indicates this message defines a resource schema. |
| 18 | * // Declares the resource type in the format of {service}/{kind}. |
| 19 | * // For Kubernetes resources, the format is {api group}/{kind}. |
| 20 | * option (google.api.resource) = { |
| 21 | * type: "pubsub.googleapis.com/Topic" |
| 22 | * pattern: "projects/{project}/topics/{topic}" |
| 23 | * }; |
| 24 | * } |
| 25 | * The ResourceDescriptor Yaml config will look like: |
| 26 | * resources: |
| 27 | * - type: "pubsub.googleapis.com/Topic" |
| 28 | * pattern: "projects/{project}/topics/{topic}" |
| 29 | * Sometimes, resources have multiple patterns, typically because they can |
| 30 | * live under multiple parents. |
| 31 | * Example: |
| 32 | * message LogEntry { |
| 33 | * option (google.api.resource) = { |
| 34 | * type: "logging.googleapis.com/LogEntry" |
| 35 | * pattern: "projects/{project}/logs/{log}" |
| 36 | * pattern: "folders/{folder}/logs/{log}" |
| 37 | * pattern: "organizations/{organization}/logs/{log}" |
| 38 | * pattern: "billingAccounts/{billing_account}/logs/{log}" |
| 39 | * }; |
| 40 | * } |
| 41 | * The ResourceDescriptor Yaml config will look like: |
| 42 | * resources: |
| 43 | * - type: 'logging.googleapis.com/LogEntry' |
| 44 | * pattern: "projects/{project}/logs/{log}" |
| 45 | * pattern: "folders/{folder}/logs/{log}" |
| 46 | * pattern: "organizations/{organization}/logs/{log}" |
| 47 | * pattern: "billingAccounts/{billing_account}/logs/{log}" |
| 48 | * |
| 49 | * Generated from protobuf message <code>google.api.ResourceDescriptor</code> |
| 50 | */ |
| 51 | class ResourceDescriptor extends \Dudlewebs\WPMCS\Google\Protobuf\Internal\Message |
| 52 | { |
| 53 | /** |
| 54 | * The resource type. It must be in the format of |
| 55 | * {service_name}/{resource_type_kind}. The `resource_type_kind` must be |
| 56 | * singular and must not include version numbers. |
| 57 | * Example: `storage.googleapis.com/Bucket` |
| 58 | * The value of the resource_type_kind must follow the regular expression |
| 59 | * /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and |
| 60 | * should use PascalCase (UpperCamelCase). The maximum number of |
| 61 | * characters allowed for the `resource_type_kind` is 100. |
| 62 | * |
| 63 | * Generated from protobuf field <code>string type = 1;</code> |
| 64 | */ |
| 65 | protected $type = ''; |
| 66 | /** |
| 67 | * Optional. The relative resource name pattern associated with this resource |
| 68 | * type. The DNS prefix of the full resource name shouldn't be specified here. |
| 69 | * The path pattern must follow the syntax, which aligns with HTTP binding |
| 70 | * syntax: |
| 71 | * Template = Segment { "/" Segment } ; |
| 72 | * Segment = LITERAL | Variable ; |
| 73 | * Variable = "{" LITERAL "}" ; |
| 74 | * Examples: |
| 75 | * - "projects/{project}/topics/{topic}" |
| 76 | * - "projects/{project}/knowledgeBases/{knowledge_base}" |
| 77 | * The components in braces correspond to the IDs for each resource in the |
| 78 | * hierarchy. It is expected that, if multiple patterns are provided, |
| 79 | * the same component name (e.g. "project") refers to IDs of the same |
| 80 | * type of resource. |
| 81 | * |
| 82 | * Generated from protobuf field <code>repeated string pattern = 2;</code> |
| 83 | */ |
| 84 | private $pattern; |
| 85 | /** |
| 86 | * Optional. The field on the resource that designates the resource name |
| 87 | * field. If omitted, this is assumed to be "name". |
| 88 | * |
| 89 | * Generated from protobuf field <code>string name_field = 3;</code> |
| 90 | */ |
| 91 | protected $name_field = ''; |
| 92 | /** |
| 93 | * Optional. The historical or future-looking state of the resource pattern. |
| 94 | * Example: |
| 95 | * // The InspectTemplate message originally only supported resource |
| 96 | * // names with organization, and project was added later. |
| 97 | * message InspectTemplate { |
| 98 | * option (google.api.resource) = { |
| 99 | * type: "dlp.googleapis.com/InspectTemplate" |
| 100 | * pattern: |
| 101 | * "organizations/{organization}/inspectTemplates/{inspect_template}" |
| 102 | * pattern: "projects/{project}/inspectTemplates/{inspect_template}" |
| 103 | * history: ORIGINALLY_SINGLE_PATTERN |
| 104 | * }; |
| 105 | * } |
| 106 | * |
| 107 | * Generated from protobuf field <code>.google.api.ResourceDescriptor.History history = 4;</code> |
| 108 | */ |
| 109 | protected $history = 0; |
| 110 | /** |
| 111 | * The plural name used in the resource name and permission names, such as |
| 112 | * 'projects' for the resource name of 'projects/{project}' and the permission |
| 113 | * name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same |
| 114 | * concept of the `plural` field in k8s CRD spec |
| 115 | * https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ |
| 116 | * Note: The plural form is required even for singleton resources. See |
| 117 | * https://aip.dev/156 |
| 118 | * |
| 119 | * Generated from protobuf field <code>string plural = 5;</code> |
| 120 | */ |
| 121 | protected $plural = ''; |
| 122 | /** |
| 123 | * The same concept of the `singular` field in k8s CRD spec |
| 124 | * https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ |
| 125 | * Such as "project" for the `resourcemanager.googleapis.com/Project` type. |
| 126 | * |
| 127 | * Generated from protobuf field <code>string singular = 6;</code> |
| 128 | */ |
| 129 | protected $singular = ''; |
| 130 | /** |
| 131 | * Style flag(s) for this resource. |
| 132 | * These indicate that a resource is expected to conform to a given |
| 133 | * style. See the specific style flags for additional information. |
| 134 | * |
| 135 | * Generated from protobuf field <code>repeated .google.api.ResourceDescriptor.Style style = 10;</code> |
| 136 | */ |
| 137 | private $style; |
| 138 | /** |
| 139 | * Constructor. |
| 140 | * |
| 141 | * @param array $data { |
| 142 | * Optional. Data for populating the Message object. |
| 143 | * |
| 144 | * @type string $type |
| 145 | * The resource type. It must be in the format of |
| 146 | * {service_name}/{resource_type_kind}. The `resource_type_kind` must be |
| 147 | * singular and must not include version numbers. |
| 148 | * Example: `storage.googleapis.com/Bucket` |
| 149 | * The value of the resource_type_kind must follow the regular expression |
| 150 | * /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and |
| 151 | * should use PascalCase (UpperCamelCase). The maximum number of |
| 152 | * characters allowed for the `resource_type_kind` is 100. |
| 153 | * @type array<string>|\Google\Protobuf\Internal\RepeatedField $pattern |
| 154 | * Optional. The relative resource name pattern associated with this resource |
| 155 | * type. The DNS prefix of the full resource name shouldn't be specified here. |
| 156 | * The path pattern must follow the syntax, which aligns with HTTP binding |
| 157 | * syntax: |
| 158 | * Template = Segment { "/" Segment } ; |
| 159 | * Segment = LITERAL | Variable ; |
| 160 | * Variable = "{" LITERAL "}" ; |
| 161 | * Examples: |
| 162 | * - "projects/{project}/topics/{topic}" |
| 163 | * - "projects/{project}/knowledgeBases/{knowledge_base}" |
| 164 | * The components in braces correspond to the IDs for each resource in the |
| 165 | * hierarchy. It is expected that, if multiple patterns are provided, |
| 166 | * the same component name (e.g. "project") refers to IDs of the same |
| 167 | * type of resource. |
| 168 | * @type string $name_field |
| 169 | * Optional. The field on the resource that designates the resource name |
| 170 | * field. If omitted, this is assumed to be "name". |
| 171 | * @type int $history |
| 172 | * Optional. The historical or future-looking state of the resource pattern. |
| 173 | * Example: |
| 174 | * // The InspectTemplate message originally only supported resource |
| 175 | * // names with organization, and project was added later. |
| 176 | * message InspectTemplate { |
| 177 | * option (google.api.resource) = { |
| 178 | * type: "dlp.googleapis.com/InspectTemplate" |
| 179 | * pattern: |
| 180 | * "organizations/{organization}/inspectTemplates/{inspect_template}" |
| 181 | * pattern: "projects/{project}/inspectTemplates/{inspect_template}" |
| 182 | * history: ORIGINALLY_SINGLE_PATTERN |
| 183 | * }; |
| 184 | * } |
| 185 | * @type string $plural |
| 186 | * The plural name used in the resource name and permission names, such as |
| 187 | * 'projects' for the resource name of 'projects/{project}' and the permission |
| 188 | * name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same |
| 189 | * concept of the `plural` field in k8s CRD spec |
| 190 | * https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ |
| 191 | * Note: The plural form is required even for singleton resources. See |
| 192 | * https://aip.dev/156 |
| 193 | * @type string $singular |
| 194 | * The same concept of the `singular` field in k8s CRD spec |
| 195 | * https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ |
| 196 | * Such as "project" for the `resourcemanager.googleapis.com/Project` type. |
| 197 | * @type array<int>|\Google\Protobuf\Internal\RepeatedField $style |
| 198 | * Style flag(s) for this resource. |
| 199 | * These indicate that a resource is expected to conform to a given |
| 200 | * style. See the specific style flags for additional information. |
| 201 | * } |
| 202 | */ |
| 203 | public function __construct($data = NULL) |
| 204 | { |
| 205 | \Dudlewebs\WPMCS\GPBMetadata\Google\Api\Resource::initOnce(); |
| 206 | parent::__construct($data); |
| 207 | } |
| 208 | /** |
| 209 | * The resource type. It must be in the format of |
| 210 | * {service_name}/{resource_type_kind}. The `resource_type_kind` must be |
| 211 | * singular and must not include version numbers. |
| 212 | * Example: `storage.googleapis.com/Bucket` |
| 213 | * The value of the resource_type_kind must follow the regular expression |
| 214 | * /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and |
| 215 | * should use PascalCase (UpperCamelCase). The maximum number of |
| 216 | * characters allowed for the `resource_type_kind` is 100. |
| 217 | * |
| 218 | * Generated from protobuf field <code>string type = 1;</code> |
| 219 | * @return string |
| 220 | */ |
| 221 | public function getType() |
| 222 | { |
| 223 | return $this->type; |
| 224 | } |
| 225 | /** |
| 226 | * The resource type. It must be in the format of |
| 227 | * {service_name}/{resource_type_kind}. The `resource_type_kind` must be |
| 228 | * singular and must not include version numbers. |
| 229 | * Example: `storage.googleapis.com/Bucket` |
| 230 | * The value of the resource_type_kind must follow the regular expression |
| 231 | * /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and |
| 232 | * should use PascalCase (UpperCamelCase). The maximum number of |
| 233 | * characters allowed for the `resource_type_kind` is 100. |
| 234 | * |
| 235 | * Generated from protobuf field <code>string type = 1;</code> |
| 236 | * @param string $var |
| 237 | * @return $this |
| 238 | */ |
| 239 | public function setType($var) |
| 240 | { |
| 241 | GPBUtil::checkString($var, True); |
| 242 | $this->type = $var; |
| 243 | return $this; |
| 244 | } |
| 245 | /** |
| 246 | * Optional. The relative resource name pattern associated with this resource |
| 247 | * type. The DNS prefix of the full resource name shouldn't be specified here. |
| 248 | * The path pattern must follow the syntax, which aligns with HTTP binding |
| 249 | * syntax: |
| 250 | * Template = Segment { "/" Segment } ; |
| 251 | * Segment = LITERAL | Variable ; |
| 252 | * Variable = "{" LITERAL "}" ; |
| 253 | * Examples: |
| 254 | * - "projects/{project}/topics/{topic}" |
| 255 | * - "projects/{project}/knowledgeBases/{knowledge_base}" |
| 256 | * The components in braces correspond to the IDs for each resource in the |
| 257 | * hierarchy. It is expected that, if multiple patterns are provided, |
| 258 | * the same component name (e.g. "project") refers to IDs of the same |
| 259 | * type of resource. |
| 260 | * |
| 261 | * Generated from protobuf field <code>repeated string pattern = 2;</code> |
| 262 | * @return \Google\Protobuf\Internal\RepeatedField |
| 263 | */ |
| 264 | public function getPattern() |
| 265 | { |
| 266 | return $this->pattern; |
| 267 | } |
| 268 | /** |
| 269 | * Optional. The relative resource name pattern associated with this resource |
| 270 | * type. The DNS prefix of the full resource name shouldn't be specified here. |
| 271 | * The path pattern must follow the syntax, which aligns with HTTP binding |
| 272 | * syntax: |
| 273 | * Template = Segment { "/" Segment } ; |
| 274 | * Segment = LITERAL | Variable ; |
| 275 | * Variable = "{" LITERAL "}" ; |
| 276 | * Examples: |
| 277 | * - "projects/{project}/topics/{topic}" |
| 278 | * - "projects/{project}/knowledgeBases/{knowledge_base}" |
| 279 | * The components in braces correspond to the IDs for each resource in the |
| 280 | * hierarchy. It is expected that, if multiple patterns are provided, |
| 281 | * the same component name (e.g. "project") refers to IDs of the same |
| 282 | * type of resource. |
| 283 | * |
| 284 | * Generated from protobuf field <code>repeated string pattern = 2;</code> |
| 285 | * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var |
| 286 | * @return $this |
| 287 | */ |
| 288 | public function setPattern($var) |
| 289 | { |
| 290 | $arr = GPBUtil::checkRepeatedField($var, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::STRING); |
| 291 | $this->pattern = $arr; |
| 292 | return $this; |
| 293 | } |
| 294 | /** |
| 295 | * Optional. The field on the resource that designates the resource name |
| 296 | * field. If omitted, this is assumed to be "name". |
| 297 | * |
| 298 | * Generated from protobuf field <code>string name_field = 3;</code> |
| 299 | * @return string |
| 300 | */ |
| 301 | public function getNameField() |
| 302 | { |
| 303 | return $this->name_field; |
| 304 | } |
| 305 | /** |
| 306 | * Optional. The field on the resource that designates the resource name |
| 307 | * field. If omitted, this is assumed to be "name". |
| 308 | * |
| 309 | * Generated from protobuf field <code>string name_field = 3;</code> |
| 310 | * @param string $var |
| 311 | * @return $this |
| 312 | */ |
| 313 | public function setNameField($var) |
| 314 | { |
| 315 | GPBUtil::checkString($var, True); |
| 316 | $this->name_field = $var; |
| 317 | return $this; |
| 318 | } |
| 319 | /** |
| 320 | * Optional. The historical or future-looking state of the resource pattern. |
| 321 | * Example: |
| 322 | * // The InspectTemplate message originally only supported resource |
| 323 | * // names with organization, and project was added later. |
| 324 | * message InspectTemplate { |
| 325 | * option (google.api.resource) = { |
| 326 | * type: "dlp.googleapis.com/InspectTemplate" |
| 327 | * pattern: |
| 328 | * "organizations/{organization}/inspectTemplates/{inspect_template}" |
| 329 | * pattern: "projects/{project}/inspectTemplates/{inspect_template}" |
| 330 | * history: ORIGINALLY_SINGLE_PATTERN |
| 331 | * }; |
| 332 | * } |
| 333 | * |
| 334 | * Generated from protobuf field <code>.google.api.ResourceDescriptor.History history = 4;</code> |
| 335 | * @return int |
| 336 | */ |
| 337 | public function getHistory() |
| 338 | { |
| 339 | return $this->history; |
| 340 | } |
| 341 | /** |
| 342 | * Optional. The historical or future-looking state of the resource pattern. |
| 343 | * Example: |
| 344 | * // The InspectTemplate message originally only supported resource |
| 345 | * // names with organization, and project was added later. |
| 346 | * message InspectTemplate { |
| 347 | * option (google.api.resource) = { |
| 348 | * type: "dlp.googleapis.com/InspectTemplate" |
| 349 | * pattern: |
| 350 | * "organizations/{organization}/inspectTemplates/{inspect_template}" |
| 351 | * pattern: "projects/{project}/inspectTemplates/{inspect_template}" |
| 352 | * history: ORIGINALLY_SINGLE_PATTERN |
| 353 | * }; |
| 354 | * } |
| 355 | * |
| 356 | * Generated from protobuf field <code>.google.api.ResourceDescriptor.History history = 4;</code> |
| 357 | * @param int $var |
| 358 | * @return $this |
| 359 | */ |
| 360 | public function setHistory($var) |
| 361 | { |
| 362 | GPBUtil::checkEnum($var, \Dudlewebs\WPMCS\Google\Api\ResourceDescriptor\History::class); |
| 363 | $this->history = $var; |
| 364 | return $this; |
| 365 | } |
| 366 | /** |
| 367 | * The plural name used in the resource name and permission names, such as |
| 368 | * 'projects' for the resource name of 'projects/{project}' and the permission |
| 369 | * name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same |
| 370 | * concept of the `plural` field in k8s CRD spec |
| 371 | * https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ |
| 372 | * Note: The plural form is required even for singleton resources. See |
| 373 | * https://aip.dev/156 |
| 374 | * |
| 375 | * Generated from protobuf field <code>string plural = 5;</code> |
| 376 | * @return string |
| 377 | */ |
| 378 | public function getPlural() |
| 379 | { |
| 380 | return $this->plural; |
| 381 | } |
| 382 | /** |
| 383 | * The plural name used in the resource name and permission names, such as |
| 384 | * 'projects' for the resource name of 'projects/{project}' and the permission |
| 385 | * name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same |
| 386 | * concept of the `plural` field in k8s CRD spec |
| 387 | * https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ |
| 388 | * Note: The plural form is required even for singleton resources. See |
| 389 | * https://aip.dev/156 |
| 390 | * |
| 391 | * Generated from protobuf field <code>string plural = 5;</code> |
| 392 | * @param string $var |
| 393 | * @return $this |
| 394 | */ |
| 395 | public function setPlural($var) |
| 396 | { |
| 397 | GPBUtil::checkString($var, True); |
| 398 | $this->plural = $var; |
| 399 | return $this; |
| 400 | } |
| 401 | /** |
| 402 | * The same concept of the `singular` field in k8s CRD spec |
| 403 | * https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ |
| 404 | * Such as "project" for the `resourcemanager.googleapis.com/Project` type. |
| 405 | * |
| 406 | * Generated from protobuf field <code>string singular = 6;</code> |
| 407 | * @return string |
| 408 | */ |
| 409 | public function getSingular() |
| 410 | { |
| 411 | return $this->singular; |
| 412 | } |
| 413 | /** |
| 414 | * The same concept of the `singular` field in k8s CRD spec |
| 415 | * https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ |
| 416 | * Such as "project" for the `resourcemanager.googleapis.com/Project` type. |
| 417 | * |
| 418 | * Generated from protobuf field <code>string singular = 6;</code> |
| 419 | * @param string $var |
| 420 | * @return $this |
| 421 | */ |
| 422 | public function setSingular($var) |
| 423 | { |
| 424 | GPBUtil::checkString($var, True); |
| 425 | $this->singular = $var; |
| 426 | return $this; |
| 427 | } |
| 428 | /** |
| 429 | * Style flag(s) for this resource. |
| 430 | * These indicate that a resource is expected to conform to a given |
| 431 | * style. See the specific style flags for additional information. |
| 432 | * |
| 433 | * Generated from protobuf field <code>repeated .google.api.ResourceDescriptor.Style style = 10;</code> |
| 434 | * @return \Google\Protobuf\Internal\RepeatedField |
| 435 | */ |
| 436 | public function getStyle() |
| 437 | { |
| 438 | return $this->style; |
| 439 | } |
| 440 | /** |
| 441 | * Style flag(s) for this resource. |
| 442 | * These indicate that a resource is expected to conform to a given |
| 443 | * style. See the specific style flags for additional information. |
| 444 | * |
| 445 | * Generated from protobuf field <code>repeated .google.api.ResourceDescriptor.Style style = 10;</code> |
| 446 | * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var |
| 447 | * @return $this |
| 448 | */ |
| 449 | public function setStyle($var) |
| 450 | { |
| 451 | $arr = GPBUtil::checkRepeatedField($var, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::ENUM, \Dudlewebs\WPMCS\Google\Api\ResourceDescriptor\Style::class); |
| 452 | $this->style = $arr; |
| 453 | return $this; |
| 454 | } |
| 455 | } |
| 456 |