Class: Falcon::DomainDiscoverAPIAccount
- Inherits:
-
Object
- Object
- Falcon::DomainDiscoverAPIAccount
- Defined in:
- lib/crimson-falcon/models/domain_discover_api_account.rb
Overview
Represents information about an account.
Instance Attribute Summary collapse
-
#account_name ⇒ Object
The account’s name (Domain\Username or Hostname\Username).
-
#account_type ⇒ Object
The type of the account (Local or Domain).
-
#admin_privileges ⇒ Object
Whether the account has administrator privileges (Yes, No, or Unknown).
-
#cid ⇒ Object
The account’s customer ID.
-
#first_seen_timestamp ⇒ Object
The first time the account was seen successfully logging in to your environment.
-
#id ⇒ Object
The unique ID of the account.
-
#last_failed_login_hostname ⇒ Object
The hostname of the asset on which the account last made a failed login.
-
#last_failed_login_timestamp ⇒ Object
The date and time of the account’s most recent failed login.
-
#last_failed_login_type ⇒ Object
The type of the account’s most recent failed login.
-
#last_successful_login_host_city ⇒ Object
The name of the city where the asset is located on which the account last successfully logged in.
-
#last_successful_login_host_country ⇒ Object
The name of the country where the asset is located on which the account last successfully logged in.
-
#last_successful_login_hostname ⇒ Object
The hostname of the asset on which the account last successfully logged in.
-
#last_successful_login_remote_ip ⇒ Object
The remote IP address of the asset on which the account last successfully logged in.
-
#last_successful_login_timestamp ⇒ Object
The date and time of the account’s most recent successful login.
-
#last_successful_login_type ⇒ Object
The type of the account’s most recent successful login.
-
#local_admin_privileges ⇒ Object
Whether the account has local administrator privileges (Yes, No).
-
#login_domain ⇒ Object
The domain of the asset the account successfully logged in to.
-
#password_last_set_timestamp ⇒ Object
The most recent date and time the account’s password was changed.
-
#user_sid ⇒ Object
The account’s security identifier on Windows assets.
-
#username ⇒ Object
The account’s username.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ DomainDiscoverAPIAccount
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ DomainDiscoverAPIAccount
Initializes the object
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 202 203 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 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 161 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DomainDiscoverAPIAccount` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DomainDiscoverAPIAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'account_name') self.account_name = attributes[:'account_name'] end if attributes.key?(:'account_type') self.account_type = attributes[:'account_type'] end if attributes.key?(:'admin_privileges') self.admin_privileges = attributes[:'admin_privileges'] end if attributes.key?(:'cid') self.cid = attributes[:'cid'] end if attributes.key?(:'first_seen_timestamp') self. = attributes[:'first_seen_timestamp'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'last_failed_login_hostname') self.last_failed_login_hostname = attributes[:'last_failed_login_hostname'] end if attributes.key?(:'last_failed_login_timestamp') self. = attributes[:'last_failed_login_timestamp'] end if attributes.key?(:'last_failed_login_type') self.last_failed_login_type = attributes[:'last_failed_login_type'] end if attributes.key?(:'last_successful_login_host_city') self.last_successful_login_host_city = attributes[:'last_successful_login_host_city'] end if attributes.key?(:'last_successful_login_host_country') self.last_successful_login_host_country = attributes[:'last_successful_login_host_country'] end if attributes.key?(:'last_successful_login_hostname') self.last_successful_login_hostname = attributes[:'last_successful_login_hostname'] end if attributes.key?(:'last_successful_login_remote_ip') self.last_successful_login_remote_ip = attributes[:'last_successful_login_remote_ip'] end if attributes.key?(:'last_successful_login_timestamp') self. = attributes[:'last_successful_login_timestamp'] end if attributes.key?(:'last_successful_login_type') self.last_successful_login_type = attributes[:'last_successful_login_type'] end if attributes.key?(:'local_admin_privileges') self.local_admin_privileges = attributes[:'local_admin_privileges'] end if attributes.key?(:'login_domain') self.login_domain = attributes[:'login_domain'] end if attributes.key?(:'password_last_set_timestamp') self. = attributes[:'password_last_set_timestamp'] end if attributes.key?(:'user_sid') self.user_sid = attributes[:'user_sid'] end if attributes.key?(:'username') self.username = attributes[:'username'] end end |
Instance Attribute Details
#account_name ⇒ Object
The account’s name (Domain\Username or Hostname\Username).
37 38 39 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 37 def account_name @account_name end |
#account_type ⇒ Object
The type of the account (Local or Domain).
40 41 42 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 40 def account_type @account_type end |
#admin_privileges ⇒ Object
Whether the account has administrator privileges (Yes, No, or Unknown).
43 44 45 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 43 def admin_privileges @admin_privileges end |
#cid ⇒ Object
The account’s customer ID.
46 47 48 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 46 def cid @cid end |
#first_seen_timestamp ⇒ Object
The first time the account was seen successfully logging in to your environment.
49 50 51 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 49 def @first_seen_timestamp end |
#id ⇒ Object
The unique ID of the account.
52 53 54 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 52 def id @id end |
#last_failed_login_hostname ⇒ Object
The hostname of the asset on which the account last made a failed login.
55 56 57 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 55 def last_failed_login_hostname @last_failed_login_hostname end |
#last_failed_login_timestamp ⇒ Object
The date and time of the account’s most recent failed login.
58 59 60 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 58 def @last_failed_login_timestamp end |
#last_failed_login_type ⇒ Object
The type of the account’s most recent failed login. <ul><li>Interactive</li><li>Network</li><li>Batch</li><li>Service</li><li>Unlock</li><li>Network cleartext</li><li>New credentials</li><li>Terminal server</li><li>Cached credentials</li><li>Auditing</li></ul>
61 62 63 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 61 def last_failed_login_type @last_failed_login_type end |
#last_successful_login_host_city ⇒ Object
The name of the city where the asset is located on which the account last successfully logged in.
64 65 66 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 64 def last_successful_login_host_city @last_successful_login_host_city end |
#last_successful_login_host_country ⇒ Object
The name of the country where the asset is located on which the account last successfully logged in.
67 68 69 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 67 def last_successful_login_host_country @last_successful_login_host_country end |
#last_successful_login_hostname ⇒ Object
The hostname of the asset on which the account last successfully logged in.
70 71 72 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 70 def last_successful_login_hostname @last_successful_login_hostname end |
#last_successful_login_remote_ip ⇒ Object
The remote IP address of the asset on which the account last successfully logged in.
73 74 75 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 73 def last_successful_login_remote_ip @last_successful_login_remote_ip end |
#last_successful_login_timestamp ⇒ Object
The date and time of the account’s most recent successful login.
76 77 78 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 76 def @last_successful_login_timestamp end |
#last_successful_login_type ⇒ Object
The type of the account’s most recent successful login. <ul><li>Interactive</li><li>Service</li><li>Terminal server</li><li>Cached credentials</li><li>Auditing</li></ul>
79 80 81 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 79 def last_successful_login_type @last_successful_login_type end |
#local_admin_privileges ⇒ Object
Whether the account has local administrator privileges (Yes, No).
82 83 84 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 82 def local_admin_privileges @local_admin_privileges end |
#login_domain ⇒ Object
The domain of the asset the account successfully logged in to.
85 86 87 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 85 def login_domain @login_domain end |
#password_last_set_timestamp ⇒ Object
The most recent date and time the account’s password was changed.
88 89 90 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 88 def @password_last_set_timestamp end |
#user_sid ⇒ Object
The account’s security identifier on Windows assets.
91 92 93 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 91 def user_sid @user_sid end |
#username ⇒ Object
The account’s username.
94 95 96 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 94 def username @username end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
123 124 125 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 123 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 97 def self.attribute_map { :'account_name' => :'account_name', :'account_type' => :'account_type', :'admin_privileges' => :'admin_privileges', :'cid' => :'cid', :'first_seen_timestamp' => :'first_seen_timestamp', :'id' => :'id', :'last_failed_login_hostname' => :'last_failed_login_hostname', :'last_failed_login_timestamp' => :'last_failed_login_timestamp', :'last_failed_login_type' => :'last_failed_login_type', :'last_successful_login_host_city' => :'last_successful_login_host_city', :'last_successful_login_host_country' => :'last_successful_login_host_country', :'last_successful_login_hostname' => :'last_successful_login_hostname', :'last_successful_login_remote_ip' => :'last_successful_login_remote_ip', :'last_successful_login_timestamp' => :'last_successful_login_timestamp', :'last_successful_login_type' => :'last_successful_login_type', :'local_admin_privileges' => :'local_admin_privileges', :'login_domain' => :'login_domain', :'password_last_set_timestamp' => :'password_last_set_timestamp', :'user_sid' => :'user_sid', :'username' => :'username' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
320 321 322 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 320 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
154 155 156 157 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 154 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 128 def self.openapi_types { :'account_name' => :'String', :'account_type' => :'String', :'admin_privileges' => :'String', :'cid' => :'String', :'first_seen_timestamp' => :'String', :'id' => :'String', :'last_failed_login_hostname' => :'String', :'last_failed_login_timestamp' => :'String', :'last_failed_login_type' => :'String', :'last_successful_login_host_city' => :'String', :'last_successful_login_host_country' => :'String', :'last_successful_login_hostname' => :'String', :'last_successful_login_remote_ip' => :'String', :'last_successful_login_timestamp' => :'String', :'last_successful_login_type' => :'String', :'local_admin_privileges' => :'String', :'login_domain' => :'String', :'password_last_set_timestamp' => :'String', :'user_sid' => :'String', :'username' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 280 def ==(o) return true if self.equal?(o) self.class == o.class && account_name == o.account_name && account_type == o.account_type && admin_privileges == o.admin_privileges && cid == o.cid && == o. && id == o.id && last_failed_login_hostname == o.last_failed_login_hostname && == o. && last_failed_login_type == o.last_failed_login_type && last_successful_login_host_city == o.last_successful_login_host_city && last_successful_login_host_country == o.last_successful_login_host_country && last_successful_login_hostname == o.last_successful_login_hostname && last_successful_login_remote_ip == o.last_successful_login_remote_ip && == o. && last_successful_login_type == o.last_successful_login_type && local_admin_privileges == o.local_admin_privileges && login_domain == o.login_domain && == o. && user_sid == o.user_sid && username == o.username end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 351 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = Falcon.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
422 423 424 425 426 427 428 429 430 431 432 433 434 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 422 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 327 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
307 308 309 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 307 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
313 314 315 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 313 def hash [account_name, account_type, admin_privileges, cid, , id, last_failed_login_hostname, , last_failed_login_type, last_successful_login_host_city, last_successful_login_host_country, last_successful_login_hostname, last_successful_login_remote_ip, , last_successful_login_type, local_admin_privileges, login_domain, , user_sid, username].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 257 def list_invalid_properties invalid_properties = Array.new if @cid.nil? invalid_properties.push('invalid value for "cid", cid cannot be nil.') end if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
398 399 400 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 398 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
404 405 406 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 404 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
392 393 394 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 392 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
272 273 274 275 276 |
# File 'lib/crimson-falcon/models/domain_discover_api_account.rb', line 272 def valid? return false if @cid.nil? return false if @id.nil? true end |