Class: KubernetesAuthLoginClass

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



684
685
686
687
688
689
690
# File 'lib/schemas.rb', line 684

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

.from_json!(json) ⇒ Object



692
693
694
# File 'lib/schemas.rb', line 692

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

Instance Method Details

#to_dynamicObject



696
697
698
699
700
701
# File 'lib/schemas.rb', line 696

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

#to_json(options = nil) ⇒ Object



703
704
705
# File 'lib/schemas.rb', line 703

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