Class: OCI::LustreFileStorage::Models::SyncJobSummary
- Inherits:
-
Object
- Object
- OCI::LustreFileStorage::Models::SyncJobSummary
- Defined in:
- lib/oci/lustre_file_storage/models/sync_job_summary.rb
Overview
Summary information associated with sync jobs.
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
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 transferred successfully.
-
#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 = {}) ⇒ SyncJobSummary
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 = {}) ⇒ SyncJobSummary
Initializes the object
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 280 281 282 283 284 285 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 188 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.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 sync is still in progress.
81 82 83 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 81 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\"}}
52 53 54 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 52 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\"}
44 45 46 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 44 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the sync job.
20 21 22 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 20 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.
66 67 68 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 66 def is_overwrite @is_overwrite end |
#job_type ⇒ String
[Required] The type of the sync job.
25 26 27 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 25 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.
36 37 38 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 36 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the sync job.
30 31 32 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 30 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
109 110 111 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 109 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
116 117 118 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 116 def object_storage_path @object_storage_path end |
#objects_transferred ⇒ Integer
[Required] Count of total files transferred successfully.
76 77 78 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 76 def objects_transferred @objects_transferred end |
#skipped_error_count ⇒ Integer
[Required] Count of files or objects that failed to export or import due to errors.
86 87 88 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 86 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\"}}
59 60 61 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 59 def @system_tags end |
#time_finished ⇒ DateTime
The date and time the job finished, expressed in RFC 3339 timestamp format.
Example: 2024-07-21T20:10:29.600Z
102 103 104 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 102 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
94 95 96 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 94 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.
71 72 73 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 71 def total_objects_scanned @total_objects_scanned end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 119 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', '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.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 143 def self.swagger_types { # rubocop:disable Style/SymbolLiteral '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.
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 307 def ==(other) return true if equal?(other) self.class == other.class && id == other.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
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 352 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
332 333 334 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 332 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
341 342 343 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 341 def hash [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
385 386 387 388 389 390 391 392 393 394 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 385 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
379 380 381 |
# File 'lib/oci/lustre_file_storage/models/sync_job_summary.rb', line 379 def to_s to_hash.to_s end |