Class: CtdDocumentation::Site
- Defined in:
- lib/ctd_documentation/models/site.rb
Overview
Site Model.
Instance Attribute Summary collapse
-
#address ⇒ String
TODO: Write general description for this method.
-
#assets_count ⇒ Integer
TODO: Write general description for this method.
-
#auto_transition_to_operational ⇒ TrueClass|FalseClass
TODO: Write general description for this method.
-
#description ⇒ String
TODO: Write general description for this method.
-
#id ⇒ Integer
TODO: Write general description for this method.
-
#image_url ⇒ String
TODO: Write general description for this method.
-
#installed_date ⇒ String
TODO: Write general description for this method.
-
#integrity_alerts_severity_name ⇒ String
TODO: Write general description for this method.
-
#integrity_alerts_severity_number ⇒ Integer
TODO: Write general description for this method.
-
#is_connected ⇒ TrueClass|FalseClass
TODO: Write general description for this method.
-
#name ⇒ String
TODO: Write general description for this method.
-
#score ⇒ Integer
TODO: Write general description for this method.
-
#security_alerts_severity_name ⇒ String
TODO: Write general description for this method.
-
#security_alerts_severity_number ⇒ Integer
TODO: Write general description for this method.
-
#training_mode ⇒ TrueClass|FalseClass
TODO: Write general description for this method.
-
#unresolved_integrity_alerts_count ⇒ Integer
TODO: Write general description for this method.
-
#unresolved_security_alerts_count ⇒ Integer
TODO: Write general description for this method.
-
#version ⇒ String
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
Methods inherited from BaseModel
Constructor Details
#initialize(address = SKIP, assets_count = SKIP, auto_transition_to_operational = SKIP, description = SKIP, id = SKIP, image_url = SKIP, installed_date = SKIP, integrity_alerts_severity_number = SKIP, integrity_alerts_severity_name = SKIP, is_connected = SKIP, name = SKIP, score = SKIP, security_alerts_severity_number = SKIP, security_alerts_severity_name = SKIP, training_mode = SKIP, unresolved_integrity_alerts_count = SKIP, unresolved_security_alerts_count = SKIP, version = SKIP) ⇒ Site
Returns a new instance of Site.
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/ctd_documentation/models/site.rb', line 144 def initialize(address = SKIP, assets_count = SKIP, auto_transition_to_operational = SKIP, description = SKIP, id = SKIP, image_url = SKIP, installed_date = SKIP, integrity_alerts_severity_number = SKIP, integrity_alerts_severity_name = SKIP, is_connected = SKIP, name = SKIP, score = SKIP, security_alerts_severity_number = SKIP, security_alerts_severity_name = SKIP, training_mode = SKIP, unresolved_integrity_alerts_count = SKIP, unresolved_security_alerts_count = SKIP, version = SKIP) @address = address unless address == SKIP @assets_count = assets_count unless assets_count == SKIP unless auto_transition_to_operational == SKIP @auto_transition_to_operational = auto_transition_to_operational end @description = description unless description == SKIP @id = id unless id == SKIP @image_url = image_url unless image_url == SKIP @installed_date = installed_date unless installed_date == SKIP unless integrity_alerts_severity_number == SKIP @integrity_alerts_severity_number = integrity_alerts_severity_number end unless integrity_alerts_severity_name == SKIP @integrity_alerts_severity_name = integrity_alerts_severity_name end @is_connected = is_connected unless is_connected == SKIP @name = name unless name == SKIP @score = score unless score == SKIP unless security_alerts_severity_number == SKIP @security_alerts_severity_number = security_alerts_severity_number end unless security_alerts_severity_name == SKIP @security_alerts_severity_name = security_alerts_severity_name end @training_mode = training_mode unless training_mode == SKIP unless unresolved_integrity_alerts_count == SKIP @unresolved_integrity_alerts_count = unresolved_integrity_alerts_count end unless unresolved_security_alerts_count == SKIP @unresolved_security_alerts_count = unresolved_security_alerts_count end @version = version unless version == SKIP end |
Instance Attribute Details
#address ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/ctd_documentation/models/site.rb', line 14 def address @address end |
#assets_count ⇒ Integer
TODO: Write general description for this method
18 19 20 |
# File 'lib/ctd_documentation/models/site.rb', line 18 def assets_count @assets_count end |
#auto_transition_to_operational ⇒ TrueClass|FalseClass
TODO: Write general description for this method
22 23 24 |
# File 'lib/ctd_documentation/models/site.rb', line 22 def auto_transition_to_operational @auto_transition_to_operational end |
#description ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/ctd_documentation/models/site.rb', line 26 def description @description end |
#id ⇒ Integer
TODO: Write general description for this method
30 31 32 |
# File 'lib/ctd_documentation/models/site.rb', line 30 def id @id end |
#image_url ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/ctd_documentation/models/site.rb', line 34 def image_url @image_url end |
#installed_date ⇒ String
TODO: Write general description for this method
38 39 40 |
# File 'lib/ctd_documentation/models/site.rb', line 38 def installed_date @installed_date end |
#integrity_alerts_severity_name ⇒ String
TODO: Write general description for this method
46 47 48 |
# File 'lib/ctd_documentation/models/site.rb', line 46 def integrity_alerts_severity_name @integrity_alerts_severity_name end |
#integrity_alerts_severity_number ⇒ Integer
TODO: Write general description for this method
42 43 44 |
# File 'lib/ctd_documentation/models/site.rb', line 42 def integrity_alerts_severity_number @integrity_alerts_severity_number end |
#is_connected ⇒ TrueClass|FalseClass
TODO: Write general description for this method
50 51 52 |
# File 'lib/ctd_documentation/models/site.rb', line 50 def is_connected @is_connected end |
#name ⇒ String
TODO: Write general description for this method
54 55 56 |
# File 'lib/ctd_documentation/models/site.rb', line 54 def name @name end |
#score ⇒ Integer
TODO: Write general description for this method
58 59 60 |
# File 'lib/ctd_documentation/models/site.rb', line 58 def score @score end |
#security_alerts_severity_name ⇒ String
TODO: Write general description for this method
66 67 68 |
# File 'lib/ctd_documentation/models/site.rb', line 66 def security_alerts_severity_name @security_alerts_severity_name end |
#security_alerts_severity_number ⇒ Integer
TODO: Write general description for this method
62 63 64 |
# File 'lib/ctd_documentation/models/site.rb', line 62 def security_alerts_severity_number @security_alerts_severity_number end |
#training_mode ⇒ TrueClass|FalseClass
TODO: Write general description for this method
70 71 72 |
# File 'lib/ctd_documentation/models/site.rb', line 70 def training_mode @training_mode end |
#unresolved_integrity_alerts_count ⇒ Integer
TODO: Write general description for this method
74 75 76 |
# File 'lib/ctd_documentation/models/site.rb', line 74 def unresolved_integrity_alerts_count @unresolved_integrity_alerts_count end |
#unresolved_security_alerts_count ⇒ Integer
TODO: Write general description for this method
78 79 80 |
# File 'lib/ctd_documentation/models/site.rb', line 78 def unresolved_security_alerts_count @unresolved_security_alerts_count end |
#version ⇒ String
TODO: Write general description for this method
82 83 84 |
# File 'lib/ctd_documentation/models/site.rb', line 82 def version @version end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/ctd_documentation/models/site.rb', line 204 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. address = hash.key?('address') ? hash['address'] : SKIP assets_count = hash.key?('assets_count') ? hash['assets_count'] : SKIP auto_transition_to_operational = hash.key?('auto_transition_to_operational') ? hash['auto_transition_to_operational'] : SKIP description = hash.key?('description') ? hash['description'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP image_url = hash.key?('image_url') ? hash['image_url'] : SKIP installed_date = hash.key?('installed_date') ? hash['installed_date'] : SKIP integrity_alerts_severity_number = hash.key?('integrity_alerts_severity_number') ? hash['integrity_alerts_severity_number'] : SKIP integrity_alerts_severity_name = hash.key?('integrity_alerts_severity_name') ? hash['integrity_alerts_severity_name'] : SKIP is_connected = hash.key?('is_connected') ? hash['is_connected'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP score = hash.key?('score') ? hash['score'] : SKIP security_alerts_severity_number = hash.key?('security_alerts_severity_number') ? hash['security_alerts_severity_number'] : SKIP security_alerts_severity_name = hash.key?('security_alerts_severity_name') ? hash['security_alerts_severity_name'] : SKIP training_mode = hash.key?('training_mode') ? hash['training_mode'] : SKIP unresolved_integrity_alerts_count = hash.key?('unresolved_integrity_alerts_count') ? hash['unresolved_integrity_alerts_count'] : SKIP unresolved_security_alerts_count = hash.key?('unresolved_security_alerts_count') ? hash['unresolved_security_alerts_count'] : SKIP version = hash.key?('version') ? hash['version'] : SKIP # Create object from extracted values. Site.new(address, assets_count, auto_transition_to_operational, description, id, image_url, installed_date, integrity_alerts_severity_number, integrity_alerts_severity_name, is_connected, name, score, security_alerts_severity_number, security_alerts_severity_name, training_mode, unresolved_integrity_alerts_count, unresolved_security_alerts_count, version) end |
.names ⇒ Object
A mapping from model property names to API property names.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/ctd_documentation/models/site.rb', line 85 def self.names @_hash = {} if @_hash.nil? @_hash['address'] = 'address' @_hash['assets_count'] = 'assets_count' @_hash['auto_transition_to_operational'] = 'auto_transition_to_operational' @_hash['description'] = 'description' @_hash['id'] = 'id' @_hash['image_url'] = 'image_url' @_hash['installed_date'] = 'installed_date' @_hash['integrity_alerts_severity_number'] = 'integrity_alerts_severity_number' @_hash['integrity_alerts_severity_name'] = 'integrity_alerts_severity_name' @_hash['is_connected'] = 'is_connected' @_hash['name'] = 'name' @_hash['score'] = 'score' @_hash['security_alerts_severity_number'] = 'security_alerts_severity_number' @_hash['security_alerts_severity_name'] = 'security_alerts_severity_name' @_hash['training_mode'] = 'training_mode' @_hash['unresolved_integrity_alerts_count'] = 'unresolved_integrity_alerts_count' @_hash['unresolved_security_alerts_count'] = 'unresolved_security_alerts_count' @_hash['version'] = 'version' @_hash end |
.nullables ⇒ Object
An array for nullable fields
140 141 142 |
# File 'lib/ctd_documentation/models/site.rb', line 140 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/ctd_documentation/models/site.rb', line 116 def self.optionals %w[ address assets_count auto_transition_to_operational description id image_url installed_date integrity_alerts_severity_number integrity_alerts_severity_name is_connected name score security_alerts_severity_number security_alerts_severity_name training_mode unresolved_integrity_alerts_count unresolved_security_alerts_count version ] end |