Class: GetSecretTypesResponse401

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



16157
16158
16159
16160
16161
16162
16163
16164
16165
# File 'lib/schemas.rb', line 16157

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

.from_json!(json) ⇒ Object



16167
16168
16169
# File 'lib/schemas.rb', line 16167

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

Instance Method Details

#to_dynamicObject



16171
16172
16173
16174
16175
16176
16177
16178
# File 'lib/schemas.rb', line 16171

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

#to_json(options = nil) ⇒ Object



16180
16181
16182
# File 'lib/schemas.rb', line 16180

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