From 31748586e84653892d338281eefcc76226186de5 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Sat, 12 Oct 2019 03:01:38 -0700 Subject: [PATCH] [CHANGE ME] Re-generated Monitoring to pick up changes in the API or client library generator. --- Monitoring/metadata/V3/Uptime.php | 97 ++++++++++--------- Monitoring/src/V3/Point.php | 60 ++++++------ Monitoring/src/V3/TimeInterval.php | 3 +- Monitoring/src/V3/UptimeCheckConfig.php | 46 +++++++++ Monitoring/synth.metadata | 6 +- .../Unit/V3/UptimeCheckServiceClientTest.php | 6 ++ 6 files changed, 138 insertions(+), 80 deletions(-) diff --git a/Monitoring/metadata/V3/Uptime.php b/Monitoring/metadata/V3/Uptime.php index 3b9a8c925d68..67c3704766dd 100644 --- a/Monitoring/metadata/V3/Uptime.php +++ b/Monitoring/metadata/V3/Uptime.php @@ -17,7 +17,7 @@ public static function initOnce() { \GPBMetadata\Google\Api\MonitoredResource::initOnce(); \GPBMetadata\Google\Protobuf\Duration::initOnce(); $pool->internalAddGeneratedFile(hex2bin( - "0ae5110a21676f6f676c652f6d6f6e69746f72696e672f76332f75707469" . + "0afe110a21676f6f676c652f6d6f6e69746f72696e672f76332f75707469" . "6d652e70726f746f1214676f6f676c652e6d6f6e69746f72696e672e7633" . "1a1e676f6f676c652f70726f746f6275662f6475726174696f6e2e70726f" . "746f22e6010a0f496e7465726e616c436865636b6572120c0a046e616d65" . @@ -27,7 +27,7 @@ public static function initOnce() { "0a05737461746518072001280e322b2e676f6f676c652e6d6f6e69746f72" . "696e672e76332e496e7465726e616c436865636b65722e53746174652233" . "0a055374617465120f0a0b554e5350454349464945441000120c0a084352" . - "454154494e471001120b0a0752554e4e494e4710023a02180122be0b0a11" . + "454154494e471001120b0a0752554e4e494e4710023a02180122d70b0a11" . "557074696d65436865636b436f6e666967120c0a046e616d651801200128" . "0912140a0c646973706c61795f6e616d65180220012809123b0a126d6f6e" . "69746f7265645f7265736f7572636518032001280b321d2e676f6f676c65" . @@ -47,52 +47,53 @@ public static function initOnce() { "6d65436865636b436f6e6669672e436f6e74656e744d6174636865721241" . "0a1073656c65637465645f726567696f6e73180a2003280e32272e676f6f" . "676c652e6d6f6e69746f72696e672e76332e557074696d65436865636b52" . - "6567696f6e12440a11696e7465726e616c5f636865636b657273180e2003" . - "280b32252e676f6f676c652e6d6f6e69746f72696e672e76332e496e7465" . - "726e616c436865636b6572420218011a610a0d5265736f7572636547726f" . - "757012100a0867726f75705f6964180120012809123e0a0d7265736f7572" . - "63655f7479706518022001280e32272e676f6f676c652e6d6f6e69746f72" . - "696e672e76332e47726f75705265736f75726365547970651afa020a0948" . - "747470436865636b120f0a077573655f73736c180120012808120c0a0470" . - "617468180220012809120c0a04706f727418032001280512580a09617574" . - "685f696e666f18042001280b32452e676f6f676c652e6d6f6e69746f7269" . - "6e672e76332e557074696d65436865636b436f6e6669672e487474704368" . - "65636b2e426173696341757468656e7469636174696f6e12140a0c6d6173" . - "6b5f68656164657273180520012808124f0a076865616465727318062003" . - "280b323e2e676f6f676c652e6d6f6e69746f72696e672e76332e55707469" . - "6d65436865636b436f6e6669672e48747470436865636b2e486561646572" . - "73456e74727912140a0c76616c69646174655f73736c1807200128081a39" . - "0a13426173696341757468656e7469636174696f6e12100a08757365726e" . - "616d6518012001280912100a0870617373776f72641802200128091a2e0a" . - "0c48656164657273456e747279120b0a036b6579180120012809120d0a05" . - "76616c75651802200128093a0238011a180a08546370436865636b120c0a" . - "04706f72741801200128051a98020a0e436f6e74656e744d617463686572" . - "120f0a07636f6e74656e74180120012809125c0a076d6174636865721802" . - "2001280e324b2e676f6f676c652e6d6f6e69746f72696e672e76332e5570" . - "74696d65436865636b436f6e6669672e436f6e74656e744d617463686572" . - "2e436f6e74656e744d6174636865724f7074696f6e2296010a14436f6e74" . - "656e744d6174636865724f7074696f6e12260a22434f4e54454e545f4d41" . - "54434845525f4f5054494f4e5f554e535045434946494544100012130a0f" . - "434f4e5441494e535f535452494e47100112170a134e4f545f434f4e5441" . - "494e535f535452494e47100212110a0d4d4154434845535f524547455810" . - "0312150a114e4f545f4d4154434845535f52454745581004420a0a087265" . - "736f7572636542140a12636865636b5f726571756573745f74797065226e" . - "0a0d557074696d65436865636b497012370a06726567696f6e1801200128" . - "0e32272e676f6f676c652e6d6f6e69746f72696e672e76332e557074696d" . - "65436865636b526567696f6e12100a086c6f636174696f6e180220012809" . - "12120a0a69705f616464726573731803200128092a650a11557074696d65" . - "436865636b526567696f6e12160a12524547494f4e5f554e535045434946" . - "494544100012070a035553411001120a0a064555524f5045100212110a0d" . - "534f5554485f414d4552494341100312100a0c415349415f504143494649" . - "4310042a5b0a1147726f75705265736f7572636554797065121d0a195245" . - "534f555243455f545950455f554e5350454349464945441000120c0a0849" . - "4e5354414e4345100112190a154157535f454c425f4c4f41445f42414c41" . - "4e434552100242a3010a18636f6d2e676f6f676c652e6d6f6e69746f7269" . - "6e672e7633420b557074696d6550726f746f50015a3e676f6f676c652e67" . - "6f6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069732f" . - "6d6f6e69746f72696e672f76333b6d6f6e69746f72696e67aa021a476f6f" . - "676c652e436c6f75642e4d6f6e69746f72696e672e5633ca021a476f6f67" . - "6c655c436c6f75645c4d6f6e69746f72696e675c5633620670726f746f33" + "6567696f6e12170a0b69735f696e7465726e616c180f2001280842021801" . + "12440a11696e7465726e616c5f636865636b657273180e2003280b32252e" . + "676f6f676c652e6d6f6e69746f72696e672e76332e496e7465726e616c43" . + "6865636b6572420218011a610a0d5265736f7572636547726f757012100a" . + "0867726f75705f6964180120012809123e0a0d7265736f757263655f7479" . + "706518022001280e32272e676f6f676c652e6d6f6e69746f72696e672e76" . + "332e47726f75705265736f75726365547970651afa020a09487474704368" . + "65636b120f0a077573655f73736c180120012808120c0a04706174681802" . + "20012809120c0a04706f727418032001280512580a09617574685f696e66" . + "6f18042001280b32452e676f6f676c652e6d6f6e69746f72696e672e7633" . + "2e557074696d65436865636b436f6e6669672e48747470436865636b2e42" . + "6173696341757468656e7469636174696f6e12140a0c6d61736b5f686561" . + "64657273180520012808124f0a076865616465727318062003280b323e2e" . + "676f6f676c652e6d6f6e69746f72696e672e76332e557074696d65436865" . + "636b436f6e6669672e48747470436865636b2e48656164657273456e7472" . + "7912140a0c76616c69646174655f73736c1807200128081a390a13426173" . + "696341757468656e7469636174696f6e12100a08757365726e616d651801" . + "2001280912100a0870617373776f72641802200128091a2e0a0c48656164" . + "657273456e747279120b0a036b6579180120012809120d0a0576616c7565" . + "1802200128093a0238011a180a08546370436865636b120c0a04706f7274" . + "1801200128051a98020a0e436f6e74656e744d617463686572120f0a0763" . + "6f6e74656e74180120012809125c0a076d61746368657218022001280e32" . + "4b2e676f6f676c652e6d6f6e69746f72696e672e76332e557074696d6543" . + "6865636b436f6e6669672e436f6e74656e744d6174636865722e436f6e74" . + "656e744d6174636865724f7074696f6e2296010a14436f6e74656e744d61" . + "74636865724f7074696f6e12260a22434f4e54454e545f4d415443484552" . + "5f4f5054494f4e5f554e535045434946494544100012130a0f434f4e5441" . + "494e535f535452494e47100112170a134e4f545f434f4e5441494e535f53" . + "5452494e47100212110a0d4d4154434845535f5245474558100312150a11" . + "4e4f545f4d4154434845535f52454745581004420a0a087265736f757263" . + "6542140a12636865636b5f726571756573745f74797065226e0a0d557074" . + "696d65436865636b497012370a06726567696f6e18012001280e32272e67" . + "6f6f676c652e6d6f6e69746f72696e672e76332e557074696d6543686563" . + "6b526567696f6e12100a086c6f636174696f6e18022001280912120a0a69" . + "705f616464726573731803200128092a650a11557074696d65436865636b" . + "526567696f6e12160a12524547494f4e5f554e5350454349464945441000" . + "12070a035553411001120a0a064555524f5045100212110a0d534f555448" . + "5f414d4552494341100312100a0c415349415f5041434946494310042a5b" . + "0a1147726f75705265736f7572636554797065121d0a195245534f555243" . + "455f545950455f554e5350454349464945441000120c0a08494e5354414e" . + "4345100112190a154157535f454c425f4c4f41445f42414c414e43455210" . + "0242a3010a18636f6d2e676f6f676c652e6d6f6e69746f72696e672e7633" . + "420b557074696d6550726f746f50015a3e676f6f676c652e676f6c616e67" . + "2e6f72672f67656e70726f746f2f676f6f676c65617069732f6d6f6e6974" . + "6f72696e672f76333b6d6f6e69746f72696e67aa021a476f6f676c652e43" . + "6c6f75642e4d6f6e69746f72696e672e5633ca021a476f6f676c655c436c" . + "6f75645c4d6f6e69746f72696e675c5633620670726f746f33" ), true); static::$is_initialized = true; diff --git a/Monitoring/src/V3/Point.php b/Monitoring/src/V3/Point.php index 75d55d5d8dfc..1f66ee656d0b 100644 --- a/Monitoring/src/V3/Point.php +++ b/Monitoring/src/V3/Point.php @@ -17,13 +17,14 @@ class Point extends \Google\Protobuf\Internal\Message { /** * The time interval to which the data point applies. For `GAUGE` metrics, - * only the end time of the interval is used. For `DELTA` metrics, the start - * and end time should specify a non-zero interval, with subsequent points - * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` - * metrics, the start and end time should specify a non-zero interval, with - * subsequent points specifying the same start time and increasing end times, - * until an event resets the cumulative value to zero and sets a new start - * time for the following points. + * the start time is optional, but if it is supplied, it must equal the end + * time. For `DELTA` metrics, the start and end time should specify a + * non-zero interval, with subsequent points specifying contiguous and + * non-overlapping intervals. For `CUMULATIVE` metrics, the start and end + * time should specify a non-zero interval, with subsequent points specifying + * the same start time and increasing end times, until an event resets the + * cumulative value to zero and sets a new start time for the following + * points. * * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 1; */ @@ -43,13 +44,14 @@ class Point extends \Google\Protobuf\Internal\Message * * @type \Google\Cloud\Monitoring\V3\TimeInterval $interval * The time interval to which the data point applies. For `GAUGE` metrics, - * only the end time of the interval is used. For `DELTA` metrics, the start - * and end time should specify a non-zero interval, with subsequent points - * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` - * metrics, the start and end time should specify a non-zero interval, with - * subsequent points specifying the same start time and increasing end times, - * until an event resets the cumulative value to zero and sets a new start - * time for the following points. + * the start time is optional, but if it is supplied, it must equal the end + * time. For `DELTA` metrics, the start and end time should specify a + * non-zero interval, with subsequent points specifying contiguous and + * non-overlapping intervals. For `CUMULATIVE` metrics, the start and end + * time should specify a non-zero interval, with subsequent points specifying + * the same start time and increasing end times, until an event resets the + * cumulative value to zero and sets a new start time for the following + * points. * @type \Google\Cloud\Monitoring\V3\TypedValue $value * The value of the data point. * } @@ -61,13 +63,14 @@ public function __construct($data = NULL) { /** * The time interval to which the data point applies. For `GAUGE` metrics, - * only the end time of the interval is used. For `DELTA` metrics, the start - * and end time should specify a non-zero interval, with subsequent points - * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` - * metrics, the start and end time should specify a non-zero interval, with - * subsequent points specifying the same start time and increasing end times, - * until an event resets the cumulative value to zero and sets a new start - * time for the following points. + * the start time is optional, but if it is supplied, it must equal the end + * time. For `DELTA` metrics, the start and end time should specify a + * non-zero interval, with subsequent points specifying contiguous and + * non-overlapping intervals. For `CUMULATIVE` metrics, the start and end + * time should specify a non-zero interval, with subsequent points specifying + * the same start time and increasing end times, until an event resets the + * cumulative value to zero and sets a new start time for the following + * points. * * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 1; * @return \Google\Cloud\Monitoring\V3\TimeInterval @@ -79,13 +82,14 @@ public function getInterval() /** * The time interval to which the data point applies. For `GAUGE` metrics, - * only the end time of the interval is used. For `DELTA` metrics, the start - * and end time should specify a non-zero interval, with subsequent points - * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` - * metrics, the start and end time should specify a non-zero interval, with - * subsequent points specifying the same start time and increasing end times, - * until an event resets the cumulative value to zero and sets a new start - * time for the following points. + * the start time is optional, but if it is supplied, it must equal the end + * time. For `DELTA` metrics, the start and end time should specify a + * non-zero interval, with subsequent points specifying contiguous and + * non-overlapping intervals. For `CUMULATIVE` metrics, the start and end + * time should specify a non-zero interval, with subsequent points specifying + * the same start time and increasing end times, until an event resets the + * cumulative value to zero and sets a new start time for the following + * points. * * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 1; * @param \Google\Cloud\Monitoring\V3\TimeInterval $var diff --git a/Monitoring/src/V3/TimeInterval.php b/Monitoring/src/V3/TimeInterval.php index aaba683282f7..fb56a41c6bfc 100644 --- a/Monitoring/src/V3/TimeInterval.php +++ b/Monitoring/src/V3/TimeInterval.php @@ -12,7 +12,8 @@ * A closed time interval. It extends from the start time to the end time, and includes both: `[startTime, endTime]`. Valid time intervals depend on the [`MetricKind`](/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind) of the metric value. In no case can the end time be earlier than the start time. * * For a `GAUGE` metric, the `startTime` value is technically optional; if * no value is specified, the start time defaults to the value of the - * end time, and the interval represents a single point in time. Such an + * end time, and the interval represents a single point in time. If both + * start and end times are specified, they must be identical. Such an * interval is valid only for `GAUGE` metrics, which are point-in-time * measurements. * * For `DELTA` and `CUMULATIVE` metrics, the start time must be earlier diff --git a/Monitoring/src/V3/UptimeCheckConfig.php b/Monitoring/src/V3/UptimeCheckConfig.php index 2726815f74a0..57618cc75229 100644 --- a/Monitoring/src/V3/UptimeCheckConfig.php +++ b/Monitoring/src/V3/UptimeCheckConfig.php @@ -70,6 +70,15 @@ class UptimeCheckConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10; */ private $selected_regions; + /** + * If this is `true`, then checks are made only from the 'internal_checkers'. + * If it is `false`, then checks are made only from the 'selected_regions'. + * It is an error to provide 'selected_regions' when is_internal is `true`, + * or to provide 'internal_checkers' when is_internal is `false`. + * + * Generated from protobuf field bool is_internal = 15 [deprecated = true]; + */ + private $is_internal = false; /** * The internal checkers that this check will egress from. If `is_internal` is * `true` and this list is empty, the check will egress from all the @@ -134,6 +143,11 @@ class UptimeCheckConfig extends \Google\Protobuf\Internal\Message * If this field is specified, enough regions must be provided to include a * minimum of 3 locations. Not specifying this field will result in Uptime * checks running from all available regions. + * @type bool $is_internal + * If this is `true`, then checks are made only from the 'internal_checkers'. + * If it is `false`, then checks are made only from the 'selected_regions'. + * It is an error to provide 'selected_regions' when is_internal is `true`, + * or to provide 'internal_checkers' when is_internal is `false`. * @type \Google\Cloud\Monitoring\V3\InternalChecker[]|\Google\Protobuf\Internal\RepeatedField $internal_checkers * The internal checkers that this check will egress from. If `is_internal` is * `true` and this list is empty, the check will egress from all the @@ -458,6 +472,38 @@ public function setSelectedRegions($var) return $this; } + /** + * If this is `true`, then checks are made only from the 'internal_checkers'. + * If it is `false`, then checks are made only from the 'selected_regions'. + * It is an error to provide 'selected_regions' when is_internal is `true`, + * or to provide 'internal_checkers' when is_internal is `false`. + * + * Generated from protobuf field bool is_internal = 15 [deprecated = true]; + * @return bool + */ + public function getIsInternal() + { + return $this->is_internal; + } + + /** + * If this is `true`, then checks are made only from the 'internal_checkers'. + * If it is `false`, then checks are made only from the 'selected_regions'. + * It is an error to provide 'selected_regions' when is_internal is `true`, + * or to provide 'internal_checkers' when is_internal is `false`. + * + * Generated from protobuf field bool is_internal = 15 [deprecated = true]; + * @param bool $var + * @return $this + */ + public function setIsInternal($var) + { + GPBUtil::checkBool($var); + $this->is_internal = $var; + + return $this; + } + /** * The internal checkers that this check will egress from. If `is_internal` is * `true` and this list is empty, the check will egress from all the diff --git a/Monitoring/synth.metadata b/Monitoring/synth.metadata index d80983f928e3..eeead038a6e6 100644 --- a/Monitoring/synth.metadata +++ b/Monitoring/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-10-11T10:01:55.983018Z", + "updateTime": "2019-10-12T10:01:38.640634Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "192d3d8221175f7cc0aa8eeac1d820f47c53da7f", - "internalRef": "274071638" + "sha": "af8dd2c1750558b538eaa6bdaa3bc899079533ee", + "internalRef": "274260771" } } ], diff --git a/Monitoring/tests/Unit/V3/UptimeCheckServiceClientTest.php b/Monitoring/tests/Unit/V3/UptimeCheckServiceClientTest.php index 518c0c8c4d2c..201a782c6734 100644 --- a/Monitoring/tests/Unit/V3/UptimeCheckServiceClientTest.php +++ b/Monitoring/tests/Unit/V3/UptimeCheckServiceClientTest.php @@ -166,9 +166,11 @@ public function getUptimeCheckConfigTest() // Mock response $name2 = 'name2-1052831874'; $displayName = 'displayName1615086568'; + $isInternal = true; $expectedResponse = new UptimeCheckConfig(); $expectedResponse->setName($name2); $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsInternal($isInternal); $transport->addResponse($expectedResponse); // Mock request @@ -241,9 +243,11 @@ public function createUptimeCheckConfigTest() // Mock response $name = 'name3373707'; $displayName = 'displayName1615086568'; + $isInternal = true; $expectedResponse = new UptimeCheckConfig(); $expectedResponse->setName($name); $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsInternal($isInternal); $transport->addResponse($expectedResponse); // Mock request @@ -321,9 +325,11 @@ public function updateUptimeCheckConfigTest() // Mock response $name = 'name3373707'; $displayName = 'displayName1615086568'; + $isInternal = true; $expectedResponse = new UptimeCheckConfig(); $expectedResponse->setName($name); $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsInternal($isInternal); $transport->addResponse($expectedResponse); // Mock request