diff --git a/Monitoring/metadata/V3/Uptime.php b/Monitoring/metadata/V3/Uptime.php index 563d73af539..138f8a9e643 100644 --- a/Monitoring/metadata/V3/Uptime.php +++ b/Monitoring/metadata/V3/Uptime.php @@ -18,7 +18,7 @@ public static function initOnce() { \GPBMetadata\Google\Api\Resource::initOnce(); \GPBMetadata\Google\Protobuf\Duration::initOnce(); $pool->internalAddGeneratedFile(hex2bin( - "0aaf140a21676f6f676c652f6d6f6e69746f72696e672f76332f75707469" . + "0add160a21676f6f676c652f6d6f6e69746f72696e672f76332f75707469" . "6d652e70726f746f1214676f6f676c652e6d6f6e69746f72696e672e7633" . "1a19676f6f676c652f6170692f7265736f757263652e70726f746f1a1e67" . "6f6f676c652f70726f746f6275662f6475726174696f6e2e70726f746f22" . @@ -29,7 +29,7 @@ public static function initOnce() { "7461746518072001280e322b2e676f6f676c652e6d6f6e69746f72696e67" . "2e76332e496e7465726e616c436865636b65722e537461746522330a0553" . "74617465120f0a0b554e5350454349464945441000120c0a084352454154" . - "494e471001120b0a0752554e4e494e4710023a02180122cd0d0a11557074" . + "494e471001120b0a0752554e4e494e4710023a02180122fb0f0a11557074" . "696d65436865636b436f6e666967120c0a046e616d651801200128091214" . "0a0c646973706c61795f6e616d65180220012809123b0a126d6f6e69746f" . "7265645f7265736f7572636518032001280b321d2e676f6f676c652e6170" . @@ -55,56 +55,67 @@ public static function initOnce() { "6b6572420218011a610a0d5265736f7572636547726f757012100a086772" . "6f75705f6964180120012809123e0a0d7265736f757263655f7479706518" . "022001280e32272e676f6f676c652e6d6f6e69746f72696e672e76332e47" . - "726f75705265736f75726365547970651afa020a0948747470436865636b" . - "120f0a077573655f73736c180120012808120c0a04706174681802200128" . - "09120c0a04706f727418032001280512580a09617574685f696e666f1804" . - "2001280b32452e676f6f676c652e6d6f6e69746f72696e672e76332e5570" . - "74696d65436865636b436f6e6669672e48747470436865636b2e42617369" . - "6341757468656e7469636174696f6e12140a0c6d61736b5f686561646572" . - "73180520012808124f0a076865616465727318062003280b323e2e676f6f" . + "726f75705265736f75726365547970651aa8050a0948747470436865636b" . + "12570a0e726571756573745f6d6574686f6418082001280e323f2e676f6f" . "676c652e6d6f6e69746f72696e672e76332e557074696d65436865636b43" . - "6f6e6669672e48747470436865636b2e48656164657273456e7472791214" . - "0a0c76616c69646174655f73736c1807200128081a390a13426173696341" . - "757468656e7469636174696f6e12100a08757365726e616d651801200128" . - "0912100a0870617373776f72641802200128091a2e0a0c48656164657273" . - "456e747279120b0a036b6579180120012809120d0a0576616c7565180220" . - "0128093a0238011a180a08546370436865636b120c0a04706f7274180120" . - "0128051a98020a0e436f6e74656e744d617463686572120f0a07636f6e74" . - "656e74180120012809125c0a076d61746368657218022001280e324b2e67" . - "6f6f676c652e6d6f6e69746f72696e672e76332e557074696d6543686563" . - "6b436f6e6669672e436f6e74656e744d6174636865722e436f6e74656e74" . - "4d6174636865724f7074696f6e2296010a14436f6e74656e744d61746368" . - "65724f7074696f6e12260a22434f4e54454e545f4d4154434845525f4f50" . - "54494f4e5f554e535045434946494544100012130a0f434f4e5441494e53" . - "5f535452494e47100112170a134e4f545f434f4e5441494e535f53545249" . - "4e47100212110a0d4d4154434845535f5245474558100312150a114e4f54" . - "5f4d4154434845535f524547455810043af301ea41ef010a2b6d6f6e6974" . - "6f72696e672e676f6f676c65617069732e636f6d2f557074696d65436865" . - "636b436f6e666967123b70726f6a656374732f7b70726f6a6563747d2f75" . - "7074696d65436865636b436f6e666967732f7b757074696d655f63686563" . - "6b5f636f6e6669677d12456f7267616e697a6174696f6e732f7b6f726761" . - "6e697a6174696f6e7d2f757074696d65436865636b436f6e666967732f7b" . - "757074696d655f636865636b5f636f6e6669677d1239666f6c646572732f" . - "7b666f6c6465727d2f757074696d65436865636b436f6e666967732f7b75" . - "7074696d655f636865636b5f636f6e6669677d12012a420a0a087265736f" . - "7572636542140a12636865636b5f726571756573745f74797065226e0a0d" . - "557074696d65436865636b497012370a06726567696f6e18012001280e32" . - "272e676f6f676c652e6d6f6e69746f72696e672e76332e557074696d6543" . - "6865636b526567696f6e12100a086c6f636174696f6e1802200128091212" . - "0a0a69705f616464726573731803200128092a650a11557074696d654368" . - "65636b526567696f6e12160a12524547494f4e5f554e5350454349464945" . - "44100012070a035553411001120a0a064555524f5045100212110a0d534f" . - "5554485f414d4552494341100312100a0c415349415f5041434946494310" . - "042a5b0a1147726f75705265736f7572636554797065121d0a195245534f" . - "555243455f545950455f554e5350454349464945441000120c0a08494e53" . - "54414e4345100112190a154157535f454c425f4c4f41445f42414c414e43" . - "4552100242c3010a18636f6d2e676f6f676c652e6d6f6e69746f72696e67" . - "2e7633420b557074696d6550726f746f50015a3e676f6f676c652e676f6c" . - "616e672e6f72672f67656e70726f746f2f676f6f676c65617069732f6d6f" . - "6e69746f72696e672f76333b6d6f6e69746f72696e67aa021a476f6f676c" . - "652e436c6f75642e4d6f6e69746f72696e672e5633ca021a476f6f676c65" . - "5c436c6f75645c4d6f6e69746f72696e675c5633ea021d476f6f676c653a" . - "3a436c6f75643a3a4d6f6e69746f72696e673a3a5633620670726f746f33" + "6f6e6669672e48747470436865636b2e526571756573744d6574686f6412" . + "0f0a077573655f73736c180120012808120c0a0470617468180220012809" . + "120c0a04706f727418032001280512580a09617574685f696e666f180420" . + "01280b32452e676f6f676c652e6d6f6e69746f72696e672e76332e557074" . + "696d65436865636b436f6e6669672e48747470436865636b2e4261736963" . + "41757468656e7469636174696f6e12140a0c6d61736b5f68656164657273" . + "180520012808124f0a076865616465727318062003280b323e2e676f6f67" . + "6c652e6d6f6e69746f72696e672e76332e557074696d65436865636b436f" . + "6e6669672e48747470436865636b2e48656164657273456e74727912530a" . + "0c636f6e74656e745f7479706518092001280e323d2e676f6f676c652e6d" . + "6f6e69746f72696e672e76332e557074696d65436865636b436f6e666967" . + "2e48747470436865636b2e436f6e74656e745479706512140a0c76616c69" . + "646174655f73736c180720012808120c0a04626f6479180a2001280c1a39" . + "0a13426173696341757468656e7469636174696f6e12100a08757365726e" . + "616d6518012001280912100a0870617373776f72641802200128091a2e0a" . + "0c48656164657273456e747279120b0a036b6579180120012809120d0a05" . + "76616c75651802200128093a023801223a0a0d526571756573744d657468" . + "6f6412160a124d4554484f445f554e535045434946494544100012070a03" . + "474554100112080a04504f5354100222340a0b436f6e74656e7454797065" . + "12140a10545950455f554e5350454349464945441000120f0a0b55524c5f" . + "454e434f44454410011a180a08546370436865636b120c0a04706f727418" . + "01200128051a98020a0e436f6e74656e744d617463686572120f0a07636f" . + "6e74656e74180120012809125c0a076d61746368657218022001280e324b" . + "2e676f6f676c652e6d6f6e69746f72696e672e76332e557074696d654368" . + "65636b436f6e6669672e436f6e74656e744d6174636865722e436f6e7465" . + "6e744d6174636865724f7074696f6e2296010a14436f6e74656e744d6174" . + "636865724f7074696f6e12260a22434f4e54454e545f4d4154434845525f" . + "4f5054494f4e5f554e535045434946494544100012130a0f434f4e544149" . + "4e535f535452494e47100112170a134e4f545f434f4e5441494e535f5354" . + "52494e47100212110a0d4d4154434845535f5245474558100312150a114e" . + "4f545f4d4154434845535f524547455810043af301ea41ef010a2b6d6f6e" . + "69746f72696e672e676f6f676c65617069732e636f6d2f557074696d6543" . + "6865636b436f6e666967123b70726f6a656374732f7b70726f6a6563747d" . + "2f757074696d65436865636b436f6e666967732f7b757074696d655f6368" . + "65636b5f636f6e6669677d12456f7267616e697a6174696f6e732f7b6f72" . + "67616e697a6174696f6e7d2f757074696d65436865636b436f6e66696773" . + "2f7b757074696d655f636865636b5f636f6e6669677d1239666f6c646572" . + "732f7b666f6c6465727d2f757074696d65436865636b436f6e666967732f" . + "7b757074696d655f636865636b5f636f6e6669677d12012a420a0a087265" . + "736f7572636542140a12636865636b5f726571756573745f74797065226e" . + "0a0d557074696d65436865636b497012370a06726567696f6e1801200128" . + "0e32272e676f6f676c652e6d6f6e69746f72696e672e76332e557074696d" . + "65436865636b526567696f6e12100a086c6f636174696f6e180220012809" . + "12120a0a69705f616464726573731803200128092a650a11557074696d65" . + "436865636b526567696f6e12160a12524547494f4e5f554e535045434946" . + "494544100012070a035553411001120a0a064555524f5045100212110a0d" . + "534f5554485f414d4552494341100312100a0c415349415f504143494649" . + "4310042a5b0a1147726f75705265736f7572636554797065121d0a195245" . + "534f555243455f545950455f554e5350454349464945441000120c0a0849" . + "4e5354414e4345100112190a154157535f454c425f4c4f41445f42414c41" . + "4e434552100242c3010a18636f6d2e676f6f676c652e6d6f6e69746f7269" . + "6e672e7633420b557074696d6550726f746f50015a3e676f6f676c652e67" . + "6f6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069732f" . + "6d6f6e69746f72696e672f76333b6d6f6e69746f72696e67aa021a476f6f" . + "676c652e436c6f75642e4d6f6e69746f72696e672e5633ca021a476f6f67" . + "6c655c436c6f75645c4d6f6e69746f72696e675c5633ea021d476f6f676c" . + "653a3a436c6f75643a3a4d6f6e69746f72696e673a3a5633620670726f74" . + "6f33" ), true); static::$is_initialized = true; diff --git a/Monitoring/src/V3/UptimeCheckConfig/HttpCheck.php b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck.php index 30387e19007..40cbc942e71 100644 --- a/Monitoring/src/V3/UptimeCheckConfig/HttpCheck.php +++ b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck.php @@ -15,6 +15,12 @@ */ class HttpCheck extends \Google\Protobuf\Internal\Message { + /** + * The HTTP request method to use for the check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod request_method = 8; + */ + private $request_method = 0; /** * If `true`, use HTTPS instead of HTTP to run the check. * @@ -71,6 +77,12 @@ class HttpCheck extends \Google\Protobuf\Internal\Message * Generated from protobuf field map headers = 6; */ private $headers; + /** + * The content type to use for the check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType content_type = 9; + */ + private $content_type = 0; /** * Boolean specifying whether to include SSL certificate validation as a * part of the Uptime check. Only applies to checks where @@ -80,6 +92,16 @@ class HttpCheck extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool validate_ssl = 7; */ private $validate_ssl = false; + /** + * The request body associated with the HTTP request. If `content_type` is + * `URL_ENCODED`, the body passed in must be URL-encoded. Users can provide + * a `Content-Length` header via the `headers` field or the API will do + * so. The maximum byte size is 1 megabyte. Note: As with all `bytes` fields + * JSON representations are base64 encoded. + * + * Generated from protobuf field bytes body = 10; + */ + private $body = ''; /** * Constructor. @@ -87,6 +109,8 @@ class HttpCheck extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * + * @type int $request_method + * The HTTP request method to use for the check. * @type bool $use_ssl * If `true`, use HTTPS instead of HTTP to run the check. * @type string $path @@ -119,11 +143,19 @@ class HttpCheck extends \Google\Protobuf\Internal\Message * Entering two separate headers with the same key in a Create call will * cause the first to be overwritten by the second. * The maximum number of headers allowed is 100. + * @type int $content_type + * The content type to use for the check. * @type bool $validate_ssl * Boolean specifying whether to include SSL certificate validation as a * part of the Uptime check. Only applies to checks where * `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, * setting `validate_ssl` to `true` has no effect. + * @type string $body + * The request body associated with the HTTP request. If `content_type` is + * `URL_ENCODED`, the body passed in must be URL-encoded. Users can provide + * a `Content-Length` header via the `headers` field or the API will do + * so. The maximum byte size is 1 megabyte. Note: As with all `bytes` fields + * JSON representations are base64 encoded. * } */ public function __construct($data = NULL) { @@ -131,6 +163,32 @@ public function __construct($data = NULL) { parent::__construct($data); } + /** + * The HTTP request method to use for the check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod request_method = 8; + * @return int + */ + public function getRequestMethod() + { + return $this->request_method; + } + + /** + * The HTTP request method to use for the check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod request_method = 8; + * @param int $var + * @return $this + */ + public function setRequestMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_RequestMethod::class); + $this->request_method = $var; + + return $this; + } + /** * If `true`, use HTTPS instead of HTTP to run the check. * @@ -327,6 +385,32 @@ public function setHeaders($var) return $this; } + /** + * The content type to use for the check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType content_type = 9; + * @return int + */ + public function getContentType() + { + return $this->content_type; + } + + /** + * The content type to use for the check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType content_type = 9; + * @param int $var + * @return $this + */ + public function setContentType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_ContentType::class); + $this->content_type = $var; + + return $this; + } + /** * Boolean specifying whether to include SSL certificate validation as a * part of the Uptime check. Only applies to checks where @@ -359,6 +443,40 @@ public function setValidateSsl($var) return $this; } + /** + * The request body associated with the HTTP request. If `content_type` is + * `URL_ENCODED`, the body passed in must be URL-encoded. Users can provide + * a `Content-Length` header via the `headers` field or the API will do + * so. The maximum byte size is 1 megabyte. Note: As with all `bytes` fields + * JSON representations are base64 encoded. + * + * Generated from protobuf field bytes body = 10; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * The request body associated with the HTTP request. If `content_type` is + * `URL_ENCODED`, the body passed in must be URL-encoded. Users can provide + * a `Content-Length` header via the `headers` field or the API will do + * so. The maximum byte size is 1 megabyte. Note: As with all `bytes` fields + * JSON representations are base64 encoded. + * + * Generated from protobuf field bytes body = 10; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, False); + $this->body = $var; + + return $this; + } + } // Adding a class alias for backwards compatibility with the previous class name. diff --git a/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ContentType.php b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ContentType.php new file mode 100644 index 00000000000..1f1028ea6b0 --- /dev/null +++ b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ContentType.php @@ -0,0 +1,61 @@ +google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType + */ +class ContentType +{ + /** + * No content type specified. If the request method is POST, an + * unspecified content type results in a check creation rejection. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * `body` is in URL-encoded form. Equivalent to setting the `Content-Type` + * to `application/x-www-form-urlencoded` in the HTTP request. + * + * Generated from protobuf enum URL_ENCODED = 1; + */ + const URL_ENCODED = 1; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::URL_ENCODED => 'URL_ENCODED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ContentType::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_ContentType::class); + diff --git a/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/RequestMethod.php b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/RequestMethod.php new file mode 100644 index 00000000000..981e2cbc372 --- /dev/null +++ b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/RequestMethod.php @@ -0,0 +1,64 @@ +google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod + */ +class RequestMethod +{ + /** + * No request method specified. + * + * Generated from protobuf enum METHOD_UNSPECIFIED = 0; + */ + const METHOD_UNSPECIFIED = 0; + /** + * GET request. + * + * Generated from protobuf enum GET = 1; + */ + const GET = 1; + /** + * POST request. + * + * Generated from protobuf enum POST = 2; + */ + const POST = 2; + + private static $valueToName = [ + self::METHOD_UNSPECIFIED => 'METHOD_UNSPECIFIED', + self::GET => 'GET', + self::POST => 'POST', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RequestMethod::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_RequestMethod::class); + diff --git a/Monitoring/src/V3/UptimeCheckConfig_HttpCheck_ContentType.php b/Monitoring/src/V3/UptimeCheckConfig_HttpCheck_ContentType.php new file mode 100644 index 00000000000..f3453c3058b --- /dev/null +++ b/Monitoring/src/V3/UptimeCheckConfig_HttpCheck_ContentType.php @@ -0,0 +1,16 @@ +\n8eff3790f88b50706a0c4b6a20b385f24e9ac4e7\nfeat: common postprocessing for node libraries (#485)\n\nCo-authored-by: Justin Beckwith \n21c3b57ae54ae9db6a3a6b48b31c970c6ab56f19\nbuild(nodejs): remove unused codecov config (#486)\n\n\n" + "sha": "04cb397eb7590ea1e6c10a39fca3d8fe0fb3d256" } } ],