Class: OCI::DataScience::Models::Schedule
- Inherits:
-
Object
- Object
- OCI::DataScience::Models::Schedule
- Defined in:
- lib/oci/data_science/models/schedule.rb
Overview
A repeating action. Examples: * Invoke a ML Pipeline Run once an hour. * Call ML Job Run every night at midnight.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.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
Instance Attribute Summary collapse
-
#action ⇒ OCI::DataScience::Models::ScheduleAction
This attribute is required.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment where you want to create the schedule.
-
#created_by ⇒ String
[Required] The OCID of the user who created the schedule.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
A short description of the schedule.
-
#display_name ⇒ String
[Required] A user-friendly display name for the resource.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#id ⇒ String
[Required] The OCID of the schedule.
-
#last_schedule_run_details ⇒ String
Details about the action performed by the last schedule execution.
-
#lifecycle_details ⇒ String
A message describing the current state in more detail.
-
#lifecycle_state ⇒ String
[Required] The current state of the schedule.
- #log_details ⇒ OCI::DataScience::Models::ScheduleLogDetails
-
#project_id ⇒ String
[Required] The OCID of the project associated with the schedule.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
Usage of system tag keys.
-
#time_created ⇒ DateTime
[Required] The date and time the schedule was created.
-
#time_last_schedule_run ⇒ DateTime
The last schedule execution time.
-
#time_next_scheduled_run ⇒ DateTime
The next scheduled execution time for the schedule.
-
#time_updated ⇒ DateTime
The date and time the schedule was updated.
-
#trigger ⇒ OCI::DataScience::Models::ScheduleTrigger
This attribute is required.
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 = {}) ⇒ Schedule
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 = {}) ⇒ Schedule
Initializes the object
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 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 |
# File 'lib/oci/data_science/models/schedule.rb', line 202 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.project_id = attributes[:'projectId'] if attributes[:'projectId'] raise 'You cannot provide both :projectId and :project_id' if attributes.key?(:'projectId') && attributes.key?(:'project_id') self.project_id = attributes[:'project_id'] if attributes[:'project_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.time_last_schedule_run = attributes[:'timeLastScheduleRun'] if attributes[:'timeLastScheduleRun'] raise 'You cannot provide both :timeLastScheduleRun and :time_last_schedule_run' if attributes.key?(:'timeLastScheduleRun') && attributes.key?(:'time_last_schedule_run') self.time_last_schedule_run = attributes[:'time_last_schedule_run'] if attributes[:'time_last_schedule_run'] self.time_next_scheduled_run = attributes[:'timeNextScheduledRun'] if attributes[:'timeNextScheduledRun'] raise 'You cannot provide both :timeNextScheduledRun and :time_next_scheduled_run' if attributes.key?(:'timeNextScheduledRun') && attributes.key?(:'time_next_scheduled_run') self.time_next_scheduled_run = attributes[:'time_next_scheduled_run'] if attributes[:'time_next_scheduled_run'] 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.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.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.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] self.last_schedule_run_details = attributes[:'lastScheduleRunDetails'] if attributes[:'lastScheduleRunDetails'] raise 'You cannot provide both :lastScheduleRunDetails and :last_schedule_run_details' if attributes.key?(:'lastScheduleRunDetails') && attributes.key?(:'last_schedule_run_details') self.last_schedule_run_details = attributes[:'last_schedule_run_details'] if attributes[:'last_schedule_run_details'] self.trigger = attributes[:'trigger'] if attributes[:'trigger'] self.action = attributes[:'action'] if attributes[:'action'] self.log_details = attributes[:'logDetails'] if attributes[:'logDetails'] raise 'You cannot provide both :logDetails and :log_details' if attributes.key?(:'logDetails') && attributes.key?(:'log_details') self.log_details = attributes[:'log_details'] if attributes[:'log_details'] 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. = 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
#action ⇒ OCI::DataScience::Models::ScheduleAction
This attribute is required.
100 101 102 |
# File 'lib/oci/data_science/models/schedule.rb', line 100 def action @action end |
#compartment_id ⇒ String
[Required] The OCID of the compartment where you want to create the schedule.
32 33 34 |
# File 'lib/oci/data_science/models/schedule.rb', line 32 def compartment_id @compartment_id end |
#created_by ⇒ String
[Required] The OCID of the user who created the schedule.
76 77 78 |
# File 'lib/oci/data_science/models/schedule.rb', line 76 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. See Resource Tags. Example: {\"Operations\": {\"CostCenter\": \"42\"}}
115 116 117 |
# File 'lib/oci/data_science/models/schedule.rb', line 115 def @defined_tags end |
#description ⇒ String
A short description of the schedule.
44 45 46 |
# File 'lib/oci/data_science/models/schedule.rb', line 44 def description @description end |
#display_name ⇒ String
[Required] A user-friendly display name for the resource. Avoid entering confidential information.
40 41 42 |
# File 'lib/oci/data_science/models/schedule.rb', line 40 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See Resource Tags. Example: {\"Department\": \"Finance\"}
109 110 111 |
# File 'lib/oci/data_science/models/schedule.rb', line 109 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the schedule.
28 29 30 |
# File 'lib/oci/data_science/models/schedule.rb', line 28 def id @id end |
#last_schedule_run_details ⇒ String
Details about the action performed by the last schedule execution. Example: Invoked ML Application trigger.
92 93 94 |
# File 'lib/oci/data_science/models/schedule.rb', line 92 def last_schedule_run_details @last_schedule_run_details end |
#lifecycle_details ⇒ String
A message describing the current state in more detail.
86 87 88 |
# File 'lib/oci/data_science/models/schedule.rb', line 86 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the schedule. Example: ACTIVE
82 83 84 |
# File 'lib/oci/data_science/models/schedule.rb', line 82 def lifecycle_state @lifecycle_state end |
#log_details ⇒ OCI::DataScience::Models::ScheduleLogDetails
103 104 105 |
# File 'lib/oci/data_science/models/schedule.rb', line 103 def log_details @log_details end |
#project_id ⇒ String
[Required] The OCID of the project associated with the schedule.
36 37 38 |
# File 'lib/oci/data_science/models/schedule.rb', line 36 def project_id @project_id end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
121 122 123 |
# File 'lib/oci/data_science/models/schedule.rb', line 121 def @system_tags end |
#time_created ⇒ DateTime
[Required] The date and time the schedule was created. Format is defined by RFC3339. Example: 2022-08-05T01:02:29.600Z
65 66 67 |
# File 'lib/oci/data_science/models/schedule.rb', line 65 def time_created @time_created end |
#time_last_schedule_run ⇒ DateTime
The last schedule execution time. Format is defined by RFC3339. Example: 2022-08-05T01:02:29.600Z
51 52 53 |
# File 'lib/oci/data_science/models/schedule.rb', line 51 def time_last_schedule_run @time_last_schedule_run end |
#time_next_scheduled_run ⇒ DateTime
The next scheduled execution time for the schedule. Format is defined by RFC3339. Example: 2022-08-05T01:02:29.600Z
58 59 60 |
# File 'lib/oci/data_science/models/schedule.rb', line 58 def time_next_scheduled_run @time_next_scheduled_run end |
#time_updated ⇒ DateTime
The date and time the schedule was updated. Format is defined by RFC3339. Example: 2022-09-05T01:02:29.600Z
72 73 74 |
# File 'lib/oci/data_science/models/schedule.rb', line 72 def time_updated @time_updated end |
#trigger ⇒ OCI::DataScience::Models::ScheduleTrigger
This attribute is required.
96 97 98 |
# File 'lib/oci/data_science/models/schedule.rb', line 96 def trigger @trigger end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
124 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/data_science/models/schedule.rb', line 124 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'compartment_id': :'compartmentId', 'project_id': :'projectId', 'display_name': :'displayName', 'description': :'description', 'time_last_schedule_run': :'timeLastScheduleRun', 'time_next_scheduled_run': :'timeNextScheduledRun', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'created_by': :'createdBy', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'last_schedule_run_details': :'lastScheduleRunDetails', 'trigger': :'trigger', 'action': :'action', 'log_details': :'logDetails', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/oci/data_science/models/schedule.rb', line 151 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'compartment_id': :'String', 'project_id': :'String', 'display_name': :'String', 'description': :'String', 'time_last_schedule_run': :'DateTime', 'time_next_scheduled_run': :'DateTime', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'created_by': :'String', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'last_schedule_run_details': :'String', 'trigger': :'OCI::DataScience::Models::ScheduleTrigger', 'action': :'OCI::DataScience::Models::ScheduleAction', 'log_details': :'OCI::DataScience::Models::ScheduleLogDetails', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
# File 'lib/oci/data_science/models/schedule.rb', line 327 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && compartment_id == other.compartment_id && project_id == other.project_id && display_name == other.display_name && description == other.description && time_last_schedule_run == other.time_last_schedule_run && time_next_scheduled_run == other.time_next_scheduled_run && time_created == other.time_created && time_updated == other.time_updated && created_by == other.created_by && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && last_schedule_run_details == other.last_schedule_run_details && trigger == other.trigger && action == other.action && log_details == other.log_details && == other. && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/oci/data_science/models/schedule.rb', line 375 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
355 356 357 |
# File 'lib/oci/data_science/models/schedule.rb', line 355 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
364 365 366 |
# File 'lib/oci/data_science/models/schedule.rb', line 364 def hash [id, compartment_id, project_id, display_name, description, time_last_schedule_run, time_next_scheduled_run, time_created, time_updated, created_by, lifecycle_state, lifecycle_details, last_schedule_run_details, trigger, action, log_details, , , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
408 409 410 411 412 413 414 415 416 417 |
# File 'lib/oci/data_science/models/schedule.rb', line 408 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
402 403 404 |
# File 'lib/oci/data_science/models/schedule.rb', line 402 def to_s to_hash.to_s end |