Class: Google::Apis::ServicenetworkingV1beta::CustomError

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/servicenetworking_v1beta/classes.rb,
generated/google/apis/servicenetworking_v1beta/representations.rb,
generated/google/apis/servicenetworking_v1beta/representations.rb

Overview

Customize service error responses. For example, list any service specific protobuf types that can appear in error detail lists of error responses. Example: custom_error: types:

  • google.foo.v1.CustomError
  • google.foo.v1.AnotherError

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ CustomError

Returns a new instance of CustomError



749
750
751
# File 'generated/google/apis/servicenetworking_v1beta/classes.rb', line 749

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#rulesArray<Google::Apis::ServicenetworkingV1beta::CustomErrorRule>

The list of custom error rules that apply to individual API messages. NOTE: All service configuration rules follow "last one wins" order. Corresponds to the JSON property rules



742
743
744
# File 'generated/google/apis/servicenetworking_v1beta/classes.rb', line 742

def rules
  @rules
end

#typesArray<String>

The list of custom error detail types, e.g. 'google.foo.v1.CustomError'. Corresponds to the JSON property types

Returns:

  • (Array<String>)


747
748
749
# File 'generated/google/apis/servicenetworking_v1beta/classes.rb', line 747

def types
  @types
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



754
755
756
757
# File 'generated/google/apis/servicenetworking_v1beta/classes.rb', line 754

def update!(**args)
  @rules = args[:rules] if args.key?(:rules)
  @types = args[:types] if args.key?(:types)
end