Class: MistApi::ResponseZoneSearchItem
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::ResponseZoneSearchItem
- Defined in:
- lib/mist_api/models/response_zone_search_item.rb
Overview
ResponseZoneSearchItem Model.
Instance Attribute Summary collapse
-
#enter ⇒ Integer
TODO: Write general description for this method.
-
#scope ⇒ String
TODO: Write general description for this method.
-
#timestamp ⇒ Float
Epoch (seconds).
-
#user ⇒ String
Epoch (seconds).
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(enter = SKIP, scope = SKIP, timestamp = SKIP, user = SKIP) ⇒ ResponseZoneSearchItem
constructor
A new instance of ResponseZoneSearchItem.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(enter = SKIP, scope = SKIP, timestamp = SKIP, user = SKIP) ⇒ ResponseZoneSearchItem
Returns a new instance of ResponseZoneSearchItem.
53 54 55 56 57 58 |
# File 'lib/mist_api/models/response_zone_search_item.rb', line 53 def initialize(enter = SKIP, scope = SKIP, = SKIP, user = SKIP) @enter = enter unless enter == SKIP @scope = scope unless scope == SKIP @timestamp = unless == SKIP @user = user unless user == SKIP end |
Instance Attribute Details
#enter ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/response_zone_search_item.rb', line 14 def enter @enter end |
#scope ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/response_zone_search_item.rb', line 18 def scope @scope end |
#timestamp ⇒ Float
Epoch (seconds)
22 23 24 |
# File 'lib/mist_api/models/response_zone_search_item.rb', line 22 def @timestamp end |
#user ⇒ String
Epoch (seconds)
26 27 28 |
# File 'lib/mist_api/models/response_zone_search_item.rb', line 26 def user @user end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/mist_api/models/response_zone_search_item.rb', line 61 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. enter = hash.key?('enter') ? hash['enter'] : SKIP scope = hash.key?('scope') ? hash['scope'] : SKIP = hash.key?('timestamp') ? hash['timestamp'] : SKIP user = hash.key?('user') ? hash['user'] : SKIP # Create object from extracted values. ResponseZoneSearchItem.new(enter, scope, , user) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/mist_api/models/response_zone_search_item.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['enter'] = 'enter' @_hash['scope'] = 'scope' @_hash['timestamp'] = 'timestamp' @_hash['user'] = 'user' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 |
# File 'lib/mist_api/models/response_zone_search_item.rb', line 49 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 46 |
# File 'lib/mist_api/models/response_zone_search_item.rb', line 39 def self.optionals %w[ enter scope timestamp user ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
85 86 87 88 89 |
# File 'lib/mist_api/models/response_zone_search_item.rb', line 85 def inspect class_name = self.class.name.split('::').last "<#{class_name} enter: #{@enter.inspect}, scope: #{@scope.inspect}, timestamp:"\ " #{@timestamp.inspect}, user: #{@user.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
78 79 80 81 82 |
# File 'lib/mist_api/models/response_zone_search_item.rb', line 78 def to_s class_name = self.class.name.split('::').last "<#{class_name} enter: #{@enter}, scope: #{@scope}, timestamp: #{@timestamp}, user:"\ " #{@user}>" end |