Class: OCI::ApmSynthetics::Models::Monitor
- Inherits:
-
Object
- Object
- OCI::ApmSynthetics::Models::Monitor
- Defined in:
- lib/oci/apm_synthetics/models/monitor.rb
Overview
The information about a monitor.
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_FTP = 'FTP'.freeze, MONITOR_TYPE_SQL = 'SQL'.freeze, MONITOR_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- CONTENT_TYPE_ENUM =
[ CONTENT_TYPE_SIDE = 'SIDE'.freeze, CONTENT_TYPE_JS = 'JS'.freeze, CONTENT_TYPE_PLAYWRIGHT_TS = 'PLAYWRIGHT_TS'.freeze, CONTENT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- STATUS_ENUM =
[ STATUS_ENABLED = 'ENABLED'.freeze, STATUS_DISABLED = 'DISABLED'.freeze, STATUS_INVALID = 'INVALID'.freeze, STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- SCHEDULING_POLICY_ENUM =
[ SCHEDULING_POLICY_ALL = 'ALL'.freeze, SCHEDULING_POLICY_ROUND_ROBIN = 'ROUND_ROBIN'.freeze, SCHEDULING_POLICY_BATCHED_ROUND_ROBIN = 'BATCHED_ROUND_ROBIN'.freeze, SCHEDULING_POLICY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
- #availability_configuration ⇒ OCI::ApmSynthetics::Models::AvailabilityConfiguration
-
#batch_interval_in_seconds ⇒ Integer
[Required] Time interval between two runs in round robin batch mode (SchedulingPolicy - BATCHED_ROUND_ROBIN).
- #configuration ⇒ OCI::ApmSynthetics::Models::MonitorConfiguration
-
#content_type ⇒ String
Content type of the script.
-
#created_by ⇒ String
Name of the user that created the monitor.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#display_name ⇒ String
[Required] Unique name that can be edited.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#id ⇒ String
[Required] The OCID of the monitor.
-
#is_i_pv6 ⇒ BOOLEAN
If enabled, domain name will resolve to an IPv6 address.
-
#is_run_now ⇒ BOOLEAN
[Required] If isRunNow is enabled, then the monitor will run immediately.
-
#is_run_once ⇒ BOOLEAN
[Required] If runOnce is enabled, then the monitor will run once.
-
#last_updated_by ⇒ String
Name of the user that recently updated the monitor.
- #maintenance_window_schedule ⇒ OCI::ApmSynthetics::Models::MaintenanceWindowSchedule
-
#monitor_type ⇒ String
[Required] Type of monitor.
-
#repeat_interval_in_seconds ⇒ Integer
[Required] Interval in seconds after the start time when the job should be repeated.
-
#scheduling_policy ⇒ String
[Required] Scheduling policy to decide the distribution of monitor executions on vantage points.
-
#script_id ⇒ String
[Required] The OCID of the script.
-
#script_name ⇒ String
[Required] Name of the script.
-
#script_parameters ⇒ Array<OCI::ApmSynthetics::Models::MonitorScriptParameterInfo>
List of script parameters.
-
#status ⇒ String
[Required] Enables or disables the monitor.
-
#target ⇒ String
Specify the endpoint on which to run the monitor.
-
#time_created ⇒ DateTime
The time the resource was created, expressed in RFC 3339 timestamp format.
-
#time_updated ⇒ DateTime
The time the resource was updated, expressed in RFC 3339 timestamp format.
-
#timeout_in_seconds ⇒ Integer
[Required] Timeout in seconds.
-
#vantage_point_count ⇒ Integer
[Required] Number of vantage points where monitor is running.
-
#vantage_points ⇒ Array<OCI::ApmSynthetics::Models::VantagePointInfo>
[Required] List of public, dedicated and onPremise vantage points where the monitor is running.
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 = {}) ⇒ Monitor
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 = {}) ⇒ Monitor
Initializes the object
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 277 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.vantage_points = attributes[:'vantagePoints'] if attributes[:'vantagePoints'] raise 'You cannot provide both :vantagePoints and :vantage_points' if attributes.key?(:'vantagePoints') && attributes.key?(:'vantage_points') self.vantage_points = attributes[:'vantage_points'] if attributes[:'vantage_points'] self.vantage_point_count = attributes[:'vantagePointCount'] if attributes[:'vantagePointCount'] raise 'You cannot provide both :vantagePointCount and :vantage_point_count' if attributes.key?(:'vantagePointCount') && attributes.key?(:'vantage_point_count') self.vantage_point_count = attributes[:'vantage_point_count'] if attributes[:'vantage_point_count'] self.script_id = attributes[:'scriptId'] if attributes[:'scriptId'] raise 'You cannot provide both :scriptId and :script_id' if attributes.key?(:'scriptId') && attributes.key?(:'script_id') self.script_id = attributes[:'script_id'] if attributes[:'script_id'] self.script_name = attributes[:'scriptName'] if attributes[:'scriptName'] raise 'You cannot provide both :scriptName and :script_name' if attributes.key?(:'scriptName') && attributes.key?(:'script_name') self.script_name = attributes[:'script_name'] if attributes[:'script_name'] self.content_type = attributes[:'contentType'] if attributes[:'contentType'] raise 'You cannot provide both :contentType and :content_type' if attributes.key?(:'contentType') && attributes.key?(:'content_type') self.content_type = attributes[:'content_type'] if attributes[:'content_type'] self.status = attributes[:'status'] if attributes[:'status'] self.repeat_interval_in_seconds = attributes[:'repeatIntervalInSeconds'] if attributes[:'repeatIntervalInSeconds'] raise 'You cannot provide both :repeatIntervalInSeconds and :repeat_interval_in_seconds' if attributes.key?(:'repeatIntervalInSeconds') && attributes.key?(:'repeat_interval_in_seconds') self.repeat_interval_in_seconds = attributes[:'repeat_interval_in_seconds'] if attributes[:'repeat_interval_in_seconds'] self.is_run_once = attributes[:'isRunOnce'] unless attributes[:'isRunOnce'].nil? self.is_run_once = false if is_run_once.nil? && !attributes.key?(:'isRunOnce') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isRunOnce and :is_run_once' if attributes.key?(:'isRunOnce') && attributes.key?(:'is_run_once') self.is_run_once = attributes[:'is_run_once'] unless attributes[:'is_run_once'].nil? self.is_run_once = false if is_run_once.nil? && !attributes.key?(:'isRunOnce') && !attributes.key?(:'is_run_once') # rubocop:disable Style/StringLiterals self.timeout_in_seconds = attributes[:'timeoutInSeconds'] if attributes[:'timeoutInSeconds'] raise 'You cannot provide both :timeoutInSeconds and :timeout_in_seconds' if attributes.key?(:'timeoutInSeconds') && attributes.key?(:'timeout_in_seconds') self.timeout_in_seconds = attributes[:'timeout_in_seconds'] if attributes[:'timeout_in_seconds'] self.target = attributes[:'target'] if attributes[:'target'] self.script_parameters = attributes[:'scriptParameters'] if attributes[:'scriptParameters'] raise 'You cannot provide both :scriptParameters and :script_parameters' if attributes.key?(:'scriptParameters') && attributes.key?(:'script_parameters') self.script_parameters = attributes[:'script_parameters'] if attributes[:'script_parameters'] self.configuration = attributes[:'configuration'] if attributes[:'configuration'] self.availability_configuration = attributes[:'availabilityConfiguration'] if attributes[:'availabilityConfiguration'] raise 'You cannot provide both :availabilityConfiguration and :availability_configuration' if attributes.key?(:'availabilityConfiguration') && attributes.key?(:'availability_configuration') self.availability_configuration = attributes[:'availability_configuration'] if attributes[:'availability_configuration'] self.maintenance_window_schedule = attributes[:'maintenanceWindowSchedule'] if attributes[:'maintenanceWindowSchedule'] raise 'You cannot provide both :maintenanceWindowSchedule and :maintenance_window_schedule' if attributes.key?(:'maintenanceWindowSchedule') && attributes.key?(:'maintenance_window_schedule') self.maintenance_window_schedule = attributes[:'maintenance_window_schedule'] if attributes[:'maintenance_window_schedule'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] 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.scheduling_policy = attributes[:'schedulingPolicy'] if attributes[:'schedulingPolicy'] raise 'You cannot provide both :schedulingPolicy and :scheduling_policy' if attributes.key?(:'schedulingPolicy') && attributes.key?(:'scheduling_policy') self.scheduling_policy = attributes[:'scheduling_policy'] if attributes[:'scheduling_policy'] self.batch_interval_in_seconds = attributes[:'batchIntervalInSeconds'] if attributes[:'batchIntervalInSeconds'] raise 'You cannot provide both :batchIntervalInSeconds and :batch_interval_in_seconds' if attributes.key?(:'batchIntervalInSeconds') && attributes.key?(:'batch_interval_in_seconds') self.batch_interval_in_seconds = attributes[:'batch_interval_in_seconds'] if attributes[:'batch_interval_in_seconds'] self.is_i_pv6 = attributes[:'isIPv6'] unless attributes[:'isIPv6'].nil? self.is_i_pv6 = false if is_i_pv6.nil? && !attributes.key?(:'isIPv6') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isIPv6 and :is_i_pv6' if attributes.key?(:'isIPv6') && attributes.key?(:'is_i_pv6') self.is_i_pv6 = attributes[:'is_i_pv6'] unless attributes[:'is_i_pv6'].nil? self.is_i_pv6 = false if is_i_pv6.nil? && !attributes.key?(:'isIPv6') && !attributes.key?(:'is_i_pv6') # rubocop:disable Style/StringLiterals self.created_by = attributes[:'createdBy'] if attributes[:'createdBy'] raise 'You cannot provide both :createdBy and :created_by' if attributes.key?(:'createdBy') && attributes.key?(:'created_by') self.created_by = attributes[:'created_by'] if attributes[:'created_by'] self.last_updated_by = attributes[:'lastUpdatedBy'] if attributes[:'lastUpdatedBy'] raise 'You cannot provide both :lastUpdatedBy and :last_updated_by' if attributes.key?(:'lastUpdatedBy') && attributes.key?(:'last_updated_by') self.last_updated_by = attributes[:'last_updated_by'] if attributes[:'last_updated_by'] end |
Instance Attribute Details
#availability_configuration ⇒ OCI::ApmSynthetics::Models::AvailabilityConfiguration
119 120 121 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 119 def availability_configuration @availability_configuration end |
#batch_interval_in_seconds ⇒ Integer
[Required] Time interval between two runs in round robin batch mode (SchedulingPolicy - BATCHED_ROUND_ROBIN).
160 161 162 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 160 def batch_interval_in_seconds @batch_interval_in_seconds end |
#configuration ⇒ OCI::ApmSynthetics::Models::MonitorConfiguration
116 117 118 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 116 def configuration @configuration end |
#content_type ⇒ String
Content type of the script.
77 78 79 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 77 def content_type @content_type end |
#created_by ⇒ String
Name of the user that created the monitor.
168 169 170 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 168 def created_by @created_by end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
148 149 150 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 148 def @defined_tags end |
#display_name ⇒ String
[Required] Unique name that can be edited. The name should not contain any confidential information.
51 52 53 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 51 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}
142 143 144 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 142 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the monitor.
47 48 49 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 47 def id @id end |
#is_i_pv6 ⇒ BOOLEAN
If enabled, domain name will resolve to an IPv6 address.
164 165 166 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 164 def is_i_pv6 @is_i_pv6 end |
#is_run_now ⇒ BOOLEAN
[Required] If isRunNow is enabled, then the monitor will run immediately.
152 153 154 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 152 def is_run_now @is_run_now end |
#is_run_once ⇒ BOOLEAN
[Required] If runOnce is enabled, then the monitor will run once.
91 92 93 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 91 def is_run_once @is_run_once end |
#last_updated_by ⇒ String
Name of the user that recently updated the monitor.
172 173 174 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 172 def last_updated_by @last_updated_by end |
#maintenance_window_schedule ⇒ OCI::ApmSynthetics::Models::MaintenanceWindowSchedule
122 123 124 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 122 def maintenance_window_schedule @maintenance_window_schedule end |
#monitor_type ⇒ String
[Required] Type of monitor.
55 56 57 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 55 def monitor_type @monitor_type end |
#repeat_interval_in_seconds ⇒ Integer
[Required] Interval in seconds after the start time when the job should be repeated. Minimum repeatIntervalInSeconds should be 300 seconds for Scripted REST, Scripted Browser and Browser monitors, and 60 seconds for REST monitor.
87 88 89 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 87 def repeat_interval_in_seconds @repeat_interval_in_seconds end |
#scheduling_policy ⇒ String
[Required] Scheduling policy to decide the distribution of monitor executions on vantage points.
156 157 158 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 156 def scheduling_policy @scheduling_policy end |
#script_id ⇒ String
[Required] The OCID of the script. scriptId is mandatory for creation of SCRIPTED_BROWSER and SCRIPTED_REST monitor types. For other monitor types, it should be set to null.
69 70 71 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 69 def script_id @script_id end |
#script_name ⇒ String
[Required] Name of the script.
73 74 75 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 73 def script_name @script_name end |
#script_parameters ⇒ Array<OCI::ApmSynthetics::Models::MonitorScriptParameterInfo>
List of script parameters. Example: [{\"monitorScriptParameter\": {\"paramName\": \"userid\", \"paramValue\":\"testuser\"}, \"isSecret\": false, \"isOverwritten\": false}]
113 114 115 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 113 def script_parameters @script_parameters end |
#status ⇒ String
[Required] Enables or disables the monitor.
81 82 83 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 81 def status @status end |
#target ⇒ String
Specify the endpoint on which to run the monitor. For BROWSER, REST, NETWORK, DNS and FTP monitor types, target is mandatory. If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is. For NETWORK monitor with TCP protocol, a port needs to be provided along with target. Example: 192.168.0.1:80.
108 109 110 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 108 def target @target end |
#time_created ⇒ DateTime
The time the resource was created, expressed in RFC 3339 timestamp format. Example: 2020-02-12T22:47:12.613Z
129 130 131 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 129 def time_created @time_created end |
#time_updated ⇒ DateTime
The time the resource was updated, expressed in RFC 3339 timestamp format. Example: 2020-02-13T22:47:12.613Z
136 137 138 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 136 def time_updated @time_updated end |
#timeout_in_seconds ⇒ Integer
[Required] Timeout in seconds. If isFailureRetried is true, then timeout cannot be more than 30% of repeatIntervalInSeconds time for monitors. If isFailureRetried is false, then timeout cannot be more than 50% of repeatIntervalInSeconds time for monitors. Also, timeoutInSeconds should be a multiple of 60 for Scripted REST, Scripted Browser and Browser monitors. Monitor will be allowed to run only for timeoutInSeconds time. It would be terminated after that.
99 100 101 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 99 def timeout_in_seconds @timeout_in_seconds end |
#vantage_point_count ⇒ Integer
[Required] Number of vantage points where monitor is running.
63 64 65 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 63 def vantage_point_count @vantage_point_count end |
#vantage_points ⇒ Array<OCI::ApmSynthetics::Models::VantagePointInfo>
[Required] List of public, dedicated and onPremise vantage points where the monitor is running.
59 60 61 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 59 def vantage_points @vantage_points end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 175 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'display_name': :'displayName', 'monitor_type': :'monitorType', 'vantage_points': :'vantagePoints', 'vantage_point_count': :'vantagePointCount', 'script_id': :'scriptId', 'script_name': :'scriptName', 'content_type': :'contentType', 'status': :'status', 'repeat_interval_in_seconds': :'repeatIntervalInSeconds', 'is_run_once': :'isRunOnce', 'timeout_in_seconds': :'timeoutInSeconds', 'target': :'target', 'script_parameters': :'scriptParameters', 'configuration': :'configuration', 'availability_configuration': :'availabilityConfiguration', 'maintenance_window_schedule': :'maintenanceWindowSchedule', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'is_run_now': :'isRunNow', 'scheduling_policy': :'schedulingPolicy', 'batch_interval_in_seconds': :'batchIntervalInSeconds', 'is_i_pv6': :'isIPv6', 'created_by': :'createdBy', 'last_updated_by': :'lastUpdatedBy' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 210 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'display_name': :'String', 'monitor_type': :'String', 'vantage_points': :'Array<OCI::ApmSynthetics::Models::VantagePointInfo>', 'vantage_point_count': :'Integer', 'script_id': :'String', 'script_name': :'String', 'content_type': :'String', 'status': :'String', 'repeat_interval_in_seconds': :'Integer', 'is_run_once': :'BOOLEAN', 'timeout_in_seconds': :'Integer', 'target': :'String', 'script_parameters': :'Array<OCI::ApmSynthetics::Models::MonitorScriptParameterInfo>', 'configuration': :'OCI::ApmSynthetics::Models::MonitorConfiguration', 'availability_configuration': :'OCI::ApmSynthetics::Models::AvailabilityConfiguration', 'maintenance_window_schedule': :'OCI::ApmSynthetics::Models::MaintenanceWindowSchedule', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'is_run_now': :'BOOLEAN', 'scheduling_policy': :'String', 'batch_interval_in_seconds': :'Integer', 'is_i_pv6': :'BOOLEAN', 'created_by': :'String', 'last_updated_by': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 495 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && display_name == other.display_name && monitor_type == other.monitor_type && vantage_points == other.vantage_points && vantage_point_count == other.vantage_point_count && script_id == other.script_id && script_name == other.script_name && content_type == other.content_type && status == other.status && repeat_interval_in_seconds == other.repeat_interval_in_seconds && is_run_once == other.is_run_once && timeout_in_seconds == other.timeout_in_seconds && target == other.target && script_parameters == other.script_parameters && configuration == other.configuration && availability_configuration == other.availability_configuration && maintenance_window_schedule == other.maintenance_window_schedule && time_created == other.time_created && time_updated == other.time_updated && == other. && == other. && is_run_now == other.is_run_now && scheduling_policy == other.scheduling_policy && batch_interval_in_seconds == other.batch_interval_in_seconds && is_i_pv6 == other.is_i_pv6 && created_by == other.created_by && last_updated_by == other.last_updated_by end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 551 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
531 532 533 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 531 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
540 541 542 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 540 def hash [id, display_name, monitor_type, vantage_points, vantage_point_count, script_id, script_name, content_type, status, repeat_interval_in_seconds, is_run_once, timeout_in_seconds, target, script_parameters, configuration, availability_configuration, maintenance_window_schedule, time_created, time_updated, , , is_run_now, scheduling_policy, batch_interval_in_seconds, is_i_pv6, created_by, last_updated_by].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
584 585 586 587 588 589 590 591 592 593 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 584 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
578 579 580 |
# File 'lib/oci/apm_synthetics/models/monitor.rb', line 578 def to_s to_hash.to_s end |