Class: Raas::SystemStatusResponseModel

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/raas/models/system_status_response_model.rb

Overview

Represents the response returned from the status endpoint

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(status = nil) ⇒ SystemStatusResponseModel

Returns a new instance of SystemStatusResponseModel.



18
19
20
# File 'lib/raas/models/system_status_response_model.rb', line 18

def initialize(status = nil)
  @status = status
end

Instance Attribute Details

#statusString

The status of the system

Returns:



9
10
11
# File 'lib/raas/models/system_status_response_model.rb', line 9

def status
  @status
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



23
24
25
26
27
28
29
30
31
# File 'lib/raas/models/system_status_response_model.rb', line 23

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  status = hash['status']

  # Create object from extracted values.
  SystemStatusResponseModel.new(status)
end

.namesObject

A mapping from model property names to API property names.



12
13
14
15
16
# File 'lib/raas/models/system_status_response_model.rb', line 12

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['status'] = 'status'
  @_hash
end