Class: MistApi::ResponseOrgSuppressAlarmItem
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::ResponseOrgSuppressAlarmItem
- Defined in:
- lib/mist_api/models/response_org_suppress_alarm_item.rb
Overview
ResponseOrgSuppressAlarmItem Model.
Instance Attribute Summary collapse
-
#duration ⇒ Integer
Duration, in seconds.
-
#expire_time ⇒ Integer
Duration, in seconds.
-
#scheduled_time ⇒ Integer
Duration, in seconds.
-
#scope ⇒ SuppressedAlarmScopeEnum
level of scope.
-
#site_id ⇒ UUID | String
level of scope.
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(duration = SKIP, expire_time = SKIP, scheduled_time = SKIP, scope = SuppressedAlarmScopeEnum::SITE, site_id = SKIP) ⇒ ResponseOrgSuppressAlarmItem
constructor
A new instance of ResponseOrgSuppressAlarmItem.
-
#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(duration = SKIP, expire_time = SKIP, scheduled_time = SKIP, scope = SuppressedAlarmScopeEnum::SITE, site_id = SKIP) ⇒ ResponseOrgSuppressAlarmItem
Returns a new instance of ResponseOrgSuppressAlarmItem.
62 63 64 65 66 67 68 69 |
# File 'lib/mist_api/models/response_org_suppress_alarm_item.rb', line 62 def initialize(duration = SKIP, expire_time = SKIP, scheduled_time = SKIP, scope = SuppressedAlarmScopeEnum::SITE, site_id = SKIP) @duration = duration unless duration == SKIP @expire_time = expire_time unless expire_time == SKIP @scheduled_time = scheduled_time unless scheduled_time == SKIP @scope = scope unless scope == SKIP @site_id = site_id unless site_id == SKIP end |
Instance Attribute Details
#duration ⇒ Integer
Duration, in seconds. Maximum duration is 86400 * 14 (14 days). 0 is to un-suppress alarms.
15 16 17 |
# File 'lib/mist_api/models/response_org_suppress_alarm_item.rb', line 15 def duration @duration end |
#expire_time ⇒ Integer
Duration, in seconds. Maximum duration is 86400 * 14 (14 days). 0 is to un-suppress alarms.
20 21 22 |
# File 'lib/mist_api/models/response_org_suppress_alarm_item.rb', line 20 def expire_time @expire_time end |
#scheduled_time ⇒ Integer
Duration, in seconds. Maximum duration is 86400 * 14 (14 days). 0 is to un-suppress alarms.
25 26 27 |
# File 'lib/mist_api/models/response_org_suppress_alarm_item.rb', line 25 def scheduled_time @scheduled_time end |
#scope ⇒ SuppressedAlarmScopeEnum
level of scope. enum: ‘org`, `site`
29 30 31 |
# File 'lib/mist_api/models/response_org_suppress_alarm_item.rb', line 29 def scope @scope end |
#site_id ⇒ UUID | String
level of scope. enum: ‘org`, `site`
33 34 35 |
# File 'lib/mist_api/models/response_org_suppress_alarm_item.rb', line 33 def site_id @site_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/mist_api/models/response_org_suppress_alarm_item.rb', line 72 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. duration = hash.key?('duration') ? hash['duration'] : SKIP expire_time = hash.key?('expire_time') ? hash['expire_time'] : SKIP scheduled_time = hash.key?('scheduled_time') ? hash['scheduled_time'] : SKIP scope = hash['scope'] ||= SuppressedAlarmScopeEnum::SITE site_id = hash.key?('site_id') ? hash['site_id'] : SKIP # Create object from extracted values. ResponseOrgSuppressAlarmItem.new(duration, expire_time, scheduled_time, scope, site_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
36 37 38 39 40 41 42 43 44 |
# File 'lib/mist_api/models/response_org_suppress_alarm_item.rb', line 36 def self.names @_hash = {} if @_hash.nil? @_hash['duration'] = 'duration' @_hash['expire_time'] = 'expire_time' @_hash['scheduled_time'] = 'scheduled_time' @_hash['scope'] = 'scope' @_hash['site_id'] = 'site_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
58 59 60 |
# File 'lib/mist_api/models/response_org_suppress_alarm_item.rb', line 58 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
47 48 49 50 51 52 53 54 55 |
# File 'lib/mist_api/models/response_org_suppress_alarm_item.rb', line 47 def self.optionals %w[ duration expire_time scheduled_time scope site_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
99 100 101 102 103 104 |
# File 'lib/mist_api/models/response_org_suppress_alarm_item.rb', line 99 def inspect class_name = self.class.name.split('::').last "<#{class_name} duration: #{@duration.inspect}, expire_time: #{@expire_time.inspect},"\ " scheduled_time: #{@scheduled_time.inspect}, scope: #{@scope.inspect}, site_id:"\ " #{@site_id.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
92 93 94 95 96 |
# File 'lib/mist_api/models/response_org_suppress_alarm_item.rb', line 92 def to_s class_name = self.class.name.split('::').last "<#{class_name} duration: #{@duration}, expire_time: #{@expire_time}, scheduled_time:"\ " #{@scheduled_time}, scope: #{@scope}, site_id: #{@site_id}>" end |