Class: OCI::MediaServices::Models::CreateMediaAssetDetails

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateMediaAssetDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



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
278
279
280
281
282
283
284
285
286
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 179

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.media_asset_tags = 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.media_asset_tags = attributes[:'media_asset_tags'] if attributes[:'media_asset_tags']

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

  raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')

  self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

  raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')

  self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']

  self.locks = attributes[:'locks'] if attributes[:'locks']
end

Instance Attribute Details

#bucket_nameString

The name of the object storage bucket where this asset is located.

Returns:

  • (String)


54
55
56
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 54

def bucket_name
  @bucket_name
end

#compartment_idString

[Required] Compartment Identifier.

Returns:

  • (String)


38
39
40
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 38

def compartment_id
  @compartment_id
end

#defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


94
95
96
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 94

def defined_tags
  @defined_tags
end

#display_nameString

Display name for the Media Asset. Does not have to be unique. Avoid entering confidential information.

Returns:

  • (String)


34
35
36
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 34

def display_name
  @display_name
end

#freeform_tagsHash<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\"}

Returns:

  • (Hash<String, String>)


88
89
90
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 88

def freeform_tags
  @freeform_tags
end

#locksArray<OCI::MediaServices::Models::ResourceLock>

Locks associated with this resource.



98
99
100
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 98

def locks
  @locks
end

#master_media_asset_idString

The ID of the senior most asset from which this asset is derived.

Returns:

  • (String)


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_tagsArray<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
  @media_asset_tags
end

#media_workflow_job_idString

The ID of the MediaWorkflowJob used to produce this asset.

Returns:

  • (String)


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

#metadataArray<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_nameString

The object storage namespace where this asset is located.

Returns:

  • (String)


58
59
60
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 58

def namespace_name
  @namespace_name
end

#object_etagString

eTag of the underlying object storage object.

Returns:

  • (String)


66
67
68
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 66

def object_etag
  @object_etag
end

#object_nameString

The object storage object name that identifies this asset.

Returns:

  • (String)


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_idString

The ID of the parent asset from which this asset is derived.

Returns:

  • (String)


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_indexInteger

The end index for video segment files.

Returns:

  • (Integer)


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_indexInteger

The start index for video segment files.

Returns:

  • (Integer)


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_idString

The ID of the MediaWorkflow used to produce this asset.

Returns:

  • (String)


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_versionInteger

The version of the MediaWorkflow used to produce this asset.

Returns:

  • (Integer)


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

#typeString

[Required] The type of the media asset.

Returns:

  • (String)


42
43
44
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 42

def type
  @type
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 101

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',
    'locks': :'locks'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 128

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>>',
    'locks': :'Array<OCI::MediaServices::Models::ResourceLock>'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 303

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 &&
    media_asset_tags == other.media_asset_tags &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    locks == other.locks
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 351

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


331
332
333
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 331

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



340
341
342
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 340

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, media_asset_tags, freeform_tags, defined_tags, locks].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



384
385
386
387
388
389
390
391
392
393
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 384

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



378
379
380
# File 'lib/oci/media_services/models/create_media_asset_details.rb', line 378

def to_s
  to_hash.to_s
end