← All changes
|
includes/sdk/google/google/common-protos/src/Rpc/BadRequest/FieldViolation.php
+100
-6
1.2.4
→
1.4.2
View file →
| @@ -1,19 +1,19 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 4 | 4 | # source: google/rpc/error_details.proto |
| 5 | -namespace Dudlewebs\WPMCS\Google\Rpc\BadRequest; | |
| 5 | +namespace Dudlewebs\WPMCS\GCP\Google\Rpc\BadRequest; | |
| 6 | 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; | |
| 7 | +use Dudlewebs\WPMCS\GCP\Google\Protobuf\Internal\GPBType; | |
| 8 | +use Dudlewebs\WPMCS\GCP\Google\Protobuf\Internal\GPBUtil; | |
| 9 | +use Dudlewebs\WPMCS\GCP\Google\Protobuf\RepeatedField; | |
| 10 | 10 | /** |
| 11 | 11 | * A message type used to describe a single bad request field. |
| 12 | 12 | * |
| 13 | 13 | * Generated from protobuf message <code>google.rpc.BadRequest.FieldViolation</code> |
| 14 | 14 | */ |
| 15 | -class FieldViolation extends \Dudlewebs\WPMCS\Google\Protobuf\Internal\Message | |
| 15 | +class FieldViolation extends \Dudlewebs\WPMCS\GCP\Google\Protobuf\Internal\Message | |
| 16 | 16 | { |
| 17 | 17 | /** |
| 18 | 18 | * A path that leads to a field in the request body. The value will be a |
| 19 | 19 | * sequence of dot-separated identifiers that identify a protocol buffer |
| @@ -54,8 +54,26 @@ | ||
| 54 | 54 | * Generated from protobuf field <code>string description = 2;</code> |
| 55 | 55 | */ |
| 56 | 56 | protected $description = ''; |
| 57 | 57 | /** |
| 58 | + * The reason of the field-level error. This is a constant value that | |
| 59 | + * identifies the proximate cause of the field-level error. It should | |
| 60 | + * uniquely identify the type of the FieldViolation within the scope of the | |
| 61 | + * google.rpc.ErrorInfo.domain. This should be at most 63 | |
| 62 | + * characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, | |
| 63 | + * which represents UPPER_SNAKE_CASE. | |
| 64 | + * | |
| 65 | + * Generated from protobuf field <code>string reason = 3;</code> | |
| 66 | + */ | |
| 67 | + protected $reason = ''; | |
| 68 | + /** | |
| 69 | + * Provides a localized error message for field-level errors that is safe to | |
| 70 | + * return to the API consumer. | |
| 71 | + * | |
| 72 | + * Generated from protobuf field <code>.google.rpc.LocalizedMessage localized_message = 4;</code> | |
| 73 | + */ | |
| 74 | + protected $localized_message = null; | |
| 75 | + /** | |
| 58 | 76 | * Constructor. |
| 59 | 77 | * |
| 60 | 78 | * @param array $data { |
| 61 | 79 | * Optional. Data for populating the Message object. |
| @@ -91,13 +109,23 @@ | ||
| 91 | 109 | * * `emailAddresses[3].type[2]` for a violation in the second `type` |
| 92 | 110 | * value in the third `emailAddresses` message. |
| 93 | 111 | * @type string $description |
| 94 | 112 | * A description of why the request element is bad. |
| 113 | + * @type string $reason | |
| 114 | + * The reason of the field-level error. This is a constant value that | |
| 115 | + * identifies the proximate cause of the field-level error. It should | |
| 116 | + * uniquely identify the type of the FieldViolation within the scope of the | |
| 117 | + * google.rpc.ErrorInfo.domain. This should be at most 63 | |
| 118 | + * characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, | |
| 119 | + * which represents UPPER_SNAKE_CASE. | |
| 120 | + * @type \Google\Rpc\LocalizedMessage $localized_message | |
| 121 | + * Provides a localized error message for field-level errors that is safe to | |
| 122 | + * return to the API consumer. | |
| 95 | 123 | * } |
| 96 | 124 | */ |
| 97 | 125 | public function __construct($data = NULL) |
| 98 | 126 | { |
| 99 | - \Dudlewebs\WPMCS\GPBMetadata\Google\Rpc\ErrorDetails::initOnce(); | |
| 127 | + \Dudlewebs\WPMCS\GCP\GPBMetadata\Google\Rpc\ErrorDetails::initOnce(); | |
| 100 | 128 | parent::__construct($data); |
| 101 | 129 | } |
| 102 | 130 | /** |
| 103 | 131 | * A path that leads to a field in the request body. The value will be a |
| @@ -198,7 +226,73 @@ | ||
| 198 | 226 | public function setDescription($var) |
| 199 | 227 | { |
| 200 | 228 | GPBUtil::checkString($var, True); |
| 201 | 229 | $this->description = $var; |
| 230 | + return $this; | |
| 231 | + } | |
| 232 | + /** | |
| 233 | + * The reason of the field-level error. This is a constant value that | |
| 234 | + * identifies the proximate cause of the field-level error. It should | |
| 235 | + * uniquely identify the type of the FieldViolation within the scope of the | |
| 236 | + * google.rpc.ErrorInfo.domain. This should be at most 63 | |
| 237 | + * characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, | |
| 238 | + * which represents UPPER_SNAKE_CASE. | |
| 239 | + * | |
| 240 | + * Generated from protobuf field <code>string reason = 3;</code> | |
| 241 | + * @return string | |
| 242 | + */ | |
| 243 | + public function getReason() | |
| 244 | + { | |
| 245 | + return $this->reason; | |
| 246 | + } | |
| 247 | + /** | |
| 248 | + * The reason of the field-level error. This is a constant value that | |
| 249 | + * identifies the proximate cause of the field-level error. It should | |
| 250 | + * uniquely identify the type of the FieldViolation within the scope of the | |
| 251 | + * google.rpc.ErrorInfo.domain. This should be at most 63 | |
| 252 | + * characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, | |
| 253 | + * which represents UPPER_SNAKE_CASE. | |
| 254 | + * | |
| 255 | + * Generated from protobuf field <code>string reason = 3;</code> | |
| 256 | + * @param string $var | |
| 257 | + * @return $this | |
| 258 | + */ | |
| 259 | + public function setReason($var) | |
| 260 | + { | |
| 261 | + GPBUtil::checkString($var, True); | |
| 262 | + $this->reason = $var; | |
| 263 | + return $this; | |
| 264 | + } | |
| 265 | + /** | |
| 266 | + * Provides a localized error message for field-level errors that is safe to | |
| 267 | + * return to the API consumer. | |
| 268 | + * | |
| 269 | + * Generated from protobuf field <code>.google.rpc.LocalizedMessage localized_message = 4;</code> | |
| 270 | + * @return \Google\Rpc\LocalizedMessage|null | |
| 271 | + */ | |
| 272 | + public function getLocalizedMessage() | |
| 273 | + { | |
| 274 | + return $this->localized_message; | |
| 275 | + } | |
| 276 | + public function hasLocalizedMessage() | |
| 277 | + { | |
| 278 | + return isset($this->localized_message); | |
| 279 | + } | |
| 280 | + public function clearLocalizedMessage() | |
| 281 | + { | |
| 282 | + unset($this->localized_message); | |
| 283 | + } | |
| 284 | + /** | |
| 285 | + * Provides a localized error message for field-level errors that is safe to | |
| 286 | + * return to the API consumer. | |
| 287 | + * | |
| 288 | + * Generated from protobuf field <code>.google.rpc.LocalizedMessage localized_message = 4;</code> | |
| 289 | + * @param \Google\Rpc\LocalizedMessage $var | |
| 290 | + * @return $this | |
| 291 | + */ | |
| 292 | + public function setLocalizedMessage($var) | |
| 293 | + { | |
| 294 | + GPBUtil::checkMessage($var, \Dudlewebs\WPMCS\GCP\Google\Rpc\LocalizedMessage::class); | |
| 295 | + $this->localized_message = $var; | |
| 202 | 296 | return $this; |
| 203 | 297 | } |
| 204 | 298 | } |