Class: SDM::HealthcheckResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rate_limit: nil, status: nil) ⇒ HealthcheckResponse

Returns a new instance of HealthcheckResponse.



9371
9372
9373
9374
9375
9376
9377
# File 'lib/models/porcelain.rb', line 9371

def initialize(
  rate_limit: nil,
  status: nil
)
  @rate_limit = rate_limit == nil ? nil : rate_limit
  @status = status == nil ? [] : status
end

Instance Attribute Details

#rate_limit ⇒ Object

Rate limit information.



9367
9368
9369
# File 'lib/models/porcelain.rb', line 9367

def rate_limit
  @rate_limit
end

#status ⇒ Object

Array of statuses of all nodes serving a secret engine



9369
9370
9371
# File 'lib/models/porcelain.rb', line 9369

def status
  @status
end

Instance Method Details

#to_json(options = {}) ⇒ Object



9379
9380
9381
9382
9383
9384
9385
# File 'lib/models/porcelain.rb', line 9379

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end