Class: Pago::V2026_04::Models::EventMetadataInput

Inherits:
Model
  • Object
show all
Defined in:
lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  _cost: "_cost",
  _llm: "_llm"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
[].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw

Constructor Details

#initialize(_cost: ::Pago::UNSET, _llm: ::Pago::UNSET) ⇒ EventMetadataInput

Returns a new instance of EventMetadataInput.

Parameters:



24933
24934
24935
24936
24937
24938
24939
24940
# File 'lib/pago/v2026_04/models.rb', line 24933

def initialize(
  _cost: ::Pago::UNSET,
  _llm: ::Pago::UNSET
)
  super()
  assign(:_cost, _cost)
  assign(:_llm, _llm)
end

Instance Attribute Details

#_costModels::CostMetadataInput (readonly)



24928
24929
24930
# File 'lib/pago/v2026_04/models.rb', line 24928

def _cost
  @_cost
end

#_llmModels::LLMMetadata (readonly)

Returns:



24931
24932
24933
# File 'lib/pago/v2026_04/models.rb', line 24931

def _llm
  @_llm
end

Class Method Details

.from_json(data) ⇒ EventMetadataInput?

Parameters:

  • data (Hash, String, nil)

Returns:



24944
24945
24946
24947
24948
24949
24950
24951
24952
24953
24954
24955
24956
# File 'lib/pago/v2026_04/models.rb', line 24944

def self.from_json(data)
  data = ::JSON.parse(data) if data.is_a?(String)
  data = ::Pago::Serde.object(data)
  return nil if data.nil?

  wrap_raw(
    new(
      _cost: (data.key?("_cost") ? Models::CostMetadataInput.from_json(data["_cost"]) : ::Pago::UNSET),
      _llm: (data.key?("_llm") ? Models::LLMMetadata.from_json(data["_llm"]) : ::Pago::UNSET)
    ),
    data
  )
end