Class: PostDetectedSecretsQueriesResponse500

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



23030
23031
23032
23033
23034
23035
23036
23037
23038
# File 'lib/schemas.rb', line 23030

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

.from_json!(json) ⇒ Object



23040
23041
23042
# File 'lib/schemas.rb', line 23040

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

Instance Method Details

#to_dynamicObject



23044
23045
23046
23047
23048
23049
23050
23051
# File 'lib/schemas.rb', line 23044

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

#to_json(options = nil) ⇒ Object



23053
23054
23055
# File 'lib/schemas.rb', line 23053

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