Class: MistApi::SynthetictestConfigCustomProbe
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::SynthetictestConfigCustomProbe
- Defined in:
- lib/mist_api/models/synthetictest_config_custom_probe.rb
Overview
SynthetictestConfigCustomProbe Model.
Instance Attribute Summary collapse
-
#aggressiveness ⇒ SynthetictestConfigAggressivenessEnum
enum: ‘auto`, `high`, `low`.
-
#target ⇒ String
Can be URL (e.g. x.com, x.com:8080/path/to/resource), IP address, or IP:port combination.
-
#threshold ⇒ Integer
In milliseconds.
-
#type ⇒ SynthetictestConfigCustomProbeTypeEnum
enum: ‘application`, `curl`, `icmp`, `reachability`, `tcp`.
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(aggressiveness = SynthetictestConfigAggressivenessEnum::AUTO, target = SKIP, threshold = SKIP, type = SynthetictestConfigCustomProbeTypeEnum::ICMP) ⇒ SynthetictestConfigCustomProbe
constructor
A new instance of SynthetictestConfigCustomProbe.
-
#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(aggressiveness = SynthetictestConfigAggressivenessEnum::AUTO, target = SKIP, threshold = SKIP, type = SynthetictestConfigCustomProbeTypeEnum::ICMP) ⇒ SynthetictestConfigCustomProbe
Returns a new instance of SynthetictestConfigCustomProbe.
54 55 56 57 58 59 60 61 |
# File 'lib/mist_api/models/synthetictest_config_custom_probe.rb', line 54 def initialize(aggressiveness = SynthetictestConfigAggressivenessEnum::AUTO, target = SKIP, threshold = SKIP, type = SynthetictestConfigCustomProbeTypeEnum::ICMP) @aggressiveness = aggressiveness unless aggressiveness == SKIP @target = target unless target == SKIP @threshold = threshold unless threshold == SKIP @type = type unless type == SKIP end |
Instance Attribute Details
#aggressiveness ⇒ SynthetictestConfigAggressivenessEnum
enum: ‘auto`, `high`, `low`
14 15 16 |
# File 'lib/mist_api/models/synthetictest_config_custom_probe.rb', line 14 def aggressiveness @aggressiveness end |
#target ⇒ String
Can be URL (e.g. x.com, x.com:8080/path/to/resource), IP address, or IP:port combination
19 20 21 |
# File 'lib/mist_api/models/synthetictest_config_custom_probe.rb', line 19 def target @target end |
#threshold ⇒ Integer
In milliseconds
23 24 25 |
# File 'lib/mist_api/models/synthetictest_config_custom_probe.rb', line 23 def threshold @threshold end |
#type ⇒ SynthetictestConfigCustomProbeTypeEnum
enum: ‘application`, `curl`, `icmp`, `reachability`, `tcp`
27 28 29 |
# File 'lib/mist_api/models/synthetictest_config_custom_probe.rb', line 27 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/mist_api/models/synthetictest_config_custom_probe.rb', line 64 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. aggressiveness = hash['aggressiveness'] ||= SynthetictestConfigAggressivenessEnum::AUTO target = hash.key?('target') ? hash['target'] : SKIP threshold = hash.key?('threshold') ? hash['threshold'] : SKIP type = hash['type'] ||= SynthetictestConfigCustomProbeTypeEnum::ICMP # Create object from extracted values. SynthetictestConfigCustomProbe.new(aggressiveness, target, threshold, type) end |
.names ⇒ Object
A mapping from model property names to API property names.
30 31 32 33 34 35 36 37 |
# File 'lib/mist_api/models/synthetictest_config_custom_probe.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['aggressiveness'] = 'aggressiveness' @_hash['target'] = 'target' @_hash['threshold'] = 'threshold' @_hash['type'] = 'type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/mist_api/models/synthetictest_config_custom_probe.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 46 47 |
# File 'lib/mist_api/models/synthetictest_config_custom_probe.rb', line 40 def self.optionals %w[ aggressiveness target threshold type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
89 90 91 92 93 |
# File 'lib/mist_api/models/synthetictest_config_custom_probe.rb', line 89 def inspect class_name = self.class.name.split('::').last "<#{class_name} aggressiveness: #{@aggressiveness.inspect}, target: #{@target.inspect},"\ " threshold: #{@threshold.inspect}, type: #{@type.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
82 83 84 85 86 |
# File 'lib/mist_api/models/synthetictest_config_custom_probe.rb', line 82 def to_s class_name = self.class.name.split('::').last "<#{class_name} aggressiveness: #{@aggressiveness}, target: #{@target}, threshold:"\ " #{@threshold}, type: #{@type}>" end |