Class: Verizon::CauseCodeChoice3
- Defined in:
- lib/verizon/models/cause_code_choice3.rb
Overview
CauseCodeChoice3 Model.
Instance Attribute Summary collapse
-
#impassability5 ⇒ Integer
The value shall be set to: - 0 ‘unavailable` - in case further detailed information about the unmanaged road blockage is unavailable, - 1 `flooding ` - in case the road is affected by flooding, - 2 `dangerOfAvalanches` - in case the road is at risk of being affected or blocked by avalanches, - 3 `blastingOfAvalanches` - in case there is an active blasting of avalanches on or near the road, - 4 `landslips` - in case the road is affected by landslips, - 5 `chemicalSpillage` - in case the road is affected by chemical spillage, - 6 `winterClosure` - in case the road is impassable due to a winter closure.
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(impassability5 = nil) ⇒ CauseCodeChoice3
constructor
A new instance of CauseCodeChoice3.
-
#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(impassability5 = nil) ⇒ CauseCodeChoice3
Returns a new instance of CauseCodeChoice3.
70 71 72 |
# File 'lib/verizon/models/cause_code_choice3.rb', line 70 def initialize(impassability5 = nil) @impassability5 = impassability5 end |
Instance Attribute Details
#impassability5 ⇒ Integer
The value shall be set to:
-
0 ‘unavailable` - in case further detailed information
about the unmanaged road blockage is unavailable,
-
1 ‘flooding ` - in case the road is affected by flooding,
-
2 ‘dangerOfAvalanches` - in case the road is at risk of being
affected or blocked by avalanches,
-
3 ‘blastingOfAvalanches` - in case there is an active blasting of
avalanches on or near the road,
-
4 ‘landslips` - in case the road is affected by
landslips,
-
5 ‘chemicalSpillage` - in case the road is affected by chemical
spillage,
-
6 ‘winterClosure` - in case the road is impassable due to a
winter closure.
-
7 ‘sinkhole` - in case the road is impassable due to
large holes in the road surface.
-
8 ‘earthquakeDamage` - in case the road is obstructed or
partially obstructed because of damage caused by an earthquake.
-
9 ‘fallenTrees` - in case the road is obstructed or
partially obstructed by one or more fallen trees.
-
10 ‘rockfalls` - in case the road is obstructed or
partially obstructed due to fallen rocks.
-
11 ‘sewerOverflow` - in case the road is obstructed or
partially obstructed by overflows from one or more sewers.
-
12 ‘stormDamage` - in case the road is obstructed or
partially obstructed by debris caused by strong winds.
-
13 ‘subsidence` - in case the road surface has sunken or
collapsed in places.
-
14 ‘burstPipe` - in case the road surface has sunken or
collapsed in places due to burst pipes.
-
15 ‘burstWaterMain` - in case the road is obstructed due to
local flooding and/or subsidence.
-
16 ‘fallenPowerCables` - in case the road is obstructed or partly
obstructed by one or more fallen power cables.
-
17 ‘snowDrifts` - in case the road is obstructed or
partially obstructed by snow drifting in progress or patches of deep snow due to earlier drifting.
-
15-255 - are reserved for future usage.
51 52 53 |
# File 'lib/verizon/models/cause_code_choice3.rb', line 51 def impassability5 @impassability5 end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
75 76 77 78 79 80 81 82 83 84 |
# File 'lib/verizon/models/cause_code_choice3.rb', line 75 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. impassability5 = hash.key?('impassability5') ? hash['impassability5'] : nil # Create object from extracted values. CauseCodeChoice3.new(impassability5) end |
.names ⇒ Object
A mapping from model property names to API property names.
54 55 56 57 58 |
# File 'lib/verizon/models/cause_code_choice3.rb', line 54 def self.names @_hash = {} if @_hash.nil? @_hash['impassability5'] = 'impassability5' @_hash end |
.nullables ⇒ Object
An array for nullable fields
66 67 68 |
# File 'lib/verizon/models/cause_code_choice3.rb', line 66 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
61 62 63 |
# File 'lib/verizon/models/cause_code_choice3.rb', line 61 def self.optionals [] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/verizon/models/cause_code_choice3.rb', line 88 def self.validate(value) if value.instance_of? self return APIHelper.valid_type?(value.impassability5, ->(val) { val.instance_of? Integer }) end return false unless value.instance_of? Hash APIHelper.valid_type?(value['impassability5'], ->(val) { val.instance_of? Integer }) end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
107 108 109 110 |
# File 'lib/verizon/models/cause_code_choice3.rb', line 107 def inspect class_name = self.class.name.split('::').last "<#{class_name} impassability5: #{@impassability5.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
101 102 103 104 |
# File 'lib/verizon/models/cause_code_choice3.rb', line 101 def to_s class_name = self.class.name.split('::').last "<#{class_name} impassability5: #{@impassability5}>" end |