Class: KubernetesAuthMethod

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



179
180
181
182
183
184
185
# File 'lib/schemas.rb', line 179

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



187
188
189
# File 'lib/schemas.rb', line 187

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

Instance Method Details

#to_dynamicObject



191
192
193
194
195
196
# File 'lib/schemas.rb', line 191

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

#to_json(options = nil) ⇒ Object



198
199
200
# File 'lib/schemas.rb', line 198

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