Class: Verizon::AnomalyDetectionSettings
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::AnomalyDetectionSettings
- Defined in:
- lib/verizon/models/anomaly_detection_settings.rb
Overview
Settings for anomaly detection.
Instance Attribute Summary collapse
-
#account_name ⇒ String
Indicates if the account name used has anomaly detection.<br />Success - The account has anomaly detection.<br />Failure - The account does not have anomaly detection.
-
#sensitivity_parameter ⇒ SensitivityParameters
Details for sensitivity parameters.
-
#status ⇒ String
Indicates if anomaly detection is active on the account<br />Active - Anomaly detection is active<br />Disabled- Anomaly detection is not active.
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_name = SKIP, sensitivity_parameter = SKIP, status = SKIP) ⇒ AnomalyDetectionSettings
constructor
A new instance of AnomalyDetectionSettings.
Methods inherited from BaseModel
Constructor Details
#initialize(account_name = SKIP, sensitivity_parameter = SKIP, status = SKIP) ⇒ AnomalyDetectionSettings
Returns a new instance of AnomalyDetectionSettings.
51 52 53 54 55 56 |
# File 'lib/verizon/models/anomaly_detection_settings.rb', line 51 def initialize(account_name = SKIP, sensitivity_parameter = SKIP, status = SKIP) @account_name = account_name unless account_name == SKIP @sensitivity_parameter = sensitivity_parameter unless sensitivity_parameter == SKIP @status = status unless status == SKIP end |
Instance Attribute Details
#account_name ⇒ String
Indicates if the account name used has anomaly detection.<br />Success - The account has anomaly detection.<br />Failure - The account does not have anomaly detection.
16 17 18 |
# File 'lib/verizon/models/anomaly_detection_settings.rb', line 16 def account_name @account_name end |
#sensitivity_parameter ⇒ SensitivityParameters
Details for sensitivity parameters.
20 21 22 |
# File 'lib/verizon/models/anomaly_detection_settings.rb', line 20 def sensitivity_parameter @sensitivity_parameter end |
#status ⇒ String
Indicates if anomaly detection is active on the account<br />Active - Anomaly detection is active<br />Disabled- Anomaly detection is not active.
26 27 28 |
# File 'lib/verizon/models/anomaly_detection_settings.rb', line 26 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/verizon/models/anomaly_detection_settings.rb', line 59 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_name = hash.key?('accountName') ? hash['accountName'] : SKIP sensitivity_parameter = SensitivityParameters.from_hash(hash['sensitivityParameter']) if hash['sensitivityParameter'] status = hash.key?('status') ? hash['status'] : SKIP # Create object from extracted values. AnomalyDetectionSettings.new(account_name, sensitivity_parameter, status) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 |
# File 'lib/verizon/models/anomaly_detection_settings.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'accountName' @_hash['sensitivity_parameter'] = 'sensitivityParameter' @_hash['status'] = 'status' @_hash end |
.nullables ⇒ Object
An array for nullable fields
47 48 49 |
# File 'lib/verizon/models/anomaly_detection_settings.rb', line 47 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
38 39 40 41 42 43 44 |
# File 'lib/verizon/models/anomaly_detection_settings.rb', line 38 def self.optionals %w[ account_name sensitivity_parameter status ] end |