media-cloud-sync
/
includes
/
sdk
/
google
/
google
/
common-protos
/
src
/
Rpc
/
BadRequest
/
FieldViolation.php
FieldViolation.php in Media Cloud Sync 1.4.2, at includes/sdk/google/google/common-protos/src/Rpc/BadRequest/FieldViolation.php
| 1 | <?php |
| 2 | |
| 3 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 4 | # source: google/rpc/error_details.proto |
| 5 | namespace Dudlewebs\WPMCS\GCP\Google\Rpc\BadRequest; |
| 6 | |
| 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 | /** |
| 11 | * A message type used to describe a single bad request field. |
| 12 | * |
| 13 | * Generated from protobuf message <code>google.rpc.BadRequest.FieldViolation</code> |
| 14 | */ |
| 15 | class FieldViolation extends \Dudlewebs\WPMCS\GCP\Google\Protobuf\Internal\Message |
| 16 | { |
| 17 | /** |
| 18 | * A path that leads to a field in the request body. The value will be a |
| 19 | * sequence of dot-separated identifiers that identify a protocol buffer |
| 20 | * field. |
| 21 | * Consider the following: |
| 22 | * message CreateContactRequest { |
| 23 | * message EmailAddress { |
| 24 | * enum Type { |
| 25 | * TYPE_UNSPECIFIED = 0; |
| 26 | * HOME = 1; |
| 27 | * WORK = 2; |
| 28 | * } |
| 29 | * optional string email = 1; |
| 30 | * repeated EmailType type = 2; |
| 31 | * } |
| 32 | * string full_name = 1; |
| 33 | * repeated EmailAddress email_addresses = 2; |
| 34 | * } |
| 35 | * In this example, in proto `field` could take one of the following values: |
| 36 | * * `full_name` for a violation in the `full_name` value |
| 37 | * * `email_addresses[1].email` for a violation in the `email` field of the |
| 38 | * first `email_addresses` message |
| 39 | * * `email_addresses[3].type[2]` for a violation in the second `type` |
| 40 | * value in the third `email_addresses` message. |
| 41 | * In JSON, the same values are represented as: |
| 42 | * * `fullName` for a violation in the `fullName` value |
| 43 | * * `emailAddresses[1].email` for a violation in the `email` field of the |
| 44 | * first `emailAddresses` message |
| 45 | * * `emailAddresses[3].type[2]` for a violation in the second `type` |
| 46 | * value in the third `emailAddresses` message. |
| 47 | * |
| 48 | * Generated from protobuf field <code>string field = 1;</code> |
| 49 | */ |
| 50 | protected $field = ''; |
| 51 | /** |
| 52 | * A description of why the request element is bad. |
| 53 | * |
| 54 | * Generated from protobuf field <code>string description = 2;</code> |
| 55 | */ |
| 56 | protected $description = ''; |
| 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 | /** |
| 76 | * Constructor. |
| 77 | * |
| 78 | * @param array $data { |
| 79 | * Optional. Data for populating the Message object. |
| 80 | * |
| 81 | * @type string $field |
| 82 | * A path that leads to a field in the request body. The value will be a |
| 83 | * sequence of dot-separated identifiers that identify a protocol buffer |
| 84 | * field. |
| 85 | * Consider the following: |
| 86 | * message CreateContactRequest { |
| 87 | * message EmailAddress { |
| 88 | * enum Type { |
| 89 | * TYPE_UNSPECIFIED = 0; |
| 90 | * HOME = 1; |
| 91 | * WORK = 2; |
| 92 | * } |
| 93 | * optional string email = 1; |
| 94 | * repeated EmailType type = 2; |
| 95 | * } |
| 96 | * string full_name = 1; |
| 97 | * repeated EmailAddress email_addresses = 2; |
| 98 | * } |
| 99 | * In this example, in proto `field` could take one of the following values: |
| 100 | * * `full_name` for a violation in the `full_name` value |
| 101 | * * `email_addresses[1].email` for a violation in the `email` field of the |
| 102 | * first `email_addresses` message |
| 103 | * * `email_addresses[3].type[2]` for a violation in the second `type` |
| 104 | * value in the third `email_addresses` message. |
| 105 | * In JSON, the same values are represented as: |
| 106 | * * `fullName` for a violation in the `fullName` value |
| 107 | * * `emailAddresses[1].email` for a violation in the `email` field of the |
| 108 | * first `emailAddresses` message |
| 109 | * * `emailAddresses[3].type[2]` for a violation in the second `type` |
| 110 | * value in the third `emailAddresses` message. |
| 111 | * @type string $description |
| 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. |
| 123 | * } |
| 124 | */ |
| 125 | public function __construct($data = NULL) |
| 126 | { |
| 127 | \Dudlewebs\WPMCS\GCP\GPBMetadata\Google\Rpc\ErrorDetails::initOnce(); |
| 128 | parent::__construct($data); |
| 129 | } |
| 130 | /** |
| 131 | * A path that leads to a field in the request body. The value will be a |
| 132 | * sequence of dot-separated identifiers that identify a protocol buffer |
| 133 | * field. |
| 134 | * Consider the following: |
| 135 | * message CreateContactRequest { |
| 136 | * message EmailAddress { |
| 137 | * enum Type { |
| 138 | * TYPE_UNSPECIFIED = 0; |
| 139 | * HOME = 1; |
| 140 | * WORK = 2; |
| 141 | * } |
| 142 | * optional string email = 1; |
| 143 | * repeated EmailType type = 2; |
| 144 | * } |
| 145 | * string full_name = 1; |
| 146 | * repeated EmailAddress email_addresses = 2; |
| 147 | * } |
| 148 | * In this example, in proto `field` could take one of the following values: |
| 149 | * * `full_name` for a violation in the `full_name` value |
| 150 | * * `email_addresses[1].email` for a violation in the `email` field of the |
| 151 | * first `email_addresses` message |
| 152 | * * `email_addresses[3].type[2]` for a violation in the second `type` |
| 153 | * value in the third `email_addresses` message. |
| 154 | * In JSON, the same values are represented as: |
| 155 | * * `fullName` for a violation in the `fullName` value |
| 156 | * * `emailAddresses[1].email` for a violation in the `email` field of the |
| 157 | * first `emailAddresses` message |
| 158 | * * `emailAddresses[3].type[2]` for a violation in the second `type` |
| 159 | * value in the third `emailAddresses` message. |
| 160 | * |
| 161 | * Generated from protobuf field <code>string field = 1;</code> |
| 162 | * @return string |
| 163 | */ |
| 164 | public function getField() |
| 165 | { |
| 166 | return $this->field; |
| 167 | } |
| 168 | /** |
| 169 | * A path that leads to a field in the request body. The value will be a |
| 170 | * sequence of dot-separated identifiers that identify a protocol buffer |
| 171 | * field. |
| 172 | * Consider the following: |
| 173 | * message CreateContactRequest { |
| 174 | * message EmailAddress { |
| 175 | * enum Type { |
| 176 | * TYPE_UNSPECIFIED = 0; |
| 177 | * HOME = 1; |
| 178 | * WORK = 2; |
| 179 | * } |
| 180 | * optional string email = 1; |
| 181 | * repeated EmailType type = 2; |
| 182 | * } |
| 183 | * string full_name = 1; |
| 184 | * repeated EmailAddress email_addresses = 2; |
| 185 | * } |
| 186 | * In this example, in proto `field` could take one of the following values: |
| 187 | * * `full_name` for a violation in the `full_name` value |
| 188 | * * `email_addresses[1].email` for a violation in the `email` field of the |
| 189 | * first `email_addresses` message |
| 190 | * * `email_addresses[3].type[2]` for a violation in the second `type` |
| 191 | * value in the third `email_addresses` message. |
| 192 | * In JSON, the same values are represented as: |
| 193 | * * `fullName` for a violation in the `fullName` value |
| 194 | * * `emailAddresses[1].email` for a violation in the `email` field of the |
| 195 | * first `emailAddresses` message |
| 196 | * * `emailAddresses[3].type[2]` for a violation in the second `type` |
| 197 | * value in the third `emailAddresses` message. |
| 198 | * |
| 199 | * Generated from protobuf field <code>string field = 1;</code> |
| 200 | * @param string $var |
| 201 | * @return $this |
| 202 | */ |
| 203 | public function setField($var) |
| 204 | { |
| 205 | GPBUtil::checkString($var, True); |
| 206 | $this->field = $var; |
| 207 | return $this; |
| 208 | } |
| 209 | /** |
| 210 | * A description of why the request element is bad. |
| 211 | * |
| 212 | * Generated from protobuf field <code>string description = 2;</code> |
| 213 | * @return string |
| 214 | */ |
| 215 | public function getDescription() |
| 216 | { |
| 217 | return $this->description; |
| 218 | } |
| 219 | /** |
| 220 | * A description of why the request element is bad. |
| 221 | * |
| 222 | * Generated from protobuf field <code>string description = 2;</code> |
| 223 | * @param string $var |
| 224 | * @return $this |
| 225 | */ |
| 226 | public function setDescription($var) |
| 227 | { |
| 228 | GPBUtil::checkString($var, True); |
| 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; |
| 296 | return $this; |
| 297 | } |
| 298 | } |
| 299 |