Class: OCI::MediaServices::Models::MediaAsset
- Inherits:
-
Object
- Object
- OCI::MediaServices::Models::MediaAsset
- Defined in:
- lib/oci/media_services/models/media_asset.rb
Overview
Represents the metadata associated with an asset that has been either produced by or registered with Media Services.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.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
- TYPE_ENUM =
[ TYPE_AUDIO = 'AUDIO'.freeze, TYPE_VIDEO = 'VIDEO'.freeze, TYPE_PLAYLIST = 'PLAYLIST'.freeze, TYPE_IMAGE = 'IMAGE'.freeze, TYPE_CAPTION_FILE = 'CAPTION_FILE'.freeze, TYPE_UNKNOWN = 'UNKNOWN'.freeze, TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#bucket_name ⇒ String
The name of the object storage bucket where this represented asset is located.
-
#compartment_id ⇒ String
[Required] The ID of the compartment containing the MediaAsset.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#display_name ⇒ String
A user-friendly name.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#id ⇒ String
[Required] Unique identifier that is immutable on creation.
-
#lifecycle_state ⇒ String
[Required] The current state of the MediaAsset.
-
#locks ⇒ Array<OCI::MediaServices::Models::ResourceLock>
Locks associated with this resource.
-
#master_media_asset_id ⇒ String
The ID of the senior most asset from which this asset is derived.
-
#media_asset_tags ⇒ Array<OCI::MediaServices::Models::MediaAssetTag>
List of tags for the MediaAsset.
-
#media_workflow_job_id ⇒ String
The ID of the MediaWorkflowJob used to produce this asset.
-
#metadata ⇒ Array<OCI::MediaServices::Models::Metadata>
List of Metadata.
-
#namespace_name ⇒ String
The object storage namespace where this asset is located.
-
#object_etag ⇒ String
eTag of the underlying object storage object.
-
#object_name ⇒ String
The object storage object name that identifies this asset.
-
#parent_media_asset_id ⇒ String
The ID of the parent asset from which this asset is derived.
-
#segment_range_end_index ⇒ Integer
The end index of video segment files.
-
#segment_range_start_index ⇒ Integer
The start index for video segment files.
-
#source_media_workflow_id ⇒ String
The ID of the MediaWorkflow used to produce this asset.
-
#source_media_workflow_version ⇒ Integer
The version of the MediaWorkflow used to produce this asset.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
Usage of system tag keys.
-
#time_created ⇒ DateTime
The time when the MediaAsset was created.
-
#time_updated ⇒ DateTime
The time when the MediaAsset was updated.
-
#type ⇒ String
[Required] The type of the media asset.
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 = {}) ⇒ MediaAsset
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 = {}) ⇒ MediaAsset
Initializes the object
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 354 355 356 357 358 359 360 361 |
# File 'lib/oci/media_services/models/media_asset.rb', line 228 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.source_media_workflow_id = attributes[:'sourceMediaWorkflowId'] if attributes[:'sourceMediaWorkflowId'] raise 'You cannot provide both :sourceMediaWorkflowId and :source_media_workflow_id' if attributes.key?(:'sourceMediaWorkflowId') && attributes.key?(:'source_media_workflow_id') self.source_media_workflow_id = attributes[:'source_media_workflow_id'] if attributes[:'source_media_workflow_id'] self.media_workflow_job_id = attributes[:'mediaWorkflowJobId'] if attributes[:'mediaWorkflowJobId'] raise 'You cannot provide both :mediaWorkflowJobId and :media_workflow_job_id' if attributes.key?(:'mediaWorkflowJobId') && attributes.key?(:'media_workflow_job_id') self.media_workflow_job_id = attributes[:'media_workflow_job_id'] if attributes[:'media_workflow_job_id'] self.source_media_workflow_version = attributes[:'sourceMediaWorkflowVersion'] if attributes[:'sourceMediaWorkflowVersion'] raise 'You cannot provide both :sourceMediaWorkflowVersion and :source_media_workflow_version' if attributes.key?(:'sourceMediaWorkflowVersion') && attributes.key?(:'source_media_workflow_version') self.source_media_workflow_version = attributes[:'source_media_workflow_version'] if attributes[:'source_media_workflow_version'] 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.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.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.type = attributes[:'type'] if attributes[:'type'] self.parent_media_asset_id = attributes[:'parentMediaAssetId'] if attributes[:'parentMediaAssetId'] raise 'You cannot provide both :parentMediaAssetId and :parent_media_asset_id' if attributes.key?(:'parentMediaAssetId') && attributes.key?(:'parent_media_asset_id') self.parent_media_asset_id = attributes[:'parent_media_asset_id'] if attributes[:'parent_media_asset_id'] self.master_media_asset_id = attributes[:'masterMediaAssetId'] if attributes[:'masterMediaAssetId'] raise 'You cannot provide both :masterMediaAssetId and :master_media_asset_id' if attributes.key?(:'masterMediaAssetId') && attributes.key?(:'master_media_asset_id') self.master_media_asset_id = attributes[:'master_media_asset_id'] if attributes[:'master_media_asset_id'] self.bucket_name = attributes[:'bucketName'] if attributes[:'bucketName'] raise 'You cannot provide both :bucketName and :bucket_name' if attributes.key?(:'bucketName') && attributes.key?(:'bucket_name') self.bucket_name = attributes[:'bucket_name'] if attributes[:'bucket_name'] self.namespace_name = attributes[:'namespaceName'] if attributes[:'namespaceName'] raise 'You cannot provide both :namespaceName and :namespace_name' if attributes.key?(:'namespaceName') && attributes.key?(:'namespace_name') self.namespace_name = attributes[:'namespace_name'] if attributes[:'namespace_name'] self.object_name = attributes[:'objectName'] if attributes[:'objectName'] raise 'You cannot provide both :objectName and :object_name' if attributes.key?(:'objectName') && attributes.key?(:'object_name') self.object_name = attributes[:'object_name'] if attributes[:'object_name'] self.object_etag = attributes[:'objectEtag'] if attributes[:'objectEtag'] raise 'You cannot provide both :objectEtag and :object_etag' if attributes.key?(:'objectEtag') && attributes.key?(:'object_etag') self.object_etag = attributes[:'object_etag'] if attributes[:'object_etag'] 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.segment_range_start_index = attributes[:'segmentRangeStartIndex'] if attributes[:'segmentRangeStartIndex'] raise 'You cannot provide both :segmentRangeStartIndex and :segment_range_start_index' if attributes.key?(:'segmentRangeStartIndex') && attributes.key?(:'segment_range_start_index') self.segment_range_start_index = attributes[:'segment_range_start_index'] if attributes[:'segment_range_start_index'] self.segment_range_end_index = attributes[:'segmentRangeEndIndex'] if attributes[:'segmentRangeEndIndex'] raise 'You cannot provide both :segmentRangeEndIndex and :segment_range_end_index' if attributes.key?(:'segmentRangeEndIndex') && attributes.key?(:'segment_range_end_index') self.segment_range_end_index = attributes[:'segment_range_end_index'] if attributes[:'segment_range_end_index'] self. = attributes[:'metadata'] if attributes[:'metadata'] self. = attributes[:'mediaAssetTags'] if attributes[:'mediaAssetTags'] raise 'You cannot provide both :mediaAssetTags and :media_asset_tags' if attributes.key?(:'mediaAssetTags') && attributes.key?(:'media_asset_tags') self. = attributes[:'media_asset_tags'] if attributes[:'media_asset_tags'] 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.locks = attributes[:'locks'] if attributes[:'locks'] end |
Instance Attribute Details
#bucket_name ⇒ String
The name of the object storage bucket where this represented asset is located.
78 79 80 |
# File 'lib/oci/media_services/models/media_asset.rb', line 78 def bucket_name @bucket_name end |
#compartment_id ⇒ String
[Required] The ID of the compartment containing the MediaAsset.
38 39 40 |
# File 'lib/oci/media_services/models/media_asset.rb', line 38 def compartment_id @compartment_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
122 123 124 |
# File 'lib/oci/media_services/models/media_asset.rb', line 122 def @defined_tags end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
54 55 56 |
# File 'lib/oci/media_services/models/media_asset.rb', line 54 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}
116 117 118 |
# File 'lib/oci/media_services/models/media_asset.rb', line 116 def @freeform_tags end |
#id ⇒ String
[Required] Unique identifier that is immutable on creation.
34 35 36 |
# File 'lib/oci/media_services/models/media_asset.rb', line 34 def id @id end |
#lifecycle_state ⇒ String
[Required] The current state of the MediaAsset.
62 63 64 |
# File 'lib/oci/media_services/models/media_asset.rb', line 62 def lifecycle_state @lifecycle_state end |
#locks ⇒ Array<OCI::MediaServices::Models::ResourceLock>
Locks associated with this resource.
132 133 134 |
# File 'lib/oci/media_services/models/media_asset.rb', line 132 def locks @locks end |
#master_media_asset_id ⇒ String
The ID of the senior most asset from which this asset is derived.
74 75 76 |
# File 'lib/oci/media_services/models/media_asset.rb', line 74 def master_media_asset_id @master_media_asset_id end |
#media_asset_tags ⇒ Array<OCI::MediaServices::Models::MediaAssetTag>
List of tags for the MediaAsset.
110 111 112 |
# File 'lib/oci/media_services/models/media_asset.rb', line 110 def @media_asset_tags end |
#media_workflow_job_id ⇒ String
The ID of the MediaWorkflowJob used to produce this asset.
46 47 48 |
# File 'lib/oci/media_services/models/media_asset.rb', line 46 def media_workflow_job_id @media_workflow_job_id end |
#metadata ⇒ Array<OCI::MediaServices::Models::Metadata>
List of Metadata.
106 107 108 |
# File 'lib/oci/media_services/models/media_asset.rb', line 106 def @metadata end |
#namespace_name ⇒ String
The object storage namespace where this asset is located.
82 83 84 |
# File 'lib/oci/media_services/models/media_asset.rb', line 82 def namespace_name @namespace_name end |
#object_etag ⇒ String
eTag of the underlying object storage object.
90 91 92 |
# File 'lib/oci/media_services/models/media_asset.rb', line 90 def object_etag @object_etag end |
#object_name ⇒ String
The object storage object name that identifies this asset.
86 87 88 |
# File 'lib/oci/media_services/models/media_asset.rb', line 86 def object_name @object_name end |
#parent_media_asset_id ⇒ String
The ID of the parent asset from which this asset is derived.
70 71 72 |
# File 'lib/oci/media_services/models/media_asset.rb', line 70 def parent_media_asset_id @parent_media_asset_id end |
#segment_range_end_index ⇒ Integer
The end index of video segment files.
102 103 104 |
# File 'lib/oci/media_services/models/media_asset.rb', line 102 def segment_range_end_index @segment_range_end_index end |
#segment_range_start_index ⇒ Integer
The start index for video segment files.
98 99 100 |
# File 'lib/oci/media_services/models/media_asset.rb', line 98 def segment_range_start_index @segment_range_start_index end |
#source_media_workflow_id ⇒ String
The ID of the MediaWorkflow used to produce this asset.
42 43 44 |
# File 'lib/oci/media_services/models/media_asset.rb', line 42 def source_media_workflow_id @source_media_workflow_id end |
#source_media_workflow_version ⇒ Integer
The version of the MediaWorkflow used to produce this asset.
50 51 52 |
# File 'lib/oci/media_services/models/media_asset.rb', line 50 def source_media_workflow_version @source_media_workflow_version 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\"}}
128 129 130 |
# File 'lib/oci/media_services/models/media_asset.rb', line 128 def @system_tags end |
#time_created ⇒ DateTime
The time when the MediaAsset was created. An RFC3339 formatted datetime string.
58 59 60 |
# File 'lib/oci/media_services/models/media_asset.rb', line 58 def time_created @time_created end |
#time_updated ⇒ DateTime
The time when the MediaAsset was updated. An RFC3339 formatted datetime string.
94 95 96 |
# File 'lib/oci/media_services/models/media_asset.rb', line 94 def time_updated @time_updated end |
#type ⇒ String
[Required] The type of the media asset.
66 67 68 |
# File 'lib/oci/media_services/models/media_asset.rb', line 66 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/media_services/models/media_asset.rb', line 135 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'compartment_id': :'compartmentId', 'source_media_workflow_id': :'sourceMediaWorkflowId', 'media_workflow_job_id': :'mediaWorkflowJobId', 'source_media_workflow_version': :'sourceMediaWorkflowVersion', 'display_name': :'displayName', 'time_created': :'timeCreated', 'lifecycle_state': :'lifecycleState', 'type': :'type', 'parent_media_asset_id': :'parentMediaAssetId', 'master_media_asset_id': :'masterMediaAssetId', 'bucket_name': :'bucketName', 'namespace_name': :'namespaceName', 'object_name': :'objectName', 'object_etag': :'objectEtag', 'time_updated': :'timeUpdated', 'segment_range_start_index': :'segmentRangeStartIndex', 'segment_range_end_index': :'segmentRangeEndIndex', 'metadata': :'metadata', 'media_asset_tags': :'mediaAssetTags', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags', 'locks': :'locks' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/oci/media_services/models/media_asset.rb', line 167 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'compartment_id': :'String', 'source_media_workflow_id': :'String', 'media_workflow_job_id': :'String', 'source_media_workflow_version': :'Integer', 'display_name': :'String', 'time_created': :'DateTime', 'lifecycle_state': :'String', 'type': :'String', 'parent_media_asset_id': :'String', 'master_media_asset_id': :'String', 'bucket_name': :'String', 'namespace_name': :'String', 'object_name': :'String', 'object_etag': :'String', 'time_updated': :'DateTime', 'segment_range_start_index': :'Integer', 'segment_range_end_index': :'Integer', 'metadata': :'Array<OCI::MediaServices::Models::Metadata>', 'media_asset_tags': :'Array<OCI::MediaServices::Models::MediaAssetTag>', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>', 'locks': :'Array<OCI::MediaServices::Models::ResourceLock>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 |
# File 'lib/oci/media_services/models/media_asset.rb', line 396 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && compartment_id == other.compartment_id && source_media_workflow_id == other.source_media_workflow_id && media_workflow_job_id == other.media_workflow_job_id && source_media_workflow_version == other.source_media_workflow_version && display_name == other.display_name && time_created == other.time_created && lifecycle_state == other.lifecycle_state && type == other.type && parent_media_asset_id == other.parent_media_asset_id && master_media_asset_id == other.master_media_asset_id && bucket_name == other.bucket_name && namespace_name == other.namespace_name && object_name == other.object_name && object_etag == other.object_etag && time_updated == other.time_updated && segment_range_start_index == other.segment_range_start_index && segment_range_end_index == other.segment_range_end_index && == other. && == other. && == other. && == other. && == other. && locks == other.locks end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 |
# File 'lib/oci/media_services/models/media_asset.rb', line 449 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
429 430 431 |
# File 'lib/oci/media_services/models/media_asset.rb', line 429 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
438 439 440 |
# File 'lib/oci/media_services/models/media_asset.rb', line 438 def hash [id, compartment_id, source_media_workflow_id, media_workflow_job_id, source_media_workflow_version, display_name, time_created, lifecycle_state, type, parent_media_asset_id, master_media_asset_id, bucket_name, namespace_name, object_name, object_etag, time_updated, segment_range_start_index, segment_range_end_index, , , , , , locks].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
482 483 484 485 486 487 488 489 490 491 |
# File 'lib/oci/media_services/models/media_asset.rb', line 482 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
476 477 478 |
# File 'lib/oci/media_services/models/media_asset.rb', line 476 def to_s to_hash.to_s end |