Class: PutDetectedSecretsSecretIDResponse403

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



31977
31978
31979
31980
31981
31982
31983
31984
31985
# File 'lib/schemas.rb', line 31977

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

.from_json!(json) ⇒ Object



31987
31988
31989
# File 'lib/schemas.rb', line 31987

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

Instance Method Details

#to_dynamicObject



31991
31992
31993
31994
31995
31996
31997
31998
# File 'lib/schemas.rb', line 31991

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

#to_json(options = nil) ⇒ Object



32000
32001
32002
# File 'lib/schemas.rb', line 32000

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