Class: Verizon::DeviceLevelUpdateTrigger
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::DeviceLevelUpdateTrigger
- Defined in:
- lib/verizon/models/device_level_update_trigger.rb
Overview
DeviceLevelUpdateTrigger Model.
Instance Attribute Summary collapse
-
#data_trigger ⇒ DataTrigger2
The type of trigger being created or modified.
-
#ecpd_id ⇒ String
The Enterprise Customer Profile Database ID.
-
#notification ⇒ Notificationarray
The type of trigger being created or modified.
-
#trigger_category ⇒ TriggerCategory
The type of trigger being created or modified.
-
#trigger_id ⇒ String
The system assigned UUID of the trigger.
-
#trigger_name ⇒ String
The user defined name of the trigger.
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(trigger_id: SKIP, trigger_name: SKIP, ecpd_id: SKIP, trigger_category: SKIP, data_trigger: SKIP, notification: SKIP) ⇒ DeviceLevelUpdateTrigger
constructor
A new instance of DeviceLevelUpdateTrigger.
-
#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(trigger_id: SKIP, trigger_name: SKIP, ecpd_id: SKIP, trigger_category: SKIP, data_trigger: SKIP, notification: SKIP) ⇒ DeviceLevelUpdateTrigger
Returns a new instance of DeviceLevelUpdateTrigger.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/verizon/models/device_level_update_trigger.rb', line 65 def initialize(trigger_id: SKIP, trigger_name: SKIP, ecpd_id: SKIP, trigger_category: SKIP, data_trigger: SKIP, notification: SKIP) @trigger_id = trigger_id unless trigger_id == SKIP @trigger_name = trigger_name unless trigger_name == SKIP @ecpd_id = ecpd_id unless ecpd_id == SKIP @trigger_category = trigger_category unless trigger_category == SKIP @data_trigger = data_trigger unless data_trigger == SKIP @notification = notification unless notification == SKIP end |
Instance Attribute Details
#data_trigger ⇒ DataTrigger2
The type of trigger being created or modified
30 31 32 |
# File 'lib/verizon/models/device_level_update_trigger.rb', line 30 def data_trigger @data_trigger end |
#ecpd_id ⇒ String
The Enterprise Customer Profile Database ID
22 23 24 |
# File 'lib/verizon/models/device_level_update_trigger.rb', line 22 def ecpd_id @ecpd_id end |
#notification ⇒ Notificationarray
The type of trigger being created or modified
34 35 36 |
# File 'lib/verizon/models/device_level_update_trigger.rb', line 34 def notification @notification end |
#trigger_category ⇒ TriggerCategory
The type of trigger being created or modified
26 27 28 |
# File 'lib/verizon/models/device_level_update_trigger.rb', line 26 def trigger_category @trigger_category end |
#trigger_id ⇒ String
The system assigned UUID of the trigger
14 15 16 |
# File 'lib/verizon/models/device_level_update_trigger.rb', line 14 def trigger_id @trigger_id end |
#trigger_name ⇒ String
The user defined name of the trigger
18 19 20 |
# File 'lib/verizon/models/device_level_update_trigger.rb', line 18 def trigger_name @trigger_name 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/device_level_update_trigger.rb', line 77 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. trigger_id = hash.key?('triggerId') ? hash['triggerId'] : SKIP trigger_name = hash.key?('triggerName') ? hash['triggerName'] : SKIP ecpd_id = hash.key?('ecpdId') ? hash['ecpdId'] : SKIP trigger_category = hash.key?('triggerCategory') ? hash['triggerCategory'] : SKIP data_trigger = DataTrigger2.from_hash(hash['dataTrigger']) if hash['dataTrigger'] notification = Notificationarray.from_hash(hash['notification']) if hash['notification'] # Create object from extracted values. DeviceLevelUpdateTrigger.new(trigger_id: trigger_id, trigger_name: trigger_name, ecpd_id: ecpd_id, trigger_category: trigger_category, data_trigger: data_trigger, notification: notification) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/verizon/models/device_level_update_trigger.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['trigger_id'] = 'triggerId' @_hash['trigger_name'] = 'triggerName' @_hash['ecpd_id'] = 'ecpdId' @_hash['trigger_category'] = 'triggerCategory' @_hash['data_trigger'] = 'dataTrigger' @_hash['notification'] = 'notification' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 |
# File 'lib/verizon/models/device_level_update_trigger.rb', line 61 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/verizon/models/device_level_update_trigger.rb', line 49 def self.optionals %w[ trigger_id trigger_name ecpd_id trigger_category data_trigger notification ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
107 108 109 110 111 112 |
# File 'lib/verizon/models/device_level_update_trigger.rb', line 107 def inspect class_name = self.class.name.split('::').last "<#{class_name} trigger_id: #{@trigger_id.inspect}, trigger_name: #{@trigger_name.inspect},"\ " ecpd_id: #{@ecpd_id.inspect}, trigger_category: #{@trigger_category.inspect},"\ " data_trigger: #{@data_trigger.inspect}, notification: #{@notification.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
99 100 101 102 103 104 |
# File 'lib/verizon/models/device_level_update_trigger.rb', line 99 def to_s class_name = self.class.name.split('::').last "<#{class_name} trigger_id: #{@trigger_id}, trigger_name: #{@trigger_name}, ecpd_id:"\ " #{@ecpd_id}, trigger_category: #{@trigger_category}, data_trigger: #{@data_trigger},"\ " notification: #{@notification}>" end |