Class: MultiAuthSample::ServiceStatus
- Defined in:
- lib/multi_auth_sample/models/service_status.rb
Overview
ServiceStatus Model.
Instance Attribute Summary collapse
-
#app ⇒ String
TODO: Write general description for this method.
-
#moto ⇒ String
TODO: Write general description for this method.
-
#notes ⇒ Integer
TODO: Write general description for this method.
-
#os ⇒ String
TODO: Write general description for this method.
-
#php_version ⇒ String
TODO: Write general description for this method.
-
#status ⇒ String
TODO: Write general description for this method.
-
#time ⇒ String
TODO: Write general description for this method.
-
#users ⇒ Integer
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(status = nil, app = SKIP, moto = SKIP, notes = SKIP, users = SKIP, time = SKIP, os = SKIP, php_version = SKIP, additional_properties = {}) ⇒ ServiceStatus
constructor
A new instance of ServiceStatus.
Methods inherited from BaseModel
Constructor Details
#initialize(status = nil, app = SKIP, moto = SKIP, notes = SKIP, users = SKIP, time = SKIP, os = SKIP, php_version = SKIP, additional_properties = {}) ⇒ ServiceStatus
Returns a new instance of ServiceStatus.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/multi_auth_sample/models/service_status.rb', line 76 def initialize(status = nil, app = SKIP, moto = SKIP, notes = SKIP, users = SKIP, time = SKIP, os = SKIP, php_version = SKIP, additional_properties = {}) @app = app unless app == SKIP @moto = moto unless moto == SKIP @notes = notes unless notes == SKIP @users = users unless users == SKIP @time = time unless time == SKIP @os = os unless os == SKIP @php_version = php_version unless php_version == SKIP @status = status # Add additional model properties to the instance. additional_properties.each do |_name, _value| instance_variable_set("@#{_name}", _value) end end |
Instance Attribute Details
#app ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/multi_auth_sample/models/service_status.rb', line 14 def app @app end |
#moto ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/multi_auth_sample/models/service_status.rb', line 18 def moto @moto end |
#notes ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/multi_auth_sample/models/service_status.rb', line 22 def notes @notes end |
#os ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/multi_auth_sample/models/service_status.rb', line 34 def os @os end |
#php_version ⇒ String
TODO: Write general description for this method
38 39 40 |
# File 'lib/multi_auth_sample/models/service_status.rb', line 38 def php_version @php_version end |
#status ⇒ String
TODO: Write general description for this method
42 43 44 |
# File 'lib/multi_auth_sample/models/service_status.rb', line 42 def status @status end |
#time ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/multi_auth_sample/models/service_status.rb', line 30 def time @time end |
#users ⇒ Integer
TODO: Write general description for this method
26 27 28 |
# File 'lib/multi_auth_sample/models/service_status.rb', line 26 def users @users end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/multi_auth_sample/models/service_status.rb', line 101 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. status = hash.key?('status') ? hash['status'] : nil app = hash.key?('app') ? hash['app'] : SKIP moto = hash.key?('moto') ? hash['moto'] : SKIP notes = hash.key?('notes') ? hash['notes'] : SKIP users = hash.key?('users') ? hash['users'] : SKIP time = hash.key?('time') ? hash['time'] : SKIP os = hash.key?('os') ? hash['os'] : SKIP php_version = hash.key?('php_version') ? hash['php_version'] : SKIP # Clean out expected properties from Hash. names.each_value { |k| hash.delete(k) } # Create object from extracted values. ServiceStatus.new(status, app, moto, notes, users, time, os, php_version, hash) end |
.names ⇒ Object
A mapping from model property names to API property names.
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/multi_auth_sample/models/service_status.rb', line 45 def self.names @_hash = {} if @_hash.nil? @_hash['app'] = 'app' @_hash['moto'] = 'moto' @_hash['notes'] = 'notes' @_hash['users'] = 'users' @_hash['time'] = 'time' @_hash['os'] = 'os' @_hash['php_version'] = 'php_version' @_hash['status'] = 'status' @_hash end |
.nullables ⇒ Object
An array for nullable fields
72 73 74 |
# File 'lib/multi_auth_sample/models/service_status.rb', line 72 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/multi_auth_sample/models/service_status.rb', line 59 def self.optionals %w[ app moto notes users time os php_version ] end |