Class: GetAuditLogsResponse

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/schemas.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



7108
7109
7110
7111
7112
7113
# File 'lib/schemas.rb', line 7108

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    trails: d["trails"]&.map { |x| GetAuditLogsResponseTrailsItem.from_dynamic!(x) },
  )
end

.from_json!(json) ⇒ Object



7115
7116
7117
# File 'lib/schemas.rb', line 7115

def self.from_json!(json)
  from_dynamic!(JSON.parse(json))
end

Instance Method Details

#to_dynamicObject



7119
7120
7121
7122
7123
# File 'lib/schemas.rb', line 7119

def to_dynamic
  {
    "trails" => trails&.map { |x| x.to_dynamic },
  }
end

#to_json(options = nil) ⇒ Object



7125
7126
7127
# File 'lib/schemas.rb', line 7125

def to_json(options = nil)
  JSON.generate(to_dynamic, options)
end