Class: OCI::Jms::Models::TaskSchedule
- Inherits:
-
Object
- Object
- OCI::Jms::Models::TaskSchedule
- Defined in:
- lib/oci/jms/models/task_schedule.rb
Overview
The properties of a task schedule.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#created_by ⇒ String
[Required] Name of the task creator.
-
#execution_recurrences ⇒ String
[Required] Recurrence specification for the task schedule execution (formatted according to RFC-5545).
-
#fleet_id ⇒ String
[Required] The OCID of the Fleet.
-
#id ⇒ String
[Required] The OCID to identify this task schedule.
-
#lifecycle_state ⇒ String
[Required] All possible status of task schedule.
-
#name ⇒ String
[Required] The name of the task schedule.
-
#task_details ⇒ OCI::Jms::Models::TaskDetails
This attribute is required.
-
#time_created ⇒ DateTime
[Required] The date and time the task schedule was created (formatted according to RFC3339).
-
#time_last_run ⇒ DateTime
The date and time the task schedule ran last (formatted according to RFC3339).
-
#time_last_updated ⇒ DateTime
[Required] The date and time the task schedule was last updated (formatted according to RFC3339).
-
#time_next_run ⇒ DateTime
The date and time the task schedule will run next (formatted according to RFC3339).
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 = {}) ⇒ TaskSchedule
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 = {}) ⇒ TaskSchedule
Initializes the object
119 120 121 122 123 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 149 150 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 176 177 178 179 180 181 182 |
# File 'lib/oci/jms/models/task_schedule.rb', line 119 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.fleet_id = attributes[:'fleetId'] if attributes[:'fleetId'] raise 'You cannot provide both :fleetId and :fleet_id' if attributes.key?(:'fleetId') && attributes.key?(:'fleet_id') self.fleet_id = attributes[:'fleet_id'] if attributes[:'fleet_id'] self.name = attributes[:'name'] if attributes[:'name'] 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.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.execution_recurrences = attributes[:'executionRecurrences'] if attributes[:'executionRecurrences'] raise 'You cannot provide both :executionRecurrences and :execution_recurrences' if attributes.key?(:'executionRecurrences') && attributes.key?(:'execution_recurrences') self.execution_recurrences = attributes[:'execution_recurrences'] if attributes[:'execution_recurrences'] self.task_details = attributes[:'taskDetails'] if attributes[:'taskDetails'] raise 'You cannot provide both :taskDetails and :task_details' if attributes.key?(:'taskDetails') && attributes.key?(:'task_details') self.task_details = attributes[:'task_details'] if attributes[:'task_details'] 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_last_run = attributes[:'timeLastRun'] if attributes[:'timeLastRun'] raise 'You cannot provide both :timeLastRun and :time_last_run' if attributes.key?(:'timeLastRun') && attributes.key?(:'time_last_run') self.time_last_run = attributes[:'time_last_run'] if attributes[:'time_last_run'] self.time_next_run = attributes[:'timeNextRun'] if attributes[:'timeNextRun'] raise 'You cannot provide both :timeNextRun and :time_next_run' if attributes.key?(:'timeNextRun') && attributes.key?(:'time_next_run') self.time_next_run = attributes[:'time_next_run'] if attributes[:'time_next_run'] self.time_last_updated = attributes[:'timeLastUpdated'] if attributes[:'timeLastUpdated'] raise 'You cannot provide both :timeLastUpdated and :time_last_updated' if attributes.key?(:'timeLastUpdated') && attributes.key?(:'time_last_updated') self.time_last_updated = attributes[:'time_last_updated'] if attributes[:'time_last_updated'] end |
Instance Attribute Details
#created_by ⇒ String
[Required] Name of the task creator.
36 37 38 |
# File 'lib/oci/jms/models/task_schedule.rb', line 36 def created_by @created_by end |
#execution_recurrences ⇒ String
[Required] Recurrence specification for the task schedule execution (formatted according to RFC-5545). To run daily for 10 occurrences starts on September 2, 2024 09:00 UTC, it should be 'DTSTART=20240902T090000Z; RRULE:FREQ=DAILY;COUNT=10'. To run every 3 hours from 9:00 AM to 5:00 PM on August 5, 2024 UTC, it should be 'DTSTART=20240805T090000Z;RRULE:FREQ=HOURLY;INTERVAL=3;UNTIL=20240805T170000Z'.
42 43 44 |
# File 'lib/oci/jms/models/task_schedule.rb', line 42 def execution_recurrences @execution_recurrences end |
#fleet_id ⇒ String
[Required] The OCID of the Fleet.
24 25 26 |
# File 'lib/oci/jms/models/task_schedule.rb', line 24 def fleet_id @fleet_id end |
#id ⇒ String
[Required] The OCID to identify this task schedule.
20 21 22 |
# File 'lib/oci/jms/models/task_schedule.rb', line 20 def id @id end |
#lifecycle_state ⇒ String
[Required] All possible status of task schedule.
32 33 34 |
# File 'lib/oci/jms/models/task_schedule.rb', line 32 def lifecycle_state @lifecycle_state end |
#name ⇒ String
[Required] The name of the task schedule.
28 29 30 |
# File 'lib/oci/jms/models/task_schedule.rb', line 28 def name @name end |
#task_details ⇒ OCI::Jms::Models::TaskDetails
This attribute is required.
46 47 48 |
# File 'lib/oci/jms/models/task_schedule.rb', line 46 def task_details @task_details end |
#time_created ⇒ DateTime
[Required] The date and time the task schedule was created (formatted according to RFC3339).
50 51 52 |
# File 'lib/oci/jms/models/task_schedule.rb', line 50 def time_created @time_created end |
#time_last_run ⇒ DateTime
The date and time the task schedule ran last (formatted according to RFC3339).
54 55 56 |
# File 'lib/oci/jms/models/task_schedule.rb', line 54 def time_last_run @time_last_run end |
#time_last_updated ⇒ DateTime
[Required] The date and time the task schedule was last updated (formatted according to RFC3339).
62 63 64 |
# File 'lib/oci/jms/models/task_schedule.rb', line 62 def time_last_updated @time_last_updated end |
#time_next_run ⇒ DateTime
The date and time the task schedule will run next (formatted according to RFC3339).
58 59 60 |
# File 'lib/oci/jms/models/task_schedule.rb', line 58 def time_next_run @time_next_run end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/oci/jms/models/task_schedule.rb', line 65 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'fleet_id': :'fleetId', 'name': :'name', 'lifecycle_state': :'lifecycleState', 'created_by': :'createdBy', 'execution_recurrences': :'executionRecurrences', 'task_details': :'taskDetails', 'time_created': :'timeCreated', 'time_last_run': :'timeLastRun', 'time_next_run': :'timeNextRun', 'time_last_updated': :'timeLastUpdated' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/oci/jms/models/task_schedule.rb', line 84 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'fleet_id': :'String', 'name': :'String', 'lifecycle_state': :'String', 'created_by': :'String', 'execution_recurrences': :'String', 'task_details': :'OCI::Jms::Models::TaskDetails', 'time_created': :'DateTime', 'time_last_run': :'DateTime', 'time_next_run': :'DateTime', 'time_last_updated': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/oci/jms/models/task_schedule.rb', line 204 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && fleet_id == other.fleet_id && name == other.name && lifecycle_state == other.lifecycle_state && created_by == other.created_by && execution_recurrences == other.execution_recurrences && task_details == other.task_details && time_created == other.time_created && time_last_run == other.time_last_run && time_next_run == other.time_next_run && time_last_updated == other.time_last_updated end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 |
# File 'lib/oci/jms/models/task_schedule.rb', line 244 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
224 225 226 |
# File 'lib/oci/jms/models/task_schedule.rb', line 224 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
233 234 235 |
# File 'lib/oci/jms/models/task_schedule.rb', line 233 def hash [id, fleet_id, name, lifecycle_state, created_by, execution_recurrences, task_details, time_created, time_last_run, time_next_run, time_last_updated].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
277 278 279 280 281 282 283 284 285 286 |
# File 'lib/oci/jms/models/task_schedule.rb', line 277 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
271 272 273 |
# File 'lib/oci/jms/models/task_schedule.rb', line 271 def to_s to_hash.to_s end |