Class: OCI::MediaServices::Models::CreateMediaAssetDetails
- Inherits:
-
Object
- Object
- OCI::MediaServices::Models::CreateMediaAssetDetails
- Defined in:
- lib/oci/media_services/models/create_media_asset_details.rb
Overview
The information about new MediaAsset.
Constant Summary collapse
- 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 ].freeze
Instance Attribute Summary collapse
-
#bucket_name ⇒ String
The name of the object storage bucket where this asset is located.
-
#compartment_id ⇒ String
[Required] Compartment Identifier.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#display_name ⇒ String
Display name for the Media Asset.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#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 for 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.
-
#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 = {}) ⇒ CreateMediaAssetDetails
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 = {}) ⇒ CreateMediaAssetDetails
Initializes the object
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 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 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 172 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.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.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.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. = attributes[:'metadata'] if attributes[:'metadata'] 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[:'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'] end |
Instance Attribute Details
#bucket_name ⇒ String
The name of the object storage bucket where this asset is located.
54 55 56 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 54 def bucket_name @bucket_name end |
#compartment_id ⇒ String
[Required] Compartment Identifier.
38 39 40 |
# File 'lib/oci/media_services/models/create_media_asset_details.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\"}}
94 95 96 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 94 def @defined_tags end |
#display_name ⇒ String
Display name for the Media Asset. Does not have to be unique. Avoid entering confidential information.
34 35 36 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 34 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\"}
88 89 90 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 88 def @freeform_tags end |
#master_media_asset_id ⇒ String
The ID of the senior most asset from which this asset is derived.
50 51 52 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 50 def master_media_asset_id @master_media_asset_id end |
#media_asset_tags ⇒ Array<OCI::MediaServices::Models::MediaAssetTag>
list of tags for the MediaAsset.
82 83 84 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 82 def @media_asset_tags end |
#media_workflow_job_id ⇒ String
The ID of the MediaWorkflowJob used to produce this asset.
26 27 28 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 26 def media_workflow_job_id @media_workflow_job_id end |
#metadata ⇒ Array<OCI::MediaServices::Models::Metadata>
List of Metadata.
70 71 72 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 70 def @metadata end |
#namespace_name ⇒ String
The object storage namespace where this asset is located.
58 59 60 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 58 def namespace_name @namespace_name end |
#object_etag ⇒ String
eTag of the underlying object storage object.
66 67 68 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 66 def object_etag @object_etag end |
#object_name ⇒ String
The object storage object name that identifies this asset.
62 63 64 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 62 def object_name @object_name end |
#parent_media_asset_id ⇒ String
The ID of the parent asset from which this asset is derived.
46 47 48 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 46 def parent_media_asset_id @parent_media_asset_id end |
#segment_range_end_index ⇒ Integer
The end index for video segment files.
78 79 80 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 78 def segment_range_end_index @segment_range_end_index end |
#segment_range_start_index ⇒ Integer
The start index for video segment files.
74 75 76 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 74 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.
22 23 24 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 22 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.
30 31 32 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 30 def source_media_workflow_version @source_media_workflow_version end |
#type ⇒ String
[Required] The type of the media asset.
42 43 44 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 42 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 97 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'source_media_workflow_id': :'sourceMediaWorkflowId', 'media_workflow_job_id': :'mediaWorkflowJobId', 'source_media_workflow_version': :'sourceMediaWorkflowVersion', 'display_name': :'displayName', 'compartment_id': :'compartmentId', 'type': :'type', 'parent_media_asset_id': :'parentMediaAssetId', 'master_media_asset_id': :'masterMediaAssetId', 'bucket_name': :'bucketName', 'namespace_name': :'namespaceName', 'object_name': :'objectName', 'object_etag': :'objectEtag', 'metadata': :'metadata', 'segment_range_start_index': :'segmentRangeStartIndex', 'segment_range_end_index': :'segmentRangeEndIndex', 'media_asset_tags': :'mediaAssetTags', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 123 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'source_media_workflow_id': :'String', 'media_workflow_job_id': :'String', 'source_media_workflow_version': :'Integer', 'display_name': :'String', 'compartment_id': :'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', 'metadata': :'Array<OCI::MediaServices::Models::Metadata>', 'segment_range_start_index': :'Integer', 'segment_range_end_index': :'Integer', 'media_asset_tags': :'Array<OCI::MediaServices::Models::MediaAssetTag>', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 294 def ==(other) return true if equal?(other) self.class == other.class && 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 && compartment_id == other.compartment_id && 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 && == other. && segment_range_start_index == other.segment_range_start_index && segment_range_end_index == other.segment_range_end_index && == other. && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 341 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
321 322 323 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 321 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
330 331 332 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 330 def hash [source_media_workflow_id, media_workflow_job_id, source_media_workflow_version, display_name, compartment_id, type, parent_media_asset_id, master_media_asset_id, bucket_name, namespace_name, object_name, object_etag, , segment_range_start_index, segment_range_end_index, , , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
374 375 376 377 378 379 380 381 382 383 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 374 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
368 369 370 |
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 368 def to_s to_hash.to_s end |