Class: OCI::OsManagement::Models::ScheduledJob
- Inherits:
-
Object
- Object
- OCI::OsManagement::Models::ScheduledJob
- Defined in:
- lib/oci/os_management/models/scheduled_job.rb
Overview
Detailed information about a Scheduled Job
Constant Summary collapse
- SCHEDULE_TYPE_ENUM =
[ SCHEDULE_TYPE_ONETIME = 'ONETIME'.freeze, SCHEDULE_TYPE_RECURRING = 'RECURRING'.freeze, SCHEDULE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- INTERVAL_TYPE_ENUM =
[ INTERVAL_TYPE_HOUR = 'HOUR'.freeze, INTERVAL_TYPE_DAY = 'DAY'.freeze, INTERVAL_TYPE_WEEK = 'WEEK'.freeze, INTERVAL_TYPE_MONTH = 'MONTH'.freeze, INTERVAL_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- OPERATION_TYPE_ENUM =
[ OPERATION_TYPE_INSTALL = 'INSTALL'.freeze, OPERATION_TYPE_UPDATE = 'UPDATE'.freeze, OPERATION_TYPE_REMOVE = 'REMOVE'.freeze, OPERATION_TYPE_UPDATEALL = 'UPDATEALL'.freeze, OPERATION_TYPE_ENABLEMODULESTREAM = 'ENABLEMODULESTREAM'.freeze, OPERATION_TYPE_DISABLEMODULESTREAM = 'DISABLEMODULESTREAM'.freeze, OPERATION_TYPE_SWITCHMODULESTREAM = 'SWITCHMODULESTREAM'.freeze, OPERATION_TYPE_INSTALLMODULESTREAMPROFILE = 'INSTALLMODULESTREAMPROFILE'.freeze, OPERATION_TYPE_REMOVEMODULESTREAMPROFILE = 'REMOVEMODULESTREAMPROFILE'.freeze, OPERATION_TYPE_COMPOUND = 'COMPOUND'.freeze, OPERATION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- UPDATE_TYPE_ENUM =
[ UPDATE_TYPE_SECURITY = 'SECURITY'.freeze, UPDATE_TYPE_BUGFIX = 'BUGFIX'.freeze, UPDATE_TYPE_ENHANCEMENT = 'ENHANCEMENT'.freeze, UPDATE_TYPE_OTHER = 'OTHER'.freeze, UPDATE_TYPE_KSPLICE = 'KSPLICE'.freeze, UPDATE_TYPE_ALL = 'ALL'.freeze, UPDATE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- OS_FAMILY_ENUM =
[ OS_FAMILY_LINUX = 'LINUX'.freeze, OS_FAMILY_WINDOWS = 'WINDOWS'.freeze, OS_FAMILY_ALL = 'ALL'.freeze, OS_FAMILY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
OCID for the Compartment.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
Details describing the Scheduled Job.
-
#display_name ⇒ String
[Required] Scheduled Job name.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#id ⇒ String
[Required] OCID for the Scheduled Job.
-
#interval_type ⇒ String
the interval period for a recurring Scheduled Job (only if schedule type is RECURRING).
-
#interval_value ⇒ String
the value for the interval period for a recurring Scheduled Job (only if schedule type is RECURRING).
-
#is_restricted ⇒ BOOLEAN
true, if the schedule job has its update capabilities restricted.
-
#lifecycle_state ⇒ String
The current state of the Scheduled Job.
-
#managed_instance_groups ⇒ Array<OCI::OsManagement::Models::Id>
the list of managed instance groups this scheduled job operates on (mutually exclusive with managedInstances).
-
#managed_instances ⇒ Array<OCI::OsManagement::Models::Id>
the list of managed instances this scheduled job operates on (mutually exclusive with managedInstanceGroups).
-
#operation_type ⇒ String
the type of operation this Scheduled Job performs.
-
#os_family ⇒ String
The Operating System type of the managed instance.
-
#package_names ⇒ Array<OCI::OsManagement::Models::PackageName>
the names of the updates (only if operation type is INSTALL/UPDATE/REMOVE).
-
#schedule_type ⇒ String
the type of scheduling this Scheduled Job follows.
-
#time_last_execution ⇒ DateTime
the time of the last execution of this Scheduled Job.
-
#time_next_execution ⇒ DateTime
the time of the next execution of this Scheduled Job.
-
#update_names ⇒ Array<String>
The unique names of the Windows Updates (only if operation type is INSTALL).
-
#update_type ⇒ String
Type of the update (only if operation type is UPDATEALL).
-
#work_requests ⇒ Array<OCI::OsManagement::Models::Id>
list of Work Requests associated with this Scheduled Job.
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 = {}) ⇒ ScheduledJob
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 = {}) ⇒ ScheduledJob
Initializes the object
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 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 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 242 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.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_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.description = attributes[:'description'] if attributes[:'description'] self.schedule_type = attributes[:'scheduleType'] if attributes[:'scheduleType'] raise 'You cannot provide both :scheduleType and :schedule_type' if attributes.key?(:'scheduleType') && attributes.key?(:'schedule_type') self.schedule_type = attributes[:'schedule_type'] if attributes[:'schedule_type'] self.time_next_execution = attributes[:'timeNextExecution'] if attributes[:'timeNextExecution'] raise 'You cannot provide both :timeNextExecution and :time_next_execution' if attributes.key?(:'timeNextExecution') && attributes.key?(:'time_next_execution') self.time_next_execution = attributes[:'time_next_execution'] if attributes[:'time_next_execution'] self.time_last_execution = attributes[:'timeLastExecution'] if attributes[:'timeLastExecution'] raise 'You cannot provide both :timeLastExecution and :time_last_execution' if attributes.key?(:'timeLastExecution') && attributes.key?(:'time_last_execution') self.time_last_execution = attributes[:'time_last_execution'] if attributes[:'time_last_execution'] self.interval_type = attributes[:'intervalType'] if attributes[:'intervalType'] raise 'You cannot provide both :intervalType and :interval_type' if attributes.key?(:'intervalType') && attributes.key?(:'interval_type') self.interval_type = attributes[:'interval_type'] if attributes[:'interval_type'] self.interval_value = attributes[:'intervalValue'] if attributes[:'intervalValue'] raise 'You cannot provide both :intervalValue and :interval_value' if attributes.key?(:'intervalValue') && attributes.key?(:'interval_value') self.interval_value = attributes[:'interval_value'] if attributes[:'interval_value'] self.managed_instances = attributes[:'managedInstances'] if attributes[:'managedInstances'] raise 'You cannot provide both :managedInstances and :managed_instances' if attributes.key?(:'managedInstances') && attributes.key?(:'managed_instances') self.managed_instances = attributes[:'managed_instances'] if attributes[:'managed_instances'] self.managed_instance_groups = attributes[:'managedInstanceGroups'] if attributes[:'managedInstanceGroups'] raise 'You cannot provide both :managedInstanceGroups and :managed_instance_groups' if attributes.key?(:'managedInstanceGroups') && attributes.key?(:'managed_instance_groups') self.managed_instance_groups = attributes[:'managed_instance_groups'] if attributes[:'managed_instance_groups'] self.operation_type = attributes[:'operationType'] if attributes[:'operationType'] raise 'You cannot provide both :operationType and :operation_type' if attributes.key?(:'operationType') && attributes.key?(:'operation_type') self.operation_type = attributes[:'operation_type'] if attributes[:'operation_type'] self.update_type = attributes[:'updateType'] if attributes[:'updateType'] raise 'You cannot provide both :updateType and :update_type' if attributes.key?(:'updateType') && attributes.key?(:'update_type') self.update_type = attributes[:'update_type'] if attributes[:'update_type'] self.package_names = attributes[:'packageNames'] if attributes[:'packageNames'] raise 'You cannot provide both :packageNames and :package_names' if attributes.key?(:'packageNames') && attributes.key?(:'package_names') self.package_names = attributes[:'package_names'] if attributes[:'package_names'] self.work_requests = attributes[:'workRequests'] if attributes[:'workRequests'] raise 'You cannot provide both :workRequests and :work_requests' if attributes.key?(:'workRequests') && attributes.key?(:'work_requests') self.work_requests = attributes[:'work_requests'] if attributes[:'work_requests'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] 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.update_names = attributes[:'updateNames'] if attributes[:'updateNames'] raise 'You cannot provide both :updateNames and :update_names' if attributes.key?(:'updateNames') && attributes.key?(:'update_names') self.update_names = attributes[:'update_names'] if attributes[:'update_names'] self.os_family = attributes[:'osFamily'] if attributes[:'osFamily'] raise 'You cannot provide both :osFamily and :os_family' if attributes.key?(:'osFamily') && attributes.key?(:'os_family') self.os_family = attributes[:'os_family'] if attributes[:'os_family'] self.is_restricted = attributes[:'isRestricted'] unless attributes[:'isRestricted'].nil? raise 'You cannot provide both :isRestricted and :is_restricted' if attributes.key?(:'isRestricted') && attributes.key?(:'is_restricted') self.is_restricted = attributes[:'is_restricted'] unless attributes[:'is_restricted'].nil? end |
Instance Attribute Details
#compartment_id ⇒ String
OCID for the Compartment
73 74 75 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 73 def compartment_id @compartment_id 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\"}}
141 142 143 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 141 def @defined_tags end |
#description ⇒ String
Details describing the Scheduled Job.
81 82 83 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 81 def description @description end |
#display_name ⇒ String
[Required] Scheduled Job name
77 78 79 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 77 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\"}
135 136 137 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 135 def @freeform_tags end |
#id ⇒ String
[Required] OCID for the Scheduled Job
69 70 71 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 69 def id @id end |
#interval_type ⇒ String
the interval period for a recurring Scheduled Job (only if schedule type is RECURRING)
97 98 99 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 97 def interval_type @interval_type end |
#interval_value ⇒ String
the value for the interval period for a recurring Scheduled Job (only if schedule type is RECURRING)
101 102 103 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 101 def interval_value @interval_value end |
#is_restricted ⇒ BOOLEAN
true, if the schedule job has its update capabilities restricted. (Used to track Autonomous Scheduled Job)
155 156 157 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 155 def is_restricted @is_restricted end |
#lifecycle_state ⇒ String
The current state of the Scheduled Job.
129 130 131 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 129 def lifecycle_state @lifecycle_state end |
#managed_instance_groups ⇒ Array<OCI::OsManagement::Models::Id>
the list of managed instance groups this scheduled job operates on (mutually exclusive with managedInstances)
109 110 111 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 109 def managed_instance_groups @managed_instance_groups end |
#managed_instances ⇒ Array<OCI::OsManagement::Models::Id>
the list of managed instances this scheduled job operates on (mutually exclusive with managedInstanceGroups)
105 106 107 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 105 def managed_instances @managed_instances end |
#operation_type ⇒ String
the type of operation this Scheduled Job performs
113 114 115 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 113 def operation_type @operation_type end |
#os_family ⇒ String
The Operating System type of the managed instance.
151 152 153 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 151 def os_family @os_family end |
#package_names ⇒ Array<OCI::OsManagement::Models::PackageName>
the names of the updates (only if operation type is INSTALL/UPDATE/REMOVE)
121 122 123 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 121 def package_names @package_names end |
#schedule_type ⇒ String
the type of scheduling this Scheduled Job follows
85 86 87 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 85 def schedule_type @schedule_type end |
#time_last_execution ⇒ DateTime
the time of the last execution of this Scheduled Job
93 94 95 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 93 def time_last_execution @time_last_execution end |
#time_next_execution ⇒ DateTime
the time of the next execution of this Scheduled Job
89 90 91 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 89 def time_next_execution @time_next_execution end |
#update_names ⇒ Array<String>
The unique names of the Windows Updates (only if operation type is INSTALL). This is only applicable when the osFamily is for Windows managed instances.
147 148 149 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 147 def update_names @update_names end |
#update_type ⇒ String
Type of the update (only if operation type is UPDATEALL)
117 118 119 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 117 def update_type @update_type end |
#work_requests ⇒ Array<OCI::OsManagement::Models::Id>
list of Work Requests associated with this Scheduled Job
125 126 127 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 125 def work_requests @work_requests end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 158 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'compartment_id': :'compartmentId', 'display_name': :'displayName', 'description': :'description', 'schedule_type': :'scheduleType', 'time_next_execution': :'timeNextExecution', 'time_last_execution': :'timeLastExecution', 'interval_type': :'intervalType', 'interval_value': :'intervalValue', 'managed_instances': :'managedInstances', 'managed_instance_groups': :'managedInstanceGroups', 'operation_type': :'operationType', 'update_type': :'updateType', 'package_names': :'packageNames', 'work_requests': :'workRequests', 'lifecycle_state': :'lifecycleState', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'update_names': :'updateNames', 'os_family': :'osFamily', 'is_restricted': :'isRestricted' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 187 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'compartment_id': :'String', 'display_name': :'String', 'description': :'String', 'schedule_type': :'String', 'time_next_execution': :'DateTime', 'time_last_execution': :'DateTime', 'interval_type': :'String', 'interval_value': :'String', 'managed_instances': :'Array<OCI::OsManagement::Models::Id>', 'managed_instance_groups': :'Array<OCI::OsManagement::Models::Id>', 'operation_type': :'String', 'update_type': :'String', 'package_names': :'Array<OCI::OsManagement::Models::PackageName>', 'work_requests': :'Array<OCI::OsManagement::Models::Id>', 'lifecycle_state': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'update_names': :'Array<String>', 'os_family': :'String', 'is_restricted': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 452 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && compartment_id == other.compartment_id && display_name == other.display_name && description == other.description && schedule_type == other.schedule_type && time_next_execution == other.time_next_execution && time_last_execution == other.time_last_execution && interval_type == other.interval_type && interval_value == other.interval_value && managed_instances == other.managed_instances && managed_instance_groups == other.managed_instance_groups && operation_type == other.operation_type && update_type == other.update_type && package_names == other.package_names && work_requests == other.work_requests && lifecycle_state == other.lifecycle_state && == other. && == other. && update_names == other.update_names && os_family == other.os_family && is_restricted == other.is_restricted end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 502 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
482 483 484 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 482 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
491 492 493 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 491 def hash [id, compartment_id, display_name, description, schedule_type, time_next_execution, time_last_execution, interval_type, interval_value, managed_instances, managed_instance_groups, operation_type, update_type, package_names, work_requests, lifecycle_state, , , update_names, os_family, is_restricted].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
535 536 537 538 539 540 541 542 543 544 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 535 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
529 530 531 |
# File 'lib/oci/os_management/models/scheduled_job.rb', line 529 def to_s to_hash.to_s end |