Class: MuxRuby::Asset
- Inherits:
-
Object
- Object
- MuxRuby::Asset
- Defined in:
- lib/mux_ruby/models/asset.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#aspect_ratio ⇒ Object
The aspect ratio of the asset in the form of ‘width:height`, for example `16:9`.
-
#created_at ⇒ Object
Time the Asset was created, defined as a Unix timestamp (seconds since epoch).
-
#duration ⇒ Object
The duration of the asset in seconds (max duration for a single asset is 12 hours).
-
#encoding_tier ⇒ Object
This field is deprecated.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#id ⇒ Object
Unique identifier for the Asset.
-
#ingest_type ⇒ Object
The type of ingest used to create the asset.
-
#is_live ⇒ Object
Indicates whether the live stream that created this asset is currently ‘active` and not in `idle` state.
-
#live_stream_id ⇒ Object
Unique identifier for the live stream.
-
#master ⇒ Object
Returns the value of attribute master.
-
#master_access ⇒ Object
Returns the value of attribute master_access.
-
#max_resolution_tier ⇒ Object
Max resolution tier can be used to control the maximum ‘resolution_tier` your asset is encoded, stored, and streamed at.
-
#max_stored_frame_rate ⇒ Object
The maximum frame rate that has been stored for the asset.
-
#max_stored_resolution ⇒ Object
This field is deprecated.
-
#mp4_support ⇒ Object
Returns the value of attribute mp4_support.
-
#non_standard_input_reasons ⇒ Object
Returns the value of attribute non_standard_input_reasons.
-
#normalize_audio ⇒ Object
Normalize the audio track loudness level.
-
#passthrough ⇒ Object
Arbitrary user-supplied metadata set for the asset.
-
#per_title_encode ⇒ Object
Returns the value of attribute per_title_encode.
-
#playback_ids ⇒ Object
An array of Playback ID objects.
-
#recording_times ⇒ Object
An array of individual live stream recording sessions.
-
#resolution_tier ⇒ Object
The resolution tier that the asset was ingested at, affecting billing for ingest & storage.
-
#source_asset_id ⇒ Object
Asset Identifier of the video used as the source for creating the clip.
-
#static_renditions ⇒ Object
Returns the value of attribute static_renditions.
-
#status ⇒ Object
The status of the asset.
-
#test ⇒ Object
True means this live stream is a test asset.
-
#tracks ⇒ Object
The individual media tracks that make up an asset.
-
#upload_id ⇒ Object
Unique identifier for the Direct Upload.
-
#video_quality ⇒ Object
The video quality controls the cost, quality, and available platform features for the asset.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Asset
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Asset
Initializes the object
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 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 |
# File 'lib/mux_ruby/models/asset.rb', line 203 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::Asset` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::Asset`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'duration') self.duration = attributes[:'duration'] end if attributes.key?(:'max_stored_resolution') self.max_stored_resolution = attributes[:'max_stored_resolution'] end if attributes.key?(:'resolution_tier') self.resolution_tier = attributes[:'resolution_tier'] end if attributes.key?(:'max_resolution_tier') self.max_resolution_tier = attributes[:'max_resolution_tier'] end if attributes.key?(:'encoding_tier') self.encoding_tier = attributes[:'encoding_tier'] end if attributes.key?(:'video_quality') self.video_quality = attributes[:'video_quality'] end if attributes.key?(:'max_stored_frame_rate') self.max_stored_frame_rate = attributes[:'max_stored_frame_rate'] end if attributes.key?(:'aspect_ratio') self.aspect_ratio = attributes[:'aspect_ratio'] end if attributes.key?(:'playback_ids') if (value = attributes[:'playback_ids']).is_a?(Array) self.playback_ids = value end end if attributes.key?(:'tracks') if (value = attributes[:'tracks']).is_a?(Array) self.tracks = value end end if attributes.key?(:'errors') self.errors = attributes[:'errors'] end if attributes.key?(:'per_title_encode') self.per_title_encode = attributes[:'per_title_encode'] end if attributes.key?(:'upload_id') self.upload_id = attributes[:'upload_id'] end if attributes.key?(:'is_live') self.is_live = attributes[:'is_live'] end if attributes.key?(:'passthrough') self.passthrough = attributes[:'passthrough'] end if attributes.key?(:'live_stream_id') self.live_stream_id = attributes[:'live_stream_id'] end if attributes.key?(:'master') self.master = attributes[:'master'] end if attributes.key?(:'master_access') self.master_access = attributes[:'master_access'] else self.master_access = 'none' end if attributes.key?(:'mp4_support') self.mp4_support = attributes[:'mp4_support'] else self.mp4_support = 'none' end if attributes.key?(:'source_asset_id') self.source_asset_id = attributes[:'source_asset_id'] end if attributes.key?(:'normalize_audio') self.normalize_audio = attributes[:'normalize_audio'] else self.normalize_audio = false end if attributes.key?(:'static_renditions') self.static_renditions = attributes[:'static_renditions'] end if attributes.key?(:'recording_times') if (value = attributes[:'recording_times']).is_a?(Array) self.recording_times = value end end if attributes.key?(:'non_standard_input_reasons') self.non_standard_input_reasons = attributes[:'non_standard_input_reasons'] end if attributes.key?(:'test') self.test = attributes[:'test'] end if attributes.key?(:'ingest_type') self.ingest_type = attributes[:'ingest_type'] end end |
Instance Attribute Details
#aspect_ratio ⇒ Object
The aspect ratio of the asset in the form of ‘width:height`, for example `16:9`.
49 50 51 |
# File 'lib/mux_ruby/models/asset.rb', line 49 def aspect_ratio @aspect_ratio end |
#created_at ⇒ Object
Time the Asset was created, defined as a Unix timestamp (seconds since epoch).
22 23 24 |
# File 'lib/mux_ruby/models/asset.rb', line 22 def created_at @created_at end |
#duration ⇒ Object
The duration of the asset in seconds (max duration for a single asset is 12 hours).
28 29 30 |
# File 'lib/mux_ruby/models/asset.rb', line 28 def duration @duration end |
#encoding_tier ⇒ Object
This field is deprecated. Please use ‘video_quality` instead. The encoding tier informs the cost, quality, and available platform features for the asset. The default encoding tier for an account can be set in the Mux Dashboard. [See the video quality guide for more details.](docs.mux.com/guides/use-video-quality-levels)
40 41 42 |
# File 'lib/mux_ruby/models/asset.rb', line 40 def encoding_tier @encoding_tier end |
#errors ⇒ Object
Returns the value of attribute errors.
57 58 59 |
# File 'lib/mux_ruby/models/asset.rb', line 57 def errors @errors end |
#id ⇒ Object
Unique identifier for the Asset. Max 255 characters.
19 20 21 |
# File 'lib/mux_ruby/models/asset.rb', line 19 def id @id end |
#ingest_type ⇒ Object
The type of ingest used to create the asset.
96 97 98 |
# File 'lib/mux_ruby/models/asset.rb', line 96 def ingest_type @ingest_type end |
#is_live ⇒ Object
Indicates whether the live stream that created this asset is currently ‘active` and not in `idle` state. This is an optional parameter added when the asset is created from a live stream.
65 66 67 |
# File 'lib/mux_ruby/models/asset.rb', line 65 def is_live @is_live end |
#live_stream_id ⇒ Object
Unique identifier for the live stream. This is an optional parameter added when the asset is created from a live stream.
71 72 73 |
# File 'lib/mux_ruby/models/asset.rb', line 71 def live_stream_id @live_stream_id end |
#master ⇒ Object
Returns the value of attribute master.
73 74 75 |
# File 'lib/mux_ruby/models/asset.rb', line 73 def master @master end |
#master_access ⇒ Object
Returns the value of attribute master_access.
75 76 77 |
# File 'lib/mux_ruby/models/asset.rb', line 75 def master_access @master_access end |
#max_resolution_tier ⇒ Object
Max resolution tier can be used to control the maximum ‘resolution_tier` your asset is encoded, stored, and streamed at. If not set, this defaults to `1080p`.
37 38 39 |
# File 'lib/mux_ruby/models/asset.rb', line 37 def max_resolution_tier @max_resolution_tier end |
#max_stored_frame_rate ⇒ Object
The maximum frame rate that has been stored for the asset. The asset may be delivered at lower frame rates depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored. This field may return -1 if the frame rate of the input cannot be reliably determined.
46 47 48 |
# File 'lib/mux_ruby/models/asset.rb', line 46 def max_stored_frame_rate @max_stored_frame_rate end |
#max_stored_resolution ⇒ Object
This field is deprecated. Please use ‘resolution_tier` instead. The maximum resolution that has been stored for the asset. The asset may be delivered at lower resolutions depending on the device and bandwidth, however it cannot be delivered at a higher value than is stored.
31 32 33 |
# File 'lib/mux_ruby/models/asset.rb', line 31 def max_stored_resolution @max_stored_resolution end |
#mp4_support ⇒ Object
Returns the value of attribute mp4_support.
77 78 79 |
# File 'lib/mux_ruby/models/asset.rb', line 77 def mp4_support @mp4_support end |
#non_standard_input_reasons ⇒ Object
Returns the value of attribute non_standard_input_reasons.
90 91 92 |
# File 'lib/mux_ruby/models/asset.rb', line 90 def non_standard_input_reasons @non_standard_input_reasons end |
#normalize_audio ⇒ Object
Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets.
83 84 85 |
# File 'lib/mux_ruby/models/asset.rb', line 83 def normalize_audio @normalize_audio end |
#passthrough ⇒ Object
Arbitrary user-supplied metadata set for the asset. Max 255 characters.
68 69 70 |
# File 'lib/mux_ruby/models/asset.rb', line 68 def passthrough @passthrough end |
#per_title_encode ⇒ Object
Returns the value of attribute per_title_encode.
59 60 61 |
# File 'lib/mux_ruby/models/asset.rb', line 59 def per_title_encode @per_title_encode end |
#playback_ids ⇒ Object
An array of Playback ID objects. Use these to create HLS playback URLs. See [Play your videos](docs.mux.com/guides/play-your-videos) for more details.
52 53 54 |
# File 'lib/mux_ruby/models/asset.rb', line 52 def playback_ids @playback_ids end |
#recording_times ⇒ Object
An array of individual live stream recording sessions. A recording session is created on each encoder connection during the live stream. Additionally any time slate media is inserted during brief interruptions in the live stream media or times when the live streaming software disconnects, a recording session representing the slate media will be added with a "slate" type.
88 89 90 |
# File 'lib/mux_ruby/models/asset.rb', line 88 def recording_times @recording_times end |
#resolution_tier ⇒ Object
The resolution tier that the asset was ingested at, affecting billing for ingest & storage. This field also represents the highest resolution tier that the content can be delivered at, however the actual resolution may be lower depending on the device, bandwidth, and exact resolution of the uploaded asset.
34 35 36 |
# File 'lib/mux_ruby/models/asset.rb', line 34 def resolution_tier @resolution_tier end |
#source_asset_id ⇒ Object
Asset Identifier of the video used as the source for creating the clip.
80 81 82 |
# File 'lib/mux_ruby/models/asset.rb', line 80 def source_asset_id @source_asset_id end |
#static_renditions ⇒ Object
Returns the value of attribute static_renditions.
85 86 87 |
# File 'lib/mux_ruby/models/asset.rb', line 85 def static_renditions @static_renditions end |
#status ⇒ Object
The status of the asset.
25 26 27 |
# File 'lib/mux_ruby/models/asset.rb', line 25 def status @status end |
#test ⇒ Object
True means this live stream is a test asset. A test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test assets are watermarked with the Mux logo, limited to 10 seconds, and deleted after 24 hrs.
93 94 95 |
# File 'lib/mux_ruby/models/asset.rb', line 93 def test @test end |
#tracks ⇒ Object
The individual media tracks that make up an asset.
55 56 57 |
# File 'lib/mux_ruby/models/asset.rb', line 55 def tracks @tracks end |
#upload_id ⇒ Object
Unique identifier for the Direct Upload. This is an optional parameter added when the asset is created from a direct upload.
62 63 64 |
# File 'lib/mux_ruby/models/asset.rb', line 62 def upload_id @upload_id end |
#video_quality ⇒ Object
The video quality controls the cost, quality, and available platform features for the asset. The default video quality for an account can be set in the Mux Dashboard. This field replaces the deprecated ‘encoding_tier` value. [See the video quality guide for more details.](docs.mux.com/guides/use-video-quality-levels)
43 44 45 |
# File 'lib/mux_ruby/models/asset.rb', line 43 def video_quality @video_quality end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
156 157 158 |
# File 'lib/mux_ruby/models/asset.rb', line 156 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
121 122 123 124 125 126 127 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 153 |
# File 'lib/mux_ruby/models/asset.rb', line 121 def self.attribute_map { :'id' => :'id', :'created_at' => :'created_at', :'status' => :'status', :'duration' => :'duration', :'max_stored_resolution' => :'max_stored_resolution', :'resolution_tier' => :'resolution_tier', :'max_resolution_tier' => :'max_resolution_tier', :'encoding_tier' => :'encoding_tier', :'video_quality' => :'video_quality', :'max_stored_frame_rate' => :'max_stored_frame_rate', :'aspect_ratio' => :'aspect_ratio', :'playback_ids' => :'playback_ids', :'tracks' => :'tracks', :'errors' => :'errors', :'per_title_encode' => :'per_title_encode', :'upload_id' => :'upload_id', :'is_live' => :'is_live', :'passthrough' => :'passthrough', :'live_stream_id' => :'live_stream_id', :'master' => :'master', :'master_access' => :'master_access', :'mp4_support' => :'mp4_support', :'source_asset_id' => :'source_asset_id', :'normalize_audio' => :'normalize_audio', :'static_renditions' => :'static_renditions', :'recording_times' => :'recording_times', :'non_standard_input_reasons' => :'non_standard_input_reasons', :'test' => :'test', :'ingest_type' => :'ingest_type' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
517 518 519 |
# File 'lib/mux_ruby/models/asset.rb', line 517 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
196 197 198 199 |
# File 'lib/mux_ruby/models/asset.rb', line 196 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
161 162 163 164 165 166 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 |
# File 'lib/mux_ruby/models/asset.rb', line 161 def self.openapi_types { :'id' => :'String', :'created_at' => :'String', :'status' => :'String', :'duration' => :'Float', :'max_stored_resolution' => :'String', :'resolution_tier' => :'String', :'max_resolution_tier' => :'String', :'encoding_tier' => :'String', :'video_quality' => :'String', :'max_stored_frame_rate' => :'Float', :'aspect_ratio' => :'String', :'playback_ids' => :'Array<PlaybackID>', :'tracks' => :'Array<Track>', :'errors' => :'AssetErrors', :'per_title_encode' => :'Boolean', :'upload_id' => :'String', :'is_live' => :'Boolean', :'passthrough' => :'String', :'live_stream_id' => :'String', :'master' => :'AssetMaster', :'master_access' => :'String', :'mp4_support' => :'String', :'source_asset_id' => :'String', :'normalize_audio' => :'Boolean', :'static_renditions' => :'AssetStaticRenditions', :'recording_times' => :'Array<AssetRecordingTimes>', :'non_standard_input_reasons' => :'AssetNonStandardInputReasons', :'test' => :'Boolean', :'ingest_type' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 |
# File 'lib/mux_ruby/models/asset.rb', line 468 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && created_at == o.created_at && status == o.status && duration == o.duration && max_stored_resolution == o.max_stored_resolution && resolution_tier == o.resolution_tier && max_resolution_tier == o.max_resolution_tier && encoding_tier == o.encoding_tier && video_quality == o.video_quality && max_stored_frame_rate == o.max_stored_frame_rate && aspect_ratio == o.aspect_ratio && playback_ids == o.playback_ids && tracks == o.tracks && errors == o.errors && per_title_encode == o.per_title_encode && upload_id == o.upload_id && is_live == o.is_live && passthrough == o.passthrough && live_stream_id == o.live_stream_id && master == o.master && master_access == o.master_access && mp4_support == o.mp4_support && source_asset_id == o.source_asset_id && normalize_audio == o.normalize_audio && static_renditions == o.static_renditions && recording_times == o.recording_times && non_standard_input_reasons == o.non_standard_input_reasons && test == o.test && ingest_type == o.ingest_type end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 |
# File 'lib/mux_ruby/models/asset.rb', line 547 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = MuxRuby.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
618 619 620 621 622 623 624 625 626 627 628 629 630 |
# File 'lib/mux_ruby/models/asset.rb', line 618 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 |
# File 'lib/mux_ruby/models/asset.rb', line 524 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
504 505 506 |
# File 'lib/mux_ruby/models/asset.rb', line 504 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
510 511 512 |
# File 'lib/mux_ruby/models/asset.rb', line 510 def hash [id, created_at, status, duration, max_stored_resolution, resolution_tier, max_resolution_tier, encoding_tier, video_quality, max_stored_frame_rate, aspect_ratio, playback_ids, tracks, errors, per_title_encode, upload_id, is_live, passthrough, live_stream_id, master, master_access, mp4_support, source_asset_id, normalize_audio, static_renditions, recording_times, non_standard_input_reasons, test, ingest_type].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
347 348 349 350 |
# File 'lib/mux_ruby/models/asset.rb', line 347 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
594 595 596 |
# File 'lib/mux_ruby/models/asset.rb', line 594 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
600 601 602 603 604 605 606 607 608 609 610 611 612 |
# File 'lib/mux_ruby/models/asset.rb', line 600 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
588 589 590 |
# File 'lib/mux_ruby/models/asset.rb', line 588 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
# File 'lib/mux_ruby/models/asset.rb', line 354 def valid? status_validator = EnumAttributeValidator.new('String', ["preparing", "ready", "errored"]) return false unless status_validator.valid?(@status) max_stored_resolution_validator = EnumAttributeValidator.new('String', ["Audio only", "SD", "HD", "FHD", "UHD"]) return false unless max_stored_resolution_validator.valid?(@max_stored_resolution) resolution_tier_validator = EnumAttributeValidator.new('String', ["audio-only", "720p", "1080p", "1440p", "2160p"]) return false unless resolution_tier_validator.valid?(@resolution_tier) max_resolution_tier_validator = EnumAttributeValidator.new('String', ["1080p", "1440p", "2160p"]) return false unless max_resolution_tier_validator.valid?(@max_resolution_tier) encoding_tier_validator = EnumAttributeValidator.new('String', ["smart", "baseline", "premium"]) return false unless encoding_tier_validator.valid?(@encoding_tier) video_quality_validator = EnumAttributeValidator.new('String', ["basic", "plus", "premium"]) return false unless video_quality_validator.valid?(@video_quality) master_access_validator = EnumAttributeValidator.new('String', ["temporary", "none"]) return false unless master_access_validator.valid?(@master_access) mp4_support_validator = EnumAttributeValidator.new('String', ["standard", "none", "capped-1080p", "audio-only", "audio-only,capped-1080p"]) return false unless mp4_support_validator.valid?(@mp4_support) ingest_type_validator = EnumAttributeValidator.new('String', ["on_demand_url", "on_demand_direct_upload", "on_demand_clip", "live_rtmp", "live_srt"]) return false unless ingest_type_validator.valid?(@ingest_type) true end |