Class: PutDetectedSecretsSecretIDResponseHistoryItem

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



31848
31849
31850
31851
31852
31853
31854
31855
# File 'lib/schemas.rb', line 31848

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    actor:      d["actor"],
    created_at: d["createdAt"],
    resolution: d["resolution"],
  )
end

.from_json!(json) ⇒ Object



31857
31858
31859
# File 'lib/schemas.rb', line 31857

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

Instance Method Details

#to_dynamicObject



31861
31862
31863
31864
31865
31866
31867
# File 'lib/schemas.rb', line 31861

def to_dynamic
  {
    "actor"      => actor,
    "createdAt"  => created_at,
    "resolution" => resolution,
  }
end

#to_json(options = nil) ⇒ Object



31869
31870
31871
# File 'lib/schemas.rb', line 31869

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