Class: OCI::ApmSynthetics::Models::WorkerMonitorList
- Inherits:
-
Object
- Object
- OCI::ApmSynthetics::Models::WorkerMonitorList
- Defined in:
- lib/oci/apm_synthetics/models/worker_monitor_list.rb
Overview
Details of the monitor assigned to an On-premise vantage point worker.
Constant Summary collapse
- MONITOR_TYPE_ENUM =
[ MONITOR_TYPE_SCRIPTED_BROWSER = 'SCRIPTED_BROWSER'.freeze, MONITOR_TYPE_BROWSER = 'BROWSER'.freeze, MONITOR_TYPE_SCRIPTED_REST = 'SCRIPTED_REST'.freeze, MONITOR_TYPE_REST = 'REST'.freeze, MONITOR_TYPE_NETWORK = 'NETWORK'.freeze, MONITOR_TYPE_DNS = 'DNS'.freeze, MONITOR_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#display_name ⇒ String
[Required] Unique name that can be edited.
-
#id ⇒ String
[Required] The OCID of the monitor.
-
#is_run_now ⇒ BOOLEAN
If isRunNow is enabled, then the monitor will run immediately.
-
#monitor_type ⇒ String
[Required] Type of monitor.
-
#time_assigned ⇒ DateTime
The time the resource was last assigned to an On-premise vantage point worker, expressed in RFC 3339 timestamp format.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ WorkerMonitorList
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ WorkerMonitorList
Initializes the object
82 83 84 85 86 87 88 89 90 91 92 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/oci/apm_synthetics/models/worker_monitor_list.rb', line 82 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.id = attributes[:'id'] if attributes[:'id'] self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.monitor_type = attributes[:'monitorType'] if attributes[:'monitorType'] raise 'You cannot provide both :monitorType and :monitor_type' if attributes.key?(:'monitorType') && attributes.key?(:'monitor_type') self.monitor_type = attributes[:'monitor_type'] if attributes[:'monitor_type'] self.is_run_now = attributes[:'isRunNow'] unless attributes[:'isRunNow'].nil? self.is_run_now = false if is_run_now.nil? && !attributes.key?(:'isRunNow') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isRunNow and :is_run_now' if attributes.key?(:'isRunNow') && attributes.key?(:'is_run_now') self.is_run_now = attributes[:'is_run_now'] unless attributes[:'is_run_now'].nil? self.is_run_now = false if is_run_now.nil? && !attributes.key?(:'isRunNow') && !attributes.key?(:'is_run_now') # rubocop:disable Style/StringLiterals self.time_assigned = attributes[:'timeAssigned'] if attributes[:'timeAssigned'] raise 'You cannot provide both :timeAssigned and :time_assigned' if attributes.key?(:'timeAssigned') && attributes.key?(:'time_assigned') self.time_assigned = attributes[:'time_assigned'] if attributes[:'time_assigned'] end |
Instance Attribute Details
#display_name ⇒ String
[Required] Unique name that can be edited. The name should not contain any confidential information.
28 29 30 |
# File 'lib/oci/apm_synthetics/models/worker_monitor_list.rb', line 28 def display_name @display_name end |
#id ⇒ String
[Required] The OCID of the monitor.
24 25 26 |
# File 'lib/oci/apm_synthetics/models/worker_monitor_list.rb', line 24 def id @id end |
#is_run_now ⇒ BOOLEAN
If isRunNow is enabled, then the monitor will run immediately.
36 37 38 |
# File 'lib/oci/apm_synthetics/models/worker_monitor_list.rb', line 36 def is_run_now @is_run_now end |
#monitor_type ⇒ String
[Required] Type of monitor.
32 33 34 |
# File 'lib/oci/apm_synthetics/models/worker_monitor_list.rb', line 32 def monitor_type @monitor_type end |
#time_assigned ⇒ DateTime
The time the resource was last assigned to an On-premise vantage point worker, expressed in RFC 3339 timestamp format. Example: 2020-02-12T22:47:12.613Z
43 44 45 |
# File 'lib/oci/apm_synthetics/models/worker_monitor_list.rb', line 43 def time_assigned @time_assigned end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/oci/apm_synthetics/models/worker_monitor_list.rb', line 46 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'display_name': :'displayName', 'monitor_type': :'monitorType', 'is_run_now': :'isRunNow', 'time_assigned': :'timeAssigned' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/oci/apm_synthetics/models/worker_monitor_list.rb', line 59 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'display_name': :'String', 'monitor_type': :'String', 'is_run_now': :'BOOLEAN', 'time_assigned': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
137 138 139 140 141 142 143 144 145 146 |
# File 'lib/oci/apm_synthetics/models/worker_monitor_list.rb', line 137 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && display_name == other.display_name && monitor_type == other.monitor_type && is_run_now == other.is_run_now && time_assigned == other.time_assigned end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/oci/apm_synthetics/models/worker_monitor_list.rb', line 171 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
151 152 153 |
# File 'lib/oci/apm_synthetics/models/worker_monitor_list.rb', line 151 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
160 161 162 |
# File 'lib/oci/apm_synthetics/models/worker_monitor_list.rb', line 160 def hash [id, display_name, monitor_type, is_run_now, time_assigned].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
204 205 206 207 208 209 210 211 212 213 |
# File 'lib/oci/apm_synthetics/models/worker_monitor_list.rb', line 204 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
198 199 200 |
# File 'lib/oci/apm_synthetics/models/worker_monitor_list.rb', line 198 def to_s to_hash.to_s end |