Class: OCI::LustreFileStorage::Models::SyncJob
- Inherits:
-
Object
- Object
- OCI::LustreFileStorage::Models::SyncJob
- Defined in:
- lib/oci/lustre_file_storage/models/sync_job.rb
Overview
Details associated with sync job runs.
Constant Summary collapse
- JOB_TYPE_ENUM =
[ JOB_TYPE_IMPORT = 'IMPORT'.freeze, JOB_TYPE_EXPORT = 'EXPORT'.freeze, JOB_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze, LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze, LIFECYCLE_STATE_CANCELING = 'CANCELING'.freeze, LIFECYCLE_STATE_CANCELED = 'CANCELED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_FAILING = 'FAILING'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#bytes_transferred ⇒ Integer
[Required] Bytes transferred during the sync.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
[Required] Defined tags for this resource.
-
#freeform_tags ⇒ Hash<String, String>
[Required] Free-form tags for this resource.
-
#id ⇒ String
[Required] The OCID of the sync job.
-
#is_overwrite ⇒ BOOLEAN
[Required] The flag is an identifier to tell whether this specific job run has overwrite enabled.
-
#job_type ⇒ String
[Required] The type of the sync job.
-
#lifecycle_details ⇒ String
A message that describes the current state of the sync job in more detail.
-
#lifecycle_state ⇒ String
[Required] The current state of the sync job.
-
#lustre_file_system_path ⇒ String
[Required] The path in the Lustre file system used for this Object Storage link.
-
#object_storage_path ⇒ String
[Required] The Object Storage namespace and bucket name, including optional object prefix string, to use as the source for imports or destination for exports.
-
#objects_transferred ⇒ Integer
[Required] Count of total files that transferred successfully.
-
#parent_id ⇒ String
The OCID of the Object Storage link.
-
#skipped_error_count ⇒ Integer
[Required] Count of files or objects that failed to export or import due to errors.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
[Required] System tags for this resource.
-
#time_finished ⇒ DateTime
The date and time the job finished, expressed in RFC 3339 timestamp format.
-
#time_started ⇒ DateTime
[Required] The date and time the job was started, expressed in RFC 3339 timestamp format.
-
#total_objects_scanned ⇒ Integer
[Required] Total object count for scanned files for import or export as part of this sync 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 = {}) ⇒ SyncJob
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 = {}) ⇒ SyncJob
Initializes the object
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 306 307 308 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 205 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.parent_id = attributes[:'parentId'] if attributes[:'parentId'] raise 'You cannot provide both :parentId and :parent_id' if attributes.key?(:'parentId') && attributes.key?(:'parent_id') self.parent_id = attributes[:'parent_id'] if attributes[:'parent_id'] self.job_type = attributes[:'jobType'] if attributes[:'jobType'] raise 'You cannot provide both :jobType and :job_type' if attributes.key?(:'jobType') && attributes.key?(:'job_type') self.job_type = attributes[:'job_type'] if attributes[:'job_type'] 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. = 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'] self.is_overwrite = attributes[:'isOverwrite'] unless attributes[:'isOverwrite'].nil? raise 'You cannot provide both :isOverwrite and :is_overwrite' if attributes.key?(:'isOverwrite') && attributes.key?(:'is_overwrite') self.is_overwrite = attributes[:'is_overwrite'] unless attributes[:'is_overwrite'].nil? self.total_objects_scanned = attributes[:'totalObjectsScanned'] if attributes[:'totalObjectsScanned'] raise 'You cannot provide both :totalObjectsScanned and :total_objects_scanned' if attributes.key?(:'totalObjectsScanned') && attributes.key?(:'total_objects_scanned') self.total_objects_scanned = attributes[:'total_objects_scanned'] if attributes[:'total_objects_scanned'] self.objects_transferred = attributes[:'objectsTransferred'] if attributes[:'objectsTransferred'] raise 'You cannot provide both :objectsTransferred and :objects_transferred' if attributes.key?(:'objectsTransferred') && attributes.key?(:'objects_transferred') self.objects_transferred = attributes[:'objects_transferred'] if attributes[:'objects_transferred'] self.bytes_transferred = attributes[:'bytesTransferred'] if attributes[:'bytesTransferred'] raise 'You cannot provide both :bytesTransferred and :bytes_transferred' if attributes.key?(:'bytesTransferred') && attributes.key?(:'bytes_transferred') self.bytes_transferred = attributes[:'bytes_transferred'] if attributes[:'bytes_transferred'] self.skipped_error_count = attributes[:'skippedErrorCount'] if attributes[:'skippedErrorCount'] raise 'You cannot provide both :skippedErrorCount and :skipped_error_count' if attributes.key?(:'skippedErrorCount') && attributes.key?(:'skipped_error_count') self.skipped_error_count = attributes[:'skipped_error_count'] if attributes[:'skipped_error_count'] self.time_started = attributes[:'timeStarted'] if attributes[:'timeStarted'] raise 'You cannot provide both :timeStarted and :time_started' if attributes.key?(:'timeStarted') && attributes.key?(:'time_started') self.time_started = attributes[:'time_started'] if attributes[:'time_started'] self.time_finished = attributes[:'timeFinished'] if attributes[:'timeFinished'] raise 'You cannot provide both :timeFinished and :time_finished' if attributes.key?(:'timeFinished') && attributes.key?(:'time_finished') self.time_finished = attributes[:'time_finished'] if attributes[:'time_finished'] self.lustre_file_system_path = attributes[:'lustreFileSystemPath'] if attributes[:'lustreFileSystemPath'] raise 'You cannot provide both :lustreFileSystemPath and :lustre_file_system_path' if attributes.key?(:'lustreFileSystemPath') && attributes.key?(:'lustre_file_system_path') self.lustre_file_system_path = attributes[:'lustre_file_system_path'] if attributes[:'lustre_file_system_path'] self.object_storage_path = attributes[:'objectStoragePath'] if attributes[:'objectStoragePath'] raise 'You cannot provide both :objectStoragePath and :object_storage_path' if attributes.key?(:'objectStoragePath') && attributes.key?(:'object_storage_path') self.object_storage_path = attributes[:'object_storage_path'] if attributes[:'object_storage_path'] end |
Instance Attribute Details
#bytes_transferred ⇒ Integer
[Required] Bytes transferred during the sync. This value changes while the sync is still in progress.
95 96 97 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 95 def bytes_transferred @bytes_transferred 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\"}}
66 67 68 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 66 def @defined_tags 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\"}
58 59 60 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 58 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the sync job.
30 31 32 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 30 def id @id end |
#is_overwrite ⇒ BOOLEAN
[Required] The flag is an identifier to tell whether this specific job run has overwrite enabled. If isOverwrite is false, the file to be imported or exported will be skipped if it already exists. If isOverwrite is true, the file to be imported or exported will be overwritten if it already exists.
80 81 82 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 80 def is_overwrite @is_overwrite end |
#job_type ⇒ String
[Required] The type of the sync job.
39 40 41 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 39 def job_type @job_type end |
#lifecycle_details ⇒ String
A message that describes the current state of the sync job in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
50 51 52 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 50 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the sync job.
44 45 46 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 44 def lifecycle_state @lifecycle_state end |
#lustre_file_system_path ⇒ String
[Required] The path in the Lustre file system used for this Object Storage link.
Example: myFileSystem/mount/myDirectory
123 124 125 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 123 def lustre_file_system_path @lustre_file_system_path end |
#object_storage_path ⇒ String
[Required] The Object Storage namespace and bucket name, including optional object prefix string, to use as the source for imports or destination for exports.
Example: objectStorageNamespace:/bucketName/optionalFolder/optionalPrefix
130 131 132 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 130 def object_storage_path @object_storage_path end |
#objects_transferred ⇒ Integer
[Required] Count of total files that transferred successfully.
90 91 92 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 90 def objects_transferred @objects_transferred end |
#parent_id ⇒ String
The OCID of the Object Storage link.
34 35 36 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 34 def parent_id @parent_id end |
#skipped_error_count ⇒ Integer
[Required] Count of files or objects that failed to export or import due to errors.
100 101 102 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 100 def skipped_error_count @skipped_error_count end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
[Required] System tags for this resource. Each key is predefined and scoped to a namespace.
Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
73 74 75 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 73 def @system_tags end |
#time_finished ⇒ DateTime
The date and time the job finished, expressed in RFC 3339 timestamp format.
Example: 2020-07-25T21:10:29.600Z
116 117 118 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 116 def time_finished @time_finished end |
#time_started ⇒ DateTime
[Required] The date and time the job was started, expressed in RFC 3339 timestamp format.
Example: 2020-07-25T21:10:29.600Z
108 109 110 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 108 def time_started @time_started end |
#total_objects_scanned ⇒ Integer
[Required] Total object count for scanned files for import or export as part of this sync job.
85 86 87 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 85 def total_objects_scanned @total_objects_scanned end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 133 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'parent_id': :'parentId', 'job_type': :'jobType', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags', 'is_overwrite': :'isOverwrite', 'total_objects_scanned': :'totalObjectsScanned', 'objects_transferred': :'objectsTransferred', 'bytes_transferred': :'bytesTransferred', 'skipped_error_count': :'skippedErrorCount', 'time_started': :'timeStarted', 'time_finished': :'timeFinished', 'lustre_file_system_path': :'lustreFileSystemPath', 'object_storage_path': :'objectStoragePath' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 158 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'parent_id': :'String', 'job_type': :'String', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>', 'is_overwrite': :'BOOLEAN', 'total_objects_scanned': :'Integer', 'objects_transferred': :'Integer', 'bytes_transferred': :'Integer', 'skipped_error_count': :'Integer', 'time_started': :'DateTime', 'time_finished': :'DateTime', 'lustre_file_system_path': :'String', 'object_storage_path': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 343 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && parent_id == other.parent_id && job_type == other.job_type && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && == other. && == other. && == other. && is_overwrite == other.is_overwrite && total_objects_scanned == other.total_objects_scanned && objects_transferred == other.objects_transferred && bytes_transferred == other.bytes_transferred && skipped_error_count == other.skipped_error_count && time_started == other.time_started && time_finished == other.time_finished && lustre_file_system_path == other.lustre_file_system_path && object_storage_path == other.object_storage_path end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 389 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
369 370 371 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 369 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
378 379 380 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 378 def hash [id, parent_id, job_type, lifecycle_state, lifecycle_details, , , , is_overwrite, total_objects_scanned, objects_transferred, bytes_transferred, skipped_error_count, time_started, time_finished, lustre_file_system_path, object_storage_path].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
422 423 424 425 426 427 428 429 430 431 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 422 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
416 417 418 |
# File 'lib/oci/lustre_file_storage/models/sync_job.rb', line 416 def to_s to_hash.to_s end |