Class: GcpIDTokenAuthLoginClass

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



608
609
610
611
612
613
# File 'lib/schemas.rb', line 608

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    identity_id: d.fetch("identityId"),
  )
end

.from_json!(json) ⇒ Object



615
616
617
# File 'lib/schemas.rb', line 615

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

Instance Method Details

#to_dynamicObject



619
620
621
622
623
# File 'lib/schemas.rb', line 619

def to_dynamic
  {
    "identityId" => identity_id,
  }
end

#to_json(options = nil) ⇒ Object



625
626
627
# File 'lib/schemas.rb', line 625

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