Class: Google::Rpc::BadRequest

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/rpc/error_details.rb

Overview

Describes violations in a client request. This error type focuses on the syntactic aspects of the request.

Defined Under Namespace

Classes: FieldViolation

Instance Attribute Summary collapse

Instance Attribute Details

#field_violations::Array<::Google::Rpc::BadRequest::FieldViolation>

Returns Describes all violations in a client request.

Returns:



273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
# File 'proto_docs/google/rpc/error_details.rb', line 273

class BadRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A message type used to describe a single bad request field.
  # @!attribute [rw] field
  #   @return [::String]
  #     A path that leads to a field in the request body. The value will be a
  #     sequence of dot-separated identifiers that identify a protocol buffer
  #     field.
  #
  #     Consider the following:
  #
  #         message CreateContactRequest {
  #           message EmailAddress {
  #             enum Type {
  #               TYPE_UNSPECIFIED = 0;
  #               HOME = 1;
  #               WORK = 2;
  #             }
  #
  #             optional string email = 1;
  #             repeated EmailType type = 2;
  #           }
  #
  #           string full_name = 1;
  #           repeated EmailAddress email_addresses = 2;
  #         }
  #
  #     In this example, in proto `field` could take one of the following values:
  #
  #     * `full_name` for a violation in the `full_name` value
  #     * `email_addresses[1].email` for a violation in the `email` field of the
  #       first `email_addresses` message
  #     * `email_addresses[3].type[2]` for a violation in the second `type`
  #       value in the third `email_addresses` message.
  #
  #     In JSON, the same values are represented as:
  #
  #     * `fullName` for a violation in the `fullName` value
  #     * `emailAddresses[1].email` for a violation in the `email` field of the
  #       first `emailAddresses` message
  #     * `emailAddresses[3].type[2]` for a violation in the second `type`
  #       value in the third `emailAddresses` message.
  # @!attribute [rw] description
  #   @return [::String]
  #     A description of why the request element is bad.
  # @!attribute [rw] reason
  #   @return [::String]
  #     The reason of the field-level error. This is a constant value that
  #     identifies the proximate cause of the field-level error. It should
  #     uniquely identify the type of the FieldViolation within the scope of the
  #     google.rpc.ErrorInfo.domain. This should be at most 63
  #     characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`,
  #     which represents UPPER_SNAKE_CASE.
  # @!attribute [rw] localized_message
  #   @return [::Google::Rpc::LocalizedMessage]
  #     Provides a localized error message for field-level errors that is safe to
  #     return to the API consumer.
  class FieldViolation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end