Class: Verizon::RbsHighPrecisionTiltConfig
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::RbsHighPrecisionTiltConfig
- Defined in:
- lib/verizon/models/rbs_high_precision_tilt_config.rb
Overview
RbsHighPrecisionTiltConfig Model.
Instance Attribute Summary collapse
-
#angle_away ⇒ Integer
the threshold value, from verticle, to recognize an event.
-
#angle_toward ⇒ Integer
the threshold value, moving towards verticle, to recognize an event.
-
#hold_time ⇒ Integer
The time the threshold condition exists, in milliseconds, to recognize an event.
-
#mode ⇒ ModeEnum
the reporting mode of the tilt sensor.
-
#periodic_reporting ⇒ PeriodicReporting
The units and values of the time interval for the sensor to send a report.
-
#tscore ⇒ Tscore
the threshold value, moving towards verticle, to recognize an event.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(mode = SKIP, periodic_reporting = SKIP, hold_time = SKIP, angle_away = SKIP, angle_toward = SKIP, tscore = SKIP) ⇒ RbsHighPrecisionTiltConfig
constructor
A new instance of RbsHighPrecisionTiltConfig.
-
#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(mode = SKIP, periodic_reporting = SKIP, hold_time = SKIP, angle_away = SKIP, angle_toward = SKIP, tscore = SKIP) ⇒ RbsHighPrecisionTiltConfig
Returns a new instance of RbsHighPrecisionTiltConfig.
66 67 68 69 70 71 72 73 74 |
# File 'lib/verizon/models/rbs_high_precision_tilt_config.rb', line 66 def initialize(mode = SKIP, periodic_reporting = SKIP, hold_time = SKIP, angle_away = SKIP, angle_toward = SKIP, tscore = SKIP) @mode = mode unless mode == SKIP @periodic_reporting = periodic_reporting unless periodic_reporting == SKIP @hold_time = hold_time unless hold_time == SKIP @angle_away = angle_away unless angle_away == SKIP @angle_toward = angle_toward unless angle_toward == SKIP @tscore = tscore unless tscore == SKIP end |
Instance Attribute Details
#angle_away ⇒ Integer
the threshold value, from verticle, to recognize an event
27 28 29 |
# File 'lib/verizon/models/rbs_high_precision_tilt_config.rb', line 27 def angle_away @angle_away end |
#angle_toward ⇒ Integer
the threshold value, moving towards verticle, to recognize an event
31 32 33 |
# File 'lib/verizon/models/rbs_high_precision_tilt_config.rb', line 31 def angle_toward @angle_toward end |
#hold_time ⇒ Integer
The time the threshold condition exists, in milliseconds, to recognize an event
23 24 25 |
# File 'lib/verizon/models/rbs_high_precision_tilt_config.rb', line 23 def hold_time @hold_time end |
#mode ⇒ ModeEnum
the reporting mode of the tilt sensor
14 15 16 |
# File 'lib/verizon/models/rbs_high_precision_tilt_config.rb', line 14 def mode @mode end |
#periodic_reporting ⇒ PeriodicReporting
The units and values of the time interval for the sensor to send a report
18 19 20 |
# File 'lib/verizon/models/rbs_high_precision_tilt_config.rb', line 18 def periodic_reporting @periodic_reporting end |
#tscore ⇒ Tscore
the threshold value, moving towards verticle, to recognize an event
35 36 37 |
# File 'lib/verizon/models/rbs_high_precision_tilt_config.rb', line 35 def tscore @tscore end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/verizon/models/rbs_high_precision_tilt_config.rb', line 77 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. mode = hash.key?('mode') ? hash['mode'] : SKIP periodic_reporting = PeriodicReporting.from_hash(hash['periodic-reporting']) if hash['periodic-reporting'] hold_time = hash.key?('hold-time') ? hash['hold-time'] : SKIP angle_away = hash.key?('angle-away') ? hash['angle-away'] : SKIP angle_toward = hash.key?('angle-toward') ? hash['angle-toward'] : SKIP tscore = Tscore.from_hash(hash['tscore']) if hash['tscore'] # Create object from extracted values. RbsHighPrecisionTiltConfig.new(mode, periodic_reporting, hold_time, angle_away, angle_toward, tscore) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/verizon/models/rbs_high_precision_tilt_config.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['mode'] = 'mode' @_hash['periodic_reporting'] = 'periodic-reporting' @_hash['hold_time'] = 'hold-time' @_hash['angle_away'] = 'angle-away' @_hash['angle_toward'] = 'angle-toward' @_hash['tscore'] = 'tscore' @_hash end |
.nullables ⇒ Object
An array for nullable fields
62 63 64 |
# File 'lib/verizon/models/rbs_high_precision_tilt_config.rb', line 62 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/verizon/models/rbs_high_precision_tilt_config.rb', line 50 def self.optionals %w[ mode periodic_reporting hold_time angle_away angle_toward tscore ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
100 101 102 103 104 105 106 |
# File 'lib/verizon/models/rbs_high_precision_tilt_config.rb', line 100 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
117 118 119 120 121 122 |
# File 'lib/verizon/models/rbs_high_precision_tilt_config.rb', line 117 def inspect class_name = self.class.name.split('::').last "<#{class_name} mode: #{@mode.inspect}, periodic_reporting: #{@periodic_reporting.inspect},"\ " hold_time: #{@hold_time.inspect}, angle_away: #{@angle_away.inspect}, angle_toward:"\ " #{@angle_toward.inspect}, tscore: #{@tscore.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
109 110 111 112 113 114 |
# File 'lib/verizon/models/rbs_high_precision_tilt_config.rb', line 109 def to_s class_name = self.class.name.split('::').last "<#{class_name} mode: #{@mode}, periodic_reporting: #{@periodic_reporting}, hold_time:"\ " #{@hold_time}, angle_away: #{@angle_away}, angle_toward: #{@angle_toward}, tscore:"\ " #{@tscore}>" end |