Class: OCI::DataIntegration::Models::TaskSchedule
- Inherits:
-
Object
- Object
- OCI::DataIntegration::Models::TaskSchedule
- Defined in:
- lib/oci/data_integration/models/task_schedule.rb
Overview
A model that holds Schedule and other information required for scheduling a task.
Constant Summary collapse
- RETRY_DELAY_UNIT_ENUM =
[ RETRY_DELAY_UNIT_SECONDS = 'SECONDS'.freeze, RETRY_DELAY_UNIT_MINUTES = 'MINUTES'.freeze, RETRY_DELAY_UNIT_HOURS = 'HOURS'.freeze, RETRY_DELAY_UNIT_DAYS = 'DAYS'.freeze, RETRY_DELAY_UNIT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- AUTH_MODE_ENUM =
[ AUTH_MODE_OBO = 'OBO'.freeze, AUTH_MODE_RESOURCE_PRINCIPAL = 'RESOURCE_PRINCIPAL'.freeze, AUTH_MODE_USER_CERTIFICATE = 'USER_CERTIFICATE'.freeze, AUTH_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- EXPECTED_DURATION_UNIT_ENUM =
[ EXPECTED_DURATION_UNIT_SECONDS = 'SECONDS'.freeze, EXPECTED_DURATION_UNIT_MINUTES = 'MINUTES'.freeze, EXPECTED_DURATION_UNIT_HOURS = 'HOURS'.freeze, EXPECTED_DURATION_UNIT_DAYS = 'DAYS'.freeze, EXPECTED_DURATION_UNIT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#auth_mode ⇒ String
The authorization mode for the task.
- #config_provider_delegate ⇒ OCI::DataIntegration::Models::ConfigProvider
-
#description ⇒ String
Detailed description for the object.
-
#end_time_millis ⇒ Integer
The end time in milliseconds.
-
#expected_duration ⇒ Float
The expected duration of the task execution.
-
#expected_duration_unit ⇒ String
The expected duration unit of the task execution.
-
#identifier ⇒ String
Value can only contain upper case letters, underscore, and numbers.
-
#is_backfill_enabled ⇒ BOOLEAN
Whether the backfill is enabled.
-
#is_concurrent_allowed ⇒ BOOLEAN
Whether the same task can be executed concurrently.
-
#is_enabled ⇒ BOOLEAN
Whether the schedule is enabled.
-
#key ⇒ String
Generated key that can be used in API calls to identify taskSchedule.
- #last_run_details ⇒ OCI::DataIntegration::Models::LastRunDetails
- #metadata ⇒ OCI::DataIntegration::Models::ObjectMetadata
-
#model_type ⇒ String
The type of the object.
-
#model_version ⇒ String
This is a version number that is used by the service to upgrade objects if needed through releases of the service.
-
#name ⇒ String
Free form text without any restriction on permitted characters.
-
#object_status ⇒ Integer
The status of an object that can be set to value 1 for shallow references across objects, other values reserved.
-
#object_version ⇒ Integer
This is used by the service for optimistic locking of the object, to prevent multiple users from simultaneously updating the object.
- #parent_ref ⇒ OCI::DataIntegration::Models::ParentReference
-
#retry_attempts ⇒ Integer
The number of retry attempts.
-
#retry_delay ⇒ Float
The retry delay, the unit for measurement is in the property retry delay unit.
-
#retry_delay_unit ⇒ String
The unit for the retry delay.
- #schedule_ref ⇒ OCI::DataIntegration::Models::Schedule
-
#start_time_millis ⇒ Integer
The start time in milliseconds.
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
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 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 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 220 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.key = attributes[:'key'] if attributes[:'key'] self.model_version = attributes[:'modelVersion'] if attributes[:'modelVersion'] raise 'You cannot provide both :modelVersion and :model_version' if attributes.key?(:'modelVersion') && attributes.key?(:'model_version') self.model_version = attributes[:'model_version'] if attributes[:'model_version'] self.model_type = attributes[:'modelType'] if attributes[:'modelType'] raise 'You cannot provide both :modelType and :model_type' if attributes.key?(:'modelType') && attributes.key?(:'model_type') self.model_type = attributes[:'model_type'] if attributes[:'model_type'] self.parent_ref = attributes[:'parentRef'] if attributes[:'parentRef'] raise 'You cannot provide both :parentRef and :parent_ref' if attributes.key?(:'parentRef') && attributes.key?(:'parent_ref') self.parent_ref = attributes[:'parent_ref'] if attributes[:'parent_ref'] self.name = attributes[:'name'] if attributes[:'name'] self.description = attributes[:'description'] if attributes[:'description'] self.object_version = attributes[:'objectVersion'] if attributes[:'objectVersion'] raise 'You cannot provide both :objectVersion and :object_version' if attributes.key?(:'objectVersion') && attributes.key?(:'object_version') self.object_version = attributes[:'object_version'] if attributes[:'object_version'] self.object_status = attributes[:'objectStatus'] if attributes[:'objectStatus'] raise 'You cannot provide both :objectStatus and :object_status' if attributes.key?(:'objectStatus') && attributes.key?(:'object_status') self.object_status = attributes[:'object_status'] if attributes[:'object_status'] self.identifier = attributes[:'identifier'] if attributes[:'identifier'] self.schedule_ref = attributes[:'scheduleRef'] if attributes[:'scheduleRef'] raise 'You cannot provide both :scheduleRef and :schedule_ref' if attributes.key?(:'scheduleRef') && attributes.key?(:'schedule_ref') self.schedule_ref = attributes[:'schedule_ref'] if attributes[:'schedule_ref'] self.config_provider_delegate = attributes[:'configProviderDelegate'] if attributes[:'configProviderDelegate'] raise 'You cannot provide both :configProviderDelegate and :config_provider_delegate' if attributes.key?(:'configProviderDelegate') && attributes.key?(:'config_provider_delegate') self.config_provider_delegate = attributes[:'config_provider_delegate'] if attributes[:'config_provider_delegate'] self.is_enabled = attributes[:'isEnabled'] unless attributes[:'isEnabled'].nil? raise 'You cannot provide both :isEnabled and :is_enabled' if attributes.key?(:'isEnabled') && attributes.key?(:'is_enabled') self.is_enabled = attributes[:'is_enabled'] unless attributes[:'is_enabled'].nil? self.retry_attempts = attributes[:'retryAttempts'] if attributes[:'retryAttempts'] raise 'You cannot provide both :retryAttempts and :retry_attempts' if attributes.key?(:'retryAttempts') && attributes.key?(:'retry_attempts') self.retry_attempts = attributes[:'retry_attempts'] if attributes[:'retry_attempts'] self.retry_delay_unit = attributes[:'retryDelayUnit'] if attributes[:'retryDelayUnit'] raise 'You cannot provide both :retryDelayUnit and :retry_delay_unit' if attributes.key?(:'retryDelayUnit') && attributes.key?(:'retry_delay_unit') self.retry_delay_unit = attributes[:'retry_delay_unit'] if attributes[:'retry_delay_unit'] self.retry_delay = attributes[:'retryDelay'] if attributes[:'retryDelay'] raise 'You cannot provide both :retryDelay and :retry_delay' if attributes.key?(:'retryDelay') && attributes.key?(:'retry_delay') self.retry_delay = attributes[:'retry_delay'] if attributes[:'retry_delay'] self.start_time_millis = attributes[:'startTimeMillis'] if attributes[:'startTimeMillis'] raise 'You cannot provide both :startTimeMillis and :start_time_millis' if attributes.key?(:'startTimeMillis') && attributes.key?(:'start_time_millis') self.start_time_millis = attributes[:'start_time_millis'] if attributes[:'start_time_millis'] self.end_time_millis = attributes[:'endTimeMillis'] if attributes[:'endTimeMillis'] raise 'You cannot provide both :endTimeMillis and :end_time_millis' if attributes.key?(:'endTimeMillis') && attributes.key?(:'end_time_millis') self.end_time_millis = attributes[:'end_time_millis'] if attributes[:'end_time_millis'] self.is_concurrent_allowed = attributes[:'isConcurrentAllowed'] unless attributes[:'isConcurrentAllowed'].nil? self.is_concurrent_allowed = true if is_concurrent_allowed.nil? && !attributes.key?(:'isConcurrentAllowed') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isConcurrentAllowed and :is_concurrent_allowed' if attributes.key?(:'isConcurrentAllowed') && attributes.key?(:'is_concurrent_allowed') self.is_concurrent_allowed = attributes[:'is_concurrent_allowed'] unless attributes[:'is_concurrent_allowed'].nil? self.is_concurrent_allowed = true if is_concurrent_allowed.nil? && !attributes.key?(:'isConcurrentAllowed') && !attributes.key?(:'is_concurrent_allowed') # rubocop:disable Style/StringLiterals self.is_backfill_enabled = attributes[:'isBackfillEnabled'] unless attributes[:'isBackfillEnabled'].nil? self.is_backfill_enabled = false if is_backfill_enabled.nil? && !attributes.key?(:'isBackfillEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isBackfillEnabled and :is_backfill_enabled' if attributes.key?(:'isBackfillEnabled') && attributes.key?(:'is_backfill_enabled') self.is_backfill_enabled = attributes[:'is_backfill_enabled'] unless attributes[:'is_backfill_enabled'].nil? self.is_backfill_enabled = false if is_backfill_enabled.nil? && !attributes.key?(:'isBackfillEnabled') && !attributes.key?(:'is_backfill_enabled') # rubocop:disable Style/StringLiterals self.auth_mode = attributes[:'authMode'] if attributes[:'authMode'] raise 'You cannot provide both :authMode and :auth_mode' if attributes.key?(:'authMode') && attributes.key?(:'auth_mode') self.auth_mode = attributes[:'auth_mode'] if attributes[:'auth_mode'] self.expected_duration = attributes[:'expectedDuration'] if attributes[:'expectedDuration'] raise 'You cannot provide both :expectedDuration and :expected_duration' if attributes.key?(:'expectedDuration') && attributes.key?(:'expected_duration') self.expected_duration = attributes[:'expected_duration'] if attributes[:'expected_duration'] self.expected_duration_unit = attributes[:'expectedDurationUnit'] if attributes[:'expectedDurationUnit'] raise 'You cannot provide both :expectedDurationUnit and :expected_duration_unit' if attributes.key?(:'expectedDurationUnit') && attributes.key?(:'expected_duration_unit') self.expected_duration_unit = attributes[:'expected_duration_unit'] if attributes[:'expected_duration_unit'] self.last_run_details = attributes[:'lastRunDetails'] if attributes[:'lastRunDetails'] raise 'You cannot provide both :lastRunDetails and :last_run_details' if attributes.key?(:'lastRunDetails') && attributes.key?(:'last_run_details') self.last_run_details = attributes[:'last_run_details'] if attributes[:'last_run_details'] self. = attributes[:'metadata'] if attributes[:'metadata'] end |
Instance Attribute Details
#auth_mode ⇒ String
The authorization mode for the task.
110 111 112 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 110 def auth_mode @auth_mode end |
#config_provider_delegate ⇒ OCI::DataIntegration::Models::ConfigProvider
74 75 76 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 74 def config_provider_delegate @config_provider_delegate end |
#description ⇒ String
Detailed description for the object.
56 57 58 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 56 def description @description end |
#end_time_millis ⇒ Integer
The end time in milliseconds.
98 99 100 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 98 def end_time_millis @end_time_millis end |
#expected_duration ⇒ Float
The expected duration of the task execution.
114 115 116 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 114 def expected_duration @expected_duration end |
#expected_duration_unit ⇒ String
The expected duration unit of the task execution.
118 119 120 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 118 def expected_duration_unit @expected_duration_unit end |
#identifier ⇒ String
Value can only contain upper case letters, underscore, and numbers. It should begin with upper case letter or underscore. The value can be modified.
68 69 70 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 68 def identifier @identifier end |
#is_backfill_enabled ⇒ BOOLEAN
Whether the backfill is enabled
106 107 108 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 106 def is_backfill_enabled @is_backfill_enabled end |
#is_concurrent_allowed ⇒ BOOLEAN
Whether the same task can be executed concurrently.
102 103 104 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 102 def is_concurrent_allowed @is_concurrent_allowed end |
#is_enabled ⇒ BOOLEAN
Whether the schedule is enabled.
78 79 80 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 78 def is_enabled @is_enabled end |
#key ⇒ String
Generated key that can be used in API calls to identify taskSchedule. On scenarios where reference to the taskSchedule is needed, a value can be passed in create.
37 38 39 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 37 def key @key end |
#last_run_details ⇒ OCI::DataIntegration::Models::LastRunDetails
121 122 123 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 121 def last_run_details @last_run_details end |
#metadata ⇒ OCI::DataIntegration::Models::ObjectMetadata
124 125 126 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 124 def @metadata end |
#model_type ⇒ String
The type of the object.
45 46 47 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 45 def model_type @model_type end |
#model_version ⇒ String
This is a version number that is used by the service to upgrade objects if needed through releases of the service.
41 42 43 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 41 def model_version @model_version end |
#name ⇒ String
Free form text without any restriction on permitted characters. Name can have letters, numbers, and special characters. The value is editable and is restricted to 1000 characters.
52 53 54 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 52 def name @name end |
#object_status ⇒ Integer
The status of an object that can be set to value 1 for shallow references across objects, other values reserved.
64 65 66 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 64 def object_status @object_status end |
#object_version ⇒ Integer
This is used by the service for optimistic locking of the object, to prevent multiple users from simultaneously updating the object.
60 61 62 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 60 def object_version @object_version end |
#parent_ref ⇒ OCI::DataIntegration::Models::ParentReference
48 49 50 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 48 def parent_ref @parent_ref end |
#retry_attempts ⇒ Integer
The number of retry attempts.
82 83 84 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 82 def retry_attempts @retry_attempts end |
#retry_delay ⇒ Float
The retry delay, the unit for measurement is in the property retry delay unit.
90 91 92 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 90 def retry_delay @retry_delay end |
#retry_delay_unit ⇒ String
The unit for the retry delay.
86 87 88 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 86 def retry_delay_unit @retry_delay_unit end |
#schedule_ref ⇒ OCI::DataIntegration::Models::Schedule
71 72 73 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 71 def schedule_ref @schedule_ref end |
#start_time_millis ⇒ Integer
The start time in milliseconds.
94 95 96 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 94 def start_time_millis @start_time_millis end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 127 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'key': :'key', 'model_version': :'modelVersion', 'model_type': :'modelType', 'parent_ref': :'parentRef', 'name': :'name', 'description': :'description', 'object_version': :'objectVersion', 'object_status': :'objectStatus', 'identifier': :'identifier', 'schedule_ref': :'scheduleRef', 'config_provider_delegate': :'configProviderDelegate', 'is_enabled': :'isEnabled', 'retry_attempts': :'retryAttempts', 'retry_delay_unit': :'retryDelayUnit', 'retry_delay': :'retryDelay', 'start_time_millis': :'startTimeMillis', 'end_time_millis': :'endTimeMillis', 'is_concurrent_allowed': :'isConcurrentAllowed', 'is_backfill_enabled': :'isBackfillEnabled', 'auth_mode': :'authMode', 'expected_duration': :'expectedDuration', 'expected_duration_unit': :'expectedDurationUnit', 'last_run_details': :'lastRunDetails', 'metadata': :'metadata' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 185 186 187 188 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 159 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'key': :'String', 'model_version': :'String', 'model_type': :'String', 'parent_ref': :'OCI::DataIntegration::Models::ParentReference', 'name': :'String', 'description': :'String', 'object_version': :'Integer', 'object_status': :'Integer', 'identifier': :'String', 'schedule_ref': :'OCI::DataIntegration::Models::Schedule', 'config_provider_delegate': :'OCI::DataIntegration::Models::ConfigProvider', 'is_enabled': :'BOOLEAN', 'retry_attempts': :'Integer', 'retry_delay_unit': :'String', 'retry_delay': :'Float', 'start_time_millis': :'Integer', 'end_time_millis': :'Integer', 'is_concurrent_allowed': :'BOOLEAN', 'is_backfill_enabled': :'BOOLEAN', 'auth_mode': :'String', 'expected_duration': :'Float', 'expected_duration_unit': :'String', 'last_run_details': :'OCI::DataIntegration::Models::LastRunDetails', 'metadata': :'OCI::DataIntegration::Models::ObjectMetadata' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 401 def ==(other) return true if equal?(other) self.class == other.class && key == other.key && model_version == other.model_version && model_type == other.model_type && parent_ref == other.parent_ref && name == other.name && description == other.description && object_version == other.object_version && object_status == other.object_status && identifier == other.identifier && schedule_ref == other.schedule_ref && config_provider_delegate == other.config_provider_delegate && is_enabled == other.is_enabled && retry_attempts == other.retry_attempts && retry_delay_unit == other.retry_delay_unit && retry_delay == other.retry_delay && start_time_millis == other.start_time_millis && end_time_millis == other.end_time_millis && is_concurrent_allowed == other.is_concurrent_allowed && is_backfill_enabled == other.is_backfill_enabled && auth_mode == other.auth_mode && expected_duration == other.expected_duration && expected_duration_unit == other.expected_duration_unit && last_run_details == other.last_run_details && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 454 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
434 435 436 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 434 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
443 444 445 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 443 def hash [key, model_version, model_type, parent_ref, name, description, object_version, object_status, identifier, schedule_ref, config_provider_delegate, is_enabled, retry_attempts, retry_delay_unit, retry_delay, start_time_millis, end_time_millis, is_concurrent_allowed, is_backfill_enabled, auth_mode, expected_duration, expected_duration_unit, last_run_details, ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
487 488 489 490 491 492 493 494 495 496 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 487 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
481 482 483 |
# File 'lib/oci/data_integration/models/task_schedule.rb', line 481 def to_s to_hash.to_s end |