Class: MistApi::WebhookDeviceUpdownsEvent
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::WebhookDeviceUpdownsEvent
- Defined in:
- lib/mist_api/models/webhook_device_updowns_event.rb
Overview
WebhookDeviceUpdownsEvent Model.
Instance Attribute Summary collapse
-
#ap ⇒ String
TODO: Write general description for this method.
-
#ap_name ⇒ String
TODO: Write general description for this method.
-
#for_site ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#org_id ⇒ UUID | String
TODO: Write general description for this method.
-
#site_id ⇒ UUID | String
TODO: Write general description for this method.
-
#site_name ⇒ String
TODO: Write general description for this method.
-
#timestamp ⇒ Float
Epoch (seconds).
-
#type ⇒ String
Epoch (seconds).
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(ap = nil, ap_name = nil, org_id = nil, site_id = nil, site_name = nil, timestamp = nil, type = nil, for_site = SKIP) ⇒ WebhookDeviceUpdownsEvent
constructor
A new instance of WebhookDeviceUpdownsEvent.
-
#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(ap = nil, ap_name = nil, org_id = nil, site_id = nil, site_name = nil, timestamp = nil, type = nil, for_site = SKIP) ⇒ WebhookDeviceUpdownsEvent
Returns a new instance of WebhookDeviceUpdownsEvent.
70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/mist_api/models/webhook_device_updowns_event.rb', line 70 def initialize(ap = nil, ap_name = nil, org_id = nil, site_id = nil, site_name = nil, = nil, type = nil, for_site = SKIP) @ap = ap @ap_name = ap_name @for_site = for_site unless for_site == SKIP @org_id = org_id @site_id = site_id @site_name = site_name @timestamp = @type = type end |
Instance Attribute Details
#ap ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/webhook_device_updowns_event.rb', line 14 def ap @ap end |
#ap_name ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/webhook_device_updowns_event.rb', line 18 def ap_name @ap_name end |
#for_site ⇒ TrueClass | FalseClass
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/webhook_device_updowns_event.rb', line 22 def for_site @for_site end |
#org_id ⇒ UUID | String
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/webhook_device_updowns_event.rb', line 26 def org_id @org_id end |
#site_id ⇒ UUID | String
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/webhook_device_updowns_event.rb', line 30 def site_id @site_id end |
#site_name ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/mist_api/models/webhook_device_updowns_event.rb', line 34 def site_name @site_name end |
#timestamp ⇒ Float
Epoch (seconds)
38 39 40 |
# File 'lib/mist_api/models/webhook_device_updowns_event.rb', line 38 def @timestamp end |
#type ⇒ String
Epoch (seconds)
42 43 44 |
# File 'lib/mist_api/models/webhook_device_updowns_event.rb', line 42 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/mist_api/models/webhook_device_updowns_event.rb', line 84 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ap = hash.key?('ap') ? hash['ap'] : nil ap_name = hash.key?('ap_name') ? hash['ap_name'] : nil org_id = hash.key?('org_id') ? hash['org_id'] : nil site_id = hash.key?('site_id') ? hash['site_id'] : nil site_name = hash.key?('site_name') ? hash['site_name'] : nil = hash.key?('timestamp') ? hash['timestamp'] : nil type = hash.key?('type') ? hash['type'] : nil for_site = hash.key?('for_site') ? hash['for_site'] : SKIP # Create object from extracted values. WebhookDeviceUpdownsEvent.new(ap, ap_name, org_id, site_id, site_name, , type, for_site) end |
.names ⇒ Object
A mapping from model property names to API property names.
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/mist_api/models/webhook_device_updowns_event.rb', line 45 def self.names @_hash = {} if @_hash.nil? @_hash['ap'] = 'ap' @_hash['ap_name'] = 'ap_name' @_hash['for_site'] = 'for_site' @_hash['org_id'] = 'org_id' @_hash['site_id'] = 'site_id' @_hash['site_name'] = 'site_name' @_hash['timestamp'] = 'timestamp' @_hash['type'] = 'type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
66 67 68 |
# File 'lib/mist_api/models/webhook_device_updowns_event.rb', line 66 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
59 60 61 62 63 |
# File 'lib/mist_api/models/webhook_device_updowns_event.rb', line 59 def self.optionals %w[ for_site ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/mist_api/models/webhook_device_updowns_event.rb', line 110 def self.validate(value) if value.instance_of? self return ( APIHelper.valid_type?(value.ap, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.ap_name, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.org_id, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.site_id, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.site_name, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value., ->(val) { val.instance_of? Float }) and APIHelper.valid_type?(value.type, ->(val) { val.instance_of? String }) ) end return false unless value.instance_of? Hash ( APIHelper.valid_type?(value['ap'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['ap_name'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['org_id'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['site_id'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['site_name'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['timestamp'], ->(val) { val.instance_of? Float }) and APIHelper.valid_type?(value['type'], ->(val) { val.instance_of? String }) ) end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
159 160 161 162 163 164 |
# File 'lib/mist_api/models/webhook_device_updowns_event.rb', line 159 def inspect class_name = self.class.name.split('::').last "<#{class_name} ap: #{@ap.inspect}, ap_name: #{@ap_name.inspect}, for_site:"\ " #{@for_site.inspect}, org_id: #{@org_id.inspect}, site_id: #{@site_id.inspect}, site_name:"\ " #{@site_name.inspect}, timestamp: #{@timestamp.inspect}, type: #{@type.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
151 152 153 154 155 156 |
# File 'lib/mist_api/models/webhook_device_updowns_event.rb', line 151 def to_s class_name = self.class.name.split('::').last "<#{class_name} ap: #{@ap}, ap_name: #{@ap_name}, for_site: #{@for_site}, org_id:"\ " #{@org_id}, site_id: #{@site_id}, site_name: #{@site_name}, timestamp: #{@timestamp},"\ " type: #{@type}>" end |