| 1 |
<?php |
| 2 |
|
| 3 |
# Generated by the protocol buffer compiler. DO NOT EDIT! |
| 4 |
# source: google/api/logging.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 |
* Logging configuration of the service. |
| 12 |
* The following example shows how to configure logs to be sent to the |
| 13 |
* producer and consumer projects. In the example, the `activity_history` |
| 14 |
* log is sent to both the producer and consumer projects, whereas the |
| 15 |
* `purchase_history` log is only sent to the producer project. |
| 16 |
* monitored_resources: |
| 17 |
* - type: library.googleapis.com/branch |
| 18 |
* labels: |
| 19 |
* - key: /city |
| 20 |
* description: The city where the library branch is located in. |
| 21 |
* - key: /name |
| 22 |
* description: The name of the branch. |
| 23 |
* logs: |
| 24 |
* - name: activity_history |
| 25 |
* labels: |
| 26 |
* - key: /customer_id |
| 27 |
* - name: purchase_history |
| 28 |
* logging: |
| 29 |
* producer_destinations: |
| 30 |
* - monitored_resource: library.googleapis.com/branch |
| 31 |
* logs: |
| 32 |
* - activity_history |
| 33 |
* - purchase_history |
| 34 |
* consumer_destinations: |
| 35 |
* - monitored_resource: library.googleapis.com/branch |
| 36 |
* logs: |
| 37 |
* - activity_history |
| 38 |
* |
| 39 |
* Generated from protobuf message <code>google.api.Logging</code> |
| 40 |
*/ |
| 41 |
class Logging extends \Dudlewebs\WPMCS\Google\Protobuf\Internal\Message |
| 42 |
{ |
| 43 |
/** |
| 44 |
* Logging configurations for sending logs to the producer project. |
| 45 |
* There can be multiple producer destinations, each one must have a |
| 46 |
* different monitored resource type. A log can be used in at most |
| 47 |
* one producer destination. |
| 48 |
* |
| 49 |
* Generated from protobuf field <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code> |
| 50 |
*/ |
| 51 |
private $producer_destinations; |
| 52 |
/** |
| 53 |
* Logging configurations for sending logs to the consumer project. |
| 54 |
* There can be multiple consumer destinations, each one must have a |
| 55 |
* different monitored resource type. A log can be used in at most |
| 56 |
* one consumer destination. |
| 57 |
* |
| 58 |
* Generated from protobuf field <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code> |
| 59 |
*/ |
| 60 |
private $consumer_destinations; |
| 61 |
/** |
| 62 |
* Constructor. |
| 63 |
* |
| 64 |
* @param array $data { |
| 65 |
* Optional. Data for populating the Message object. |
| 66 |
* |
| 67 |
* @type array<\Google\Api\Logging\LoggingDestination>|\Google\Protobuf\Internal\RepeatedField $producer_destinations |
| 68 |
* Logging configurations for sending logs to the producer project. |
| 69 |
* There can be multiple producer destinations, each one must have a |
| 70 |
* different monitored resource type. A log can be used in at most |
| 71 |
* one producer destination. |
| 72 |
* @type array<\Google\Api\Logging\LoggingDestination>|\Google\Protobuf\Internal\RepeatedField $consumer_destinations |
| 73 |
* Logging configurations for sending logs to the consumer project. |
| 74 |
* There can be multiple consumer destinations, each one must have a |
| 75 |
* different monitored resource type. A log can be used in at most |
| 76 |
* one consumer destination. |
| 77 |
* } |
| 78 |
*/ |
| 79 |
public function __construct($data = NULL) |
| 80 |
{ |
| 81 |
\Dudlewebs\WPMCS\GPBMetadata\Google\Api\Logging::initOnce(); |
| 82 |
parent::__construct($data); |
| 83 |
} |
| 84 |
/** |
| 85 |
* Logging configurations for sending logs to the producer project. |
| 86 |
* There can be multiple producer destinations, each one must have a |
| 87 |
* different monitored resource type. A log can be used in at most |
| 88 |
* one producer destination. |
| 89 |
* |
| 90 |
* Generated from protobuf field <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code> |
| 91 |
* @return \Google\Protobuf\Internal\RepeatedField |
| 92 |
*/ |
| 93 |
public function getProducerDestinations() |
| 94 |
{ |
| 95 |
return $this->producer_destinations; |
| 96 |
} |
| 97 |
/** |
| 98 |
* Logging configurations for sending logs to the producer project. |
| 99 |
* There can be multiple producer destinations, each one must have a |
| 100 |
* different monitored resource type. A log can be used in at most |
| 101 |
* one producer destination. |
| 102 |
* |
| 103 |
* Generated from protobuf field <code>repeated .google.api.Logging.LoggingDestination producer_destinations = 1;</code> |
| 104 |
* @param array<\Google\Api\Logging\LoggingDestination>|\Google\Protobuf\Internal\RepeatedField $var |
| 105 |
* @return $this |
| 106 |
*/ |
| 107 |
public function setProducerDestinations($var) |
| 108 |
{ |
| 109 |
$arr = GPBUtil::checkRepeatedField($var, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::MESSAGE, \Dudlewebs\WPMCS\Google\Api\Logging\LoggingDestination::class); |
| 110 |
$this->producer_destinations = $arr; |
| 111 |
return $this; |
| 112 |
} |
| 113 |
/** |
| 114 |
* Logging configurations for sending logs to the consumer project. |
| 115 |
* There can be multiple consumer destinations, each one must have a |
| 116 |
* different monitored resource type. A log can be used in at most |
| 117 |
* one consumer destination. |
| 118 |
* |
| 119 |
* Generated from protobuf field <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code> |
| 120 |
* @return \Google\Protobuf\Internal\RepeatedField |
| 121 |
*/ |
| 122 |
public function getConsumerDestinations() |
| 123 |
{ |
| 124 |
return $this->consumer_destinations; |
| 125 |
} |
| 126 |
/** |
| 127 |
* Logging configurations for sending logs to the consumer project. |
| 128 |
* There can be multiple consumer destinations, each one must have a |
| 129 |
* different monitored resource type. A log can be used in at most |
| 130 |
* one consumer destination. |
| 131 |
* |
| 132 |
* Generated from protobuf field <code>repeated .google.api.Logging.LoggingDestination consumer_destinations = 2;</code> |
| 133 |
* @param array<\Google\Api\Logging\LoggingDestination>|\Google\Protobuf\Internal\RepeatedField $var |
| 134 |
* @return $this |
| 135 |
*/ |
| 136 |
public function setConsumerDestinations($var) |
| 137 |
{ |
| 138 |
$arr = GPBUtil::checkRepeatedField($var, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::MESSAGE, \Dudlewebs\WPMCS\Google\Api\Logging\LoggingDestination::class); |
| 139 |
$this->consumer_destinations = $arr; |
| 140 |
return $this; |
| 141 |
} |
| 142 |
} |
| 143 |
|