Class: Verizon::AnomalyDetectionSettings

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/verizon/models/anomaly_detection_settings.rb

Overview

Settings for anomaly detection.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

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( = SKIP, sensitivity_parameter = SKIP,
               status = SKIP)
  @account_name =  unless  == SKIP
  @sensitivity_parameter = sensitivity_parameter unless sensitivity_parameter == SKIP
  @status = status unless status == SKIP
end

Instance Attribute Details

#account_nameString

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.

Returns:

  • (String)


16
17
18
# File 'lib/verizon/models/anomaly_detection_settings.rb', line 16

def 
  @account_name
end

#sensitivity_parameterSensitivityParameters

Details for sensitivity parameters.



20
21
22
# File 'lib/verizon/models/anomaly_detection_settings.rb', line 20

def sensitivity_parameter
  @sensitivity_parameter
end

#statusString

Indicates if anomaly detection is active on the account<br />Active - Anomaly detection is active<br />Disabled- Anomaly detection is not active.

Returns:

  • (String)


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.
   = 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(,
                               sensitivity_parameter,
                               status)
end

.namesObject

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

.nullablesObject

An array for nullable fields



47
48
49
# File 'lib/verizon/models/anomaly_detection_settings.rb', line 47

def self.nullables
  []
end

.optionalsObject

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