Class: Google::Rpc::PreconditionFailure

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

Overview

Describes what preconditions have failed.

For example, if an RPC failed because it required the Terms of Service to be acknowledged, it could list the terms of service violation in the PreconditionFailure message.

Defined Under Namespace

Classes: Violation

Instance Attribute Summary collapse

Instance Attribute Details

#violations::Array<::Google::Rpc::PreconditionFailure::Violation>

Returns Describes all precondition violations.

Returns:



241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# File 'proto_docs/google/rpc/error_details.rb', line 241

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

  # A message type used to describe a single precondition failure.
  # @!attribute [rw] type
  #   @return [::String]
  #     The type of PreconditionFailure. We recommend using a service-specific
  #     enum type to define the supported precondition violation subjects. For
  #     example, "TOS" for "Terms of Service violation".
  # @!attribute [rw] subject
  #   @return [::String]
  #     The subject, relative to the type, that failed.
  #     For example, "google.com/cloud" relative to the "TOS" type would indicate
  #     which terms of service is being referenced.
  # @!attribute [rw] description
  #   @return [::String]
  #     A description of how the precondition failed. Developers can use this
  #     description to understand how to fix the failure.
  #
  #     For example: "Terms of service not accepted".
  class Violation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end