Class: PutDetectedSecretsSecretIDResponse500

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



32019
32020
32021
32022
32023
32024
32025
32026
32027
# File 'lib/schemas.rb', line 32019

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    instance:                                        d["instance"],
    status:                                          d["status"],
    title:                                           d["title"],
    put_detected_secrets_secret_id_response500_type: d["type"],
  )
end

.from_json!(json) ⇒ Object



32029
32030
32031
# File 'lib/schemas.rb', line 32029

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

Instance Method Details

#to_dynamicObject



32033
32034
32035
32036
32037
32038
32039
32040
# File 'lib/schemas.rb', line 32033

def to_dynamic
  {
    "instance" => instance,
    "status"   => status,
    "title"    => title,
    "type"     => put_detected_secrets_secret_id_response500_type,
  }
end

#to_json(options = nil) ⇒ Object



32042
32043
32044
# File 'lib/schemas.rb', line 32042

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