Class: MistApi::UiSettingsDefaultTimeRange
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::UiSettingsDefaultTimeRange
- Defined in:
- lib/mist_api/models/ui_settings_default_time_range.rb
Overview
UiSettingsDefaultTimeRange Model.
Instance Attribute Summary collapse
-
#end_date ⇒ String
TODO: Write general description for this method.
-
#interval ⇒ String
TODO: Write general description for this method.
-
#mend ⇒ Integer
TODO: Write general description for this method.
-
#name ⇒ String
TODO: Write general description for this method.
-
#short_name ⇒ String
TODO: Write general description for this method.
-
#start ⇒ Integer
TODO: Write general description for this method.
-
#use_preset ⇒ TrueClass | FalseClass
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(mend = SKIP, end_date = SKIP, interval = SKIP, name = SKIP, short_name = SKIP, start = SKIP, use_preset = SKIP) ⇒ UiSettingsDefaultTimeRange
constructor
A new instance of UiSettingsDefaultTimeRange.
-
#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(mend = SKIP, end_date = SKIP, interval = SKIP, name = SKIP, short_name = SKIP, start = SKIP, use_preset = SKIP) ⇒ UiSettingsDefaultTimeRange
Returns a new instance of UiSettingsDefaultTimeRange.
71 72 73 74 75 76 77 78 79 80 |
# File 'lib/mist_api/models/ui_settings_default_time_range.rb', line 71 def initialize(mend = SKIP, end_date = SKIP, interval = SKIP, name = SKIP, short_name = SKIP, start = SKIP, use_preset = SKIP) @mend = mend unless mend == SKIP @end_date = end_date unless end_date == SKIP @interval = interval unless interval == SKIP @name = name unless name == SKIP @short_name = short_name unless short_name == SKIP @start = start unless start == SKIP @use_preset = use_preset unless use_preset == SKIP end |
Instance Attribute Details
#end_date ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/ui_settings_default_time_range.rb', line 18 def end_date @end_date end |
#interval ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/ui_settings_default_time_range.rb', line 22 def interval @interval end |
#mend ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/ui_settings_default_time_range.rb', line 14 def mend @mend end |
#name ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/ui_settings_default_time_range.rb', line 26 def name @name end |
#short_name ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/ui_settings_default_time_range.rb', line 30 def short_name @short_name end |
#start ⇒ Integer
TODO: Write general description for this method
34 35 36 |
# File 'lib/mist_api/models/ui_settings_default_time_range.rb', line 34 def start @start end |
#use_preset ⇒ TrueClass | FalseClass
TODO: Write general description for this method
38 39 40 |
# File 'lib/mist_api/models/ui_settings_default_time_range.rb', line 38 def use_preset @use_preset end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/mist_api/models/ui_settings_default_time_range.rb', line 83 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. mend = hash.key?('end') ? hash['end'] : SKIP end_date = hash.key?('endDate') ? hash['endDate'] : SKIP interval = hash.key?('interval') ? hash['interval'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP short_name = hash.key?('shortName') ? hash['shortName'] : SKIP start = hash.key?('start') ? hash['start'] : SKIP use_preset = hash.key?('usePreset') ? hash['usePreset'] : SKIP # Create object from extracted values. UiSettingsDefaultTimeRange.new(mend, end_date, interval, name, short_name, start, use_preset) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/mist_api/models/ui_settings_default_time_range.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['mend'] = 'end' @_hash['end_date'] = 'endDate' @_hash['interval'] = 'interval' @_hash['name'] = 'name' @_hash['short_name'] = 'shortName' @_hash['start'] = 'start' @_hash['use_preset'] = 'usePreset' @_hash end |
.nullables ⇒ Object
An array for nullable fields
67 68 69 |
# File 'lib/mist_api/models/ui_settings_default_time_range.rb', line 67 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/mist_api/models/ui_settings_default_time_range.rb', line 54 def self.optionals %w[ mend end_date interval name short_name start use_preset ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
113 114 115 116 117 118 |
# File 'lib/mist_api/models/ui_settings_default_time_range.rb', line 113 def inspect class_name = self.class.name.split('::').last "<#{class_name} mend: #{@mend.inspect}, end_date: #{@end_date.inspect}, interval:"\ " #{@interval.inspect}, name: #{@name.inspect}, short_name: #{@short_name.inspect}, start:"\ " #{@start.inspect}, use_preset: #{@use_preset.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
106 107 108 109 110 |
# File 'lib/mist_api/models/ui_settings_default_time_range.rb', line 106 def to_s class_name = self.class.name.split('::').last "<#{class_name} mend: #{@mend}, end_date: #{@end_date}, interval: #{@interval}, name:"\ " #{@name}, short_name: #{@short_name}, start: #{@start}, use_preset: #{@use_preset}>" end |