Class: Verizon::UsageAnomalyAttributes
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::UsageAnomalyAttributes
- Defined in:
- lib/verizon/models/usage_anomaly_attributes.rb
Overview
The details of the UsageAnomaly trigger.
Instance Attribute Summary collapse
-
#account_names ⇒ String
The Verizon billing account associated with the anomaly triggers for this trigger to be active for devices in those accounts.
-
#device_group ⇒ String
The names of device groups associated with the anomaly triggers for this trigger to be active for devices in those groups.
-
#include_abnormal ⇒ TrueClass | FalseClass
Whether or not to include anomalies classified as ‘abnormal’.<br />true<br />false<br />Classification is set as part of ThingSpace Intelligence anomaly detection settings.
-
#include_over_expected_usage ⇒ TrueClass | FalseClass
Whether or not to include anomalies that are directionally over the expected usage.
-
#include_under_expected_usage ⇒ TrueClass | FalseClass
Whether or not to include anomalies that are directionally under the expected usage.<br />true<br />false.
-
#include_very_abnormal ⇒ TrueClass | FalseClass
Whether or not to include anomalies classified as ‘very abnormal’.<br />true<br />false<br />Classification is set as part of ThingSpace Intelligence anomaly detection settings.
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(account_names = SKIP, device_group = SKIP, include_abnormal = SKIP, include_very_abnormal = SKIP, include_under_expected_usage = SKIP, include_over_expected_usage = SKIP) ⇒ UsageAnomalyAttributes
constructor
A new instance of UsageAnomalyAttributes.
Methods inherited from BaseModel
Constructor Details
#initialize(account_names = SKIP, device_group = SKIP, include_abnormal = SKIP, include_very_abnormal = SKIP, include_under_expected_usage = SKIP, include_over_expected_usage = SKIP) ⇒ UsageAnomalyAttributes
Returns a new instance of UsageAnomalyAttributes.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/verizon/models/usage_anomaly_attributes.rb', line 74 def initialize(account_names = SKIP, device_group = SKIP, include_abnormal = SKIP, include_very_abnormal = SKIP, include_under_expected_usage = SKIP, include_over_expected_usage = SKIP) @account_names = account_names unless account_names == SKIP @device_group = device_group unless device_group == SKIP @include_abnormal = include_abnormal unless include_abnormal == SKIP @include_very_abnormal = include_very_abnormal unless include_very_abnormal == SKIP unless include_under_expected_usage == SKIP @include_under_expected_usage = include_under_expected_usage end unless include_over_expected_usage == SKIP @include_over_expected_usage = include_over_expected_usage end end |
Instance Attribute Details
#account_names ⇒ String
The Verizon billing account associated with the anomaly triggers for this trigger to be active for devices in those accounts. An account name is usually numeric, and must include any leading zeros.
16 17 18 |
# File 'lib/verizon/models/usage_anomaly_attributes.rb', line 16 def account_names @account_names end |
#device_group ⇒ String
The names of device groups associated with the anomaly triggers for this trigger to be active for devices in those groups.
21 22 23 |
# File 'lib/verizon/models/usage_anomaly_attributes.rb', line 21 def device_group @device_group end |
#include_abnormal ⇒ TrueClass | FalseClass
Whether or not to include anomalies classified as ‘abnormal’.<br />true<br />false<br />Classification is set as part of ThingSpace Intelligence anomaly detection settings.
27 28 29 |
# File 'lib/verizon/models/usage_anomaly_attributes.rb', line 27 def include_abnormal @include_abnormal end |
#include_over_expected_usage ⇒ TrueClass | FalseClass
Whether or not to include anomalies that are directionally over the expected usage. <br />true<br />false.
43 44 45 |
# File 'lib/verizon/models/usage_anomaly_attributes.rb', line 43 def include_over_expected_usage @include_over_expected_usage end |
#include_under_expected_usage ⇒ TrueClass | FalseClass
Whether or not to include anomalies that are directionally under the expected usage.<br />true<br />false.
38 39 40 |
# File 'lib/verizon/models/usage_anomaly_attributes.rb', line 38 def include_under_expected_usage @include_under_expected_usage end |
#include_very_abnormal ⇒ TrueClass | FalseClass
Whether or not to include anomalies classified as ‘very abnormal’.<br />true<br />false<br />Classification is set as part of ThingSpace Intelligence anomaly detection settings.
33 34 35 |
# File 'lib/verizon/models/usage_anomaly_attributes.rb', line 33 def include_very_abnormal @include_very_abnormal end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/verizon/models/usage_anomaly_attributes.rb', line 93 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_names = hash.key?('accountNames') ? hash['accountNames'] : SKIP device_group = hash.key?('deviceGroup') ? hash['deviceGroup'] : SKIP include_abnormal = hash.key?('includeAbnormal') ? hash['includeAbnormal'] : SKIP include_very_abnormal = hash.key?('includeVeryAbnormal') ? hash['includeVeryAbnormal'] : SKIP include_under_expected_usage = hash.key?('includeUnderExpectedUsage') ? hash['includeUnderExpectedUsage'] : SKIP include_over_expected_usage = hash.key?('includeOverExpectedUsage') ? hash['includeOverExpectedUsage'] : SKIP # Create object from extracted values. UsageAnomalyAttributes.new(account_names, device_group, include_abnormal, include_very_abnormal, include_under_expected_usage, include_over_expected_usage) end |
.names ⇒ Object
A mapping from model property names to API property names.
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/verizon/models/usage_anomaly_attributes.rb', line 46 def self.names @_hash = {} if @_hash.nil? @_hash['account_names'] = 'accountNames' @_hash['device_group'] = 'deviceGroup' @_hash['include_abnormal'] = 'includeAbnormal' @_hash['include_very_abnormal'] = 'includeVeryAbnormal' @_hash['include_under_expected_usage'] = 'includeUnderExpectedUsage' @_hash['include_over_expected_usage'] = 'includeOverExpectedUsage' @_hash end |
.nullables ⇒ Object
An array for nullable fields
70 71 72 |
# File 'lib/verizon/models/usage_anomaly_attributes.rb', line 70 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/verizon/models/usage_anomaly_attributes.rb', line 58 def self.optionals %w[ account_names device_group include_abnormal include_very_abnormal include_under_expected_usage include_over_expected_usage ] end |