Class: OCI::OsManagementHub::Models::ScheduledJobSummary
- Inherits:
-
Object
- Object
- OCI::OsManagementHub::Models::ScheduledJobSummary
- Defined in:
- lib/oci/os_management_hub/models/scheduled_job_summary.rb
Overview
Summary of the 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
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
[Required] The OCID of the compartment containing the scheduled job.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
[Required] Defined tags for this resource.
-
#display_name ⇒ String
[Required] Scheduled job name.
-
#freeform_tags ⇒ Hash<String, String>
[Required] Free-form tags for this resource.
-
#id ⇒ String
[Required] The OCID of the scheduled job.
-
#is_restricted ⇒ BOOLEAN
true, if the schedule job has its update/deletion capabilities restricted.
-
#lifecycle_stage_ids ⇒ Array<String>
The list of target lifecycle stage OCIDs if this scheduled job operates on lifecycle stages (mutually exclusive with managedInstances, managedInstanceGroupIds and managedCompartmentIds).
-
#lifecycle_state ⇒ String
[Required] The current state of the scheduled job.
-
#managed_compartment_ids ⇒ Array<String>
The list of target compartment OCIDs if this scheduled job operates on a compartment level (mutually exclusive with managedInstances, managedInstanceGroupIds and lifecycleStageIds).
-
#managed_instance_group_ids ⇒ Array<String>
The list of managed instance group OCIDs this scheduled job operates on (mutually exclusive with managedInstances, managedCompartmentIds and lifecycleStageIds).
-
#managed_instance_ids ⇒ Array<String>
The list of managed instance OCIDs this scheduled job operates on (mutually exclusive with managedInstanceGroupIds, managedCompartmentIds and lifecycleStageIds).
-
#operations ⇒ Array<OCI::OsManagementHub::Models::ScheduledJobOperation>
[Required] The list of operations this scheduled job needs to perform (can only support one operation if the operationType is not UPDATE_PACKAGES/UPDATE_ALL/UPDATE_SECURITY/UPDATE_BUGFIX/UPDATE_ENHANCEMENT/UPDATE_OTHER/UPDATE_KSPLICE_USERSPACE/UPDATE_KSPLICE_KERNEL).
-
#schedule_type ⇒ String
[Required] The type of scheduling this scheduled job follows.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource.
-
#time_created ⇒ DateTime
[Required] The time this scheduled job was created.
-
#time_last_execution ⇒ DateTime
The time/date of the last execution of this scheduled job.
-
#time_next_execution ⇒ DateTime
[Required] The time/date of the next scheduled execution of this scheduled job.
-
#time_updated ⇒ DateTime
[Required] The time this scheduled job was updated.
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 = {}) ⇒ ScheduledJobSummary
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 = {}) ⇒ ScheduledJobSummary
Initializes the object
174 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 208 209 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 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 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 174 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.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.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_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.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.managed_instance_ids = attributes[:'managedInstanceIds'] if attributes[:'managedInstanceIds'] raise 'You cannot provide both :managedInstanceIds and :managed_instance_ids' if attributes.key?(:'managedInstanceIds') && attributes.key?(:'managed_instance_ids') self.managed_instance_ids = attributes[:'managed_instance_ids'] if attributes[:'managed_instance_ids'] self.managed_instance_group_ids = attributes[:'managedInstanceGroupIds'] if attributes[:'managedInstanceGroupIds'] raise 'You cannot provide both :managedInstanceGroupIds and :managed_instance_group_ids' if attributes.key?(:'managedInstanceGroupIds') && attributes.key?(:'managed_instance_group_ids') self.managed_instance_group_ids = attributes[:'managed_instance_group_ids'] if attributes[:'managed_instance_group_ids'] self.managed_compartment_ids = attributes[:'managedCompartmentIds'] if attributes[:'managedCompartmentIds'] raise 'You cannot provide both :managedCompartmentIds and :managed_compartment_ids' if attributes.key?(:'managedCompartmentIds') && attributes.key?(:'managed_compartment_ids') self.managed_compartment_ids = attributes[:'managed_compartment_ids'] if attributes[:'managed_compartment_ids'] self.lifecycle_stage_ids = attributes[:'lifecycleStageIds'] if attributes[:'lifecycleStageIds'] raise 'You cannot provide both :lifecycleStageIds and :lifecycle_stage_ids' if attributes.key?(:'lifecycleStageIds') && attributes.key?(:'lifecycle_stage_ids') self.lifecycle_stage_ids = attributes[:'lifecycle_stage_ids'] if attributes[:'lifecycle_stage_ids'] self.operations = attributes[:'operations'] if attributes[:'operations'] 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.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? self. = attributes[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] end |
Instance Attribute Details
#compartment_id ⇒ String
[Required] The OCID of the compartment containing the scheduled job.
28 29 30 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 28 def compartment_id @compartment_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
[Required] Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {\"Operations\": {\"CostCenter\": \"42\"}}
86 87 88 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 86 def @defined_tags end |
#display_name ⇒ String
[Required] Scheduled job name.
24 25 26 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 24 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
[Required] Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {\"Department\": \"Finance\"}
79 80 81 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 79 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the scheduled job.
20 21 22 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 20 def id @id end |
#is_restricted ⇒ BOOLEAN
true, if the schedule job has its update/deletion capabilities restricted. (Used to track scheduled job for management station syncing).
90 91 92 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 90 def is_restricted @is_restricted end |
#lifecycle_stage_ids ⇒ Array<String>
The list of target lifecycle stage OCIDs if this scheduled job operates on lifecycle stages (mutually exclusive with managedInstances, managedInstanceGroupIds and managedCompartmentIds).
64 65 66 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 64 def lifecycle_stage_ids @lifecycle_stage_ids end |
#lifecycle_state ⇒ String
[Required] The current state of the scheduled job.
72 73 74 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 72 def lifecycle_state @lifecycle_state end |
#managed_compartment_ids ⇒ Array<String>
The list of target compartment OCIDs if this scheduled job operates on a compartment level (mutually exclusive with managedInstances, managedInstanceGroupIds and lifecycleStageIds).
60 61 62 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 60 def managed_compartment_ids @managed_compartment_ids end |
#managed_instance_group_ids ⇒ Array<String>
The list of managed instance group OCIDs this scheduled job operates on (mutually exclusive with managedInstances, managedCompartmentIds and lifecycleStageIds).
56 57 58 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 56 def managed_instance_group_ids @managed_instance_group_ids end |
#managed_instance_ids ⇒ Array<String>
The list of managed instance OCIDs this scheduled job operates on (mutually exclusive with managedInstanceGroupIds, managedCompartmentIds and lifecycleStageIds).
52 53 54 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 52 def managed_instance_ids @managed_instance_ids end |
#operations ⇒ Array<OCI::OsManagementHub::Models::ScheduledJobOperation>
[Required] The list of operations this scheduled job needs to perform (can only support one operation if the operationType is not UPDATE_PACKAGES/UPDATE_ALL/UPDATE_SECURITY/UPDATE_BUGFIX/UPDATE_ENHANCEMENT/UPDATE_OTHER/UPDATE_KSPLICE_USERSPACE/UPDATE_KSPLICE_KERNEL).
68 69 70 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 68 def operations @operations end |
#schedule_type ⇒ String
[Required] The type of scheduling this scheduled job follows.
32 33 34 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 32 def schedule_type @schedule_type end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
96 97 98 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 96 def @system_tags end |
#time_created ⇒ DateTime
[Required] The time this scheduled job was created. An RFC3339 formatted datetime string.
36 37 38 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 36 def time_created @time_created end |
#time_last_execution ⇒ DateTime
The time/date of the last execution of this scheduled job.
48 49 50 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 48 def time_last_execution @time_last_execution end |
#time_next_execution ⇒ DateTime
[Required] The time/date of the next scheduled execution of this scheduled job.
44 45 46 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 44 def time_next_execution @time_next_execution end |
#time_updated ⇒ DateTime
[Required] The time this scheduled job was updated. An RFC3339 formatted datetime string.
40 41 42 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 40 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 99 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'display_name': :'displayName', 'compartment_id': :'compartmentId', 'schedule_type': :'scheduleType', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'time_next_execution': :'timeNextExecution', 'time_last_execution': :'timeLastExecution', 'managed_instance_ids': :'managedInstanceIds', 'managed_instance_group_ids': :'managedInstanceGroupIds', 'managed_compartment_ids': :'managedCompartmentIds', 'lifecycle_stage_ids': :'lifecycleStageIds', 'operations': :'operations', 'lifecycle_state': :'lifecycleState', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'is_restricted': :'isRestricted', 'system_tags': :'systemTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 125 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'display_name': :'String', 'compartment_id': :'String', 'schedule_type': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'time_next_execution': :'DateTime', 'time_last_execution': :'DateTime', 'managed_instance_ids': :'Array<String>', 'managed_instance_group_ids': :'Array<String>', 'managed_compartment_ids': :'Array<String>', 'lifecycle_stage_ids': :'Array<String>', 'operations': :'Array<OCI::OsManagementHub::Models::ScheduledJobOperation>', 'lifecycle_state': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'is_restricted': :'BOOLEAN', 'system_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 301 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && display_name == other.display_name && compartment_id == other.compartment_id && schedule_type == other.schedule_type && time_created == other.time_created && time_updated == other.time_updated && time_next_execution == other.time_next_execution && time_last_execution == other.time_last_execution && managed_instance_ids == other.managed_instance_ids && managed_instance_group_ids == other.managed_instance_group_ids && managed_compartment_ids == other.managed_compartment_ids && lifecycle_stage_ids == other.lifecycle_stage_ids && operations == other.operations && lifecycle_state == other.lifecycle_state && == other. && == other. && is_restricted == other.is_restricted && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 348 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
328 329 330 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 328 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
337 338 339 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 337 def hash [id, display_name, compartment_id, schedule_type, time_created, time_updated, time_next_execution, time_last_execution, managed_instance_ids, managed_instance_group_ids, managed_compartment_ids, lifecycle_stage_ids, operations, lifecycle_state, , , is_restricted, ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
381 382 383 384 385 386 387 388 389 390 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 381 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
375 376 377 |
# File 'lib/oci/os_management_hub/models/scheduled_job_summary.rb', line 375 def to_s to_hash.to_s end |