Class: Verizon::AnomalyDetectionRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::AnomalyDetectionRequest
- Defined in:
- lib/verizon/models/anomaly_detection_request.rb
Overview
Anomaly detection request.
Instance Attribute Summary collapse
-
#account_name ⇒ String
The name of a billing account.
-
#request_type ⇒ String
The type of request being made.
-
#sensitivity_parameter ⇒ SensitivityParameters
Details for sensitivity parameters.
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, request_type = SKIP, sensitivity_parameter = SKIP) ⇒ AnomalyDetectionRequest
constructor
A new instance of AnomalyDetectionRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(account_name = SKIP, request_type = SKIP, sensitivity_parameter = SKIP) ⇒ AnomalyDetectionRequest
Returns a new instance of AnomalyDetectionRequest.
49 50 51 52 53 54 |
# File 'lib/verizon/models/anomaly_detection_request.rb', line 49 def initialize(account_name = SKIP, request_type = SKIP, sensitivity_parameter = SKIP) @account_name = account_name unless account_name == SKIP @request_type = request_type unless request_type == SKIP @sensitivity_parameter = sensitivity_parameter unless sensitivity_parameter == SKIP end |
Instance Attribute Details
#account_name ⇒ String
The name of a billing account. An account name is usually numeric, and must include any leading zeros.
15 16 17 |
# File 'lib/verizon/models/anomaly_detection_request.rb', line 15 def account_name @account_name end |
#request_type ⇒ String
The type of request being made. anomaly is the request to activate anomaly detection.
20 21 22 |
# File 'lib/verizon/models/anomaly_detection_request.rb', line 20 def request_type @request_type end |
#sensitivity_parameter ⇒ SensitivityParameters
Details for sensitivity parameters.
24 25 26 |
# File 'lib/verizon/models/anomaly_detection_request.rb', line 24 def sensitivity_parameter @sensitivity_parameter end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/verizon/models/anomaly_detection_request.rb', line 57 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_name = hash.key?('accountName') ? hash['accountName'] : SKIP request_type = hash.key?('requestType') ? hash['requestType'] : SKIP sensitivity_parameter = SensitivityParameters.from_hash(hash['sensitivityParameter']) if hash['sensitivityParameter'] # Create object from extracted values. AnomalyDetectionRequest.new(account_name, request_type, sensitivity_parameter) end |
.names ⇒ Object
A mapping from model property names to API property names.
27 28 29 30 31 32 33 |
# File 'lib/verizon/models/anomaly_detection_request.rb', line 27 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'accountName' @_hash['request_type'] = 'requestType' @_hash['sensitivity_parameter'] = 'sensitivityParameter' @_hash end |
.nullables ⇒ Object
An array for nullable fields
45 46 47 |
# File 'lib/verizon/models/anomaly_detection_request.rb', line 45 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
36 37 38 39 40 41 42 |
# File 'lib/verizon/models/anomaly_detection_request.rb', line 36 def self.optionals %w[ account_name request_type sensitivity_parameter ] end |