mux_ruby 3.13.0 → 3.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +4 -4
  4. data/docs/Asset.md +3 -1
  5. data/docs/AssetsApi.md +79 -4
  6. data/docs/CreateSimulcastTargetRequest.md +2 -2
  7. data/docs/Error.md +3 -1
  8. data/docs/GenerateTrackSubtitlesRequest.md +18 -0
  9. data/docs/GenerateTrackSubtitlesResponse.md +18 -0
  10. data/docs/InputSettings.md +1 -1
  11. data/docs/LiveStream.md +3 -1
  12. data/docs/LiveStreamsApi.md +8 -8
  13. data/docs/MonitoringBreakdownTimeseriesDatapoint.md +3 -1
  14. data/docs/PlaybackIDApi.md +4 -4
  15. data/docs/SimulcastTarget.md +6 -4
  16. data/docs/VideoView.md +7 -1
  17. data/gen/generator-config.json +1 -1
  18. data/lib/mux_ruby/api/assets_api.rb +79 -2
  19. data/lib/mux_ruby/api/live_streams_api.rb +4 -4
  20. data/lib/mux_ruby/api/metrics_api.rb +6 -6
  21. data/lib/mux_ruby/api/playback_id_api.rb +2 -2
  22. data/lib/mux_ruby/models/asset.rb +26 -4
  23. data/lib/mux_ruby/models/create_simulcast_target_request.rb +2 -2
  24. data/lib/mux_ruby/models/error.rb +16 -5
  25. data/lib/mux_ruby/models/generate_track_subtitles_request.rb +221 -0
  26. data/lib/mux_ruby/models/generate_track_subtitles_response.rb +218 -0
  27. data/lib/mux_ruby/models/input_settings.rb +1 -1
  28. data/lib/mux_ruby/models/live_stream.rb +26 -4
  29. data/lib/mux_ruby/models/monitoring_breakdown_timeseries_datapoint.rb +13 -4
  30. data/lib/mux_ruby/models/simulcast_target.rb +29 -7
  31. data/lib/mux_ruby/models/video_view.rb +31 -4
  32. data/lib/mux_ruby/version.rb +1 -1
  33. data/lib/mux_ruby.rb +2 -0
  34. data/spec/models/generate_track_subtitles_request_spec.rb +34 -0
  35. data/spec/models/generate_track_subtitles_response_spec.rb +34 -0
  36. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/byebug/byebug.so +0 -0
  37. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/gem_make.out +6 -6
  38. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.16.3/ffi_c.so +0 -0
  39. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.16.3/gem_make.out +6 -6
  40. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.16.3/mkmf.log +16 -16
  41. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.4/gem_make.out +14 -14
  42. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.4/jaro_winkler/jaro_winkler_ext.so +0 -0
  43. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-4.0.4/gem_make.out +6 -6
  44. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-4.0.4/mkmf.log +4 -4
  45. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-4.0.4/psych.so +0 -0
  46. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.2/gem_make.out +6 -6
  47. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.2/mkmf.log +2 -2
  48. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.2/stringio.so +0 -0
  49. data/vendor/bundle/ruby/3.2.0/gems/byebug-11.1.3/ext/byebug/Makefile +6 -6
  50. data/vendor/bundle/ruby/3.2.0/gems/byebug-11.1.3/lib/byebug/byebug.so +0 -0
  51. data/vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/Makefile +6 -6
  52. data/vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/lib/ffi_c.so +0 -0
  53. data/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/Makefile +6 -6
  54. data/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.4/lib/jaro_winkler/jaro_winkler_ext.so +0 -0
  55. data/vendor/bundle/ruby/3.2.0/gems/psych-4.0.4/ext/psych/Makefile +6 -6
  56. data/vendor/bundle/ruby/3.2.0/gems/psych-4.0.4/lib/psych.so +0 -0
  57. data/vendor/bundle/ruby/3.2.0/gems/stringio-3.0.2/ext/stringio/Makefile +6 -6
  58. data/vendor/bundle/ruby/3.2.0/gems/stringio-3.0.2/lib/stringio.so +0 -0
  59. data/vendor/bundle/ruby/3.2.0/specifications/ast-2.4.2.gemspec +2 -2
  60. data/vendor/bundle/ruby/3.2.0/specifications/byebug-11.1.3.gemspec +2 -2
  61. data/vendor/bundle/ruby/3.2.0/specifications/coderay-1.1.3.gemspec +2 -2
  62. data/vendor/bundle/ruby/3.2.0/specifications/diff-lcs-1.5.0.gemspec +2 -2
  63. data/vendor/bundle/ruby/3.2.0/specifications/ethon-0.16.0.gemspec +2 -2
  64. data/vendor/bundle/ruby/3.2.0/specifications/ffi-1.16.3.gemspec +2 -2
  65. data/vendor/bundle/ruby/3.2.0/specifications/jaro_winkler-1.5.4.gemspec +2 -2
  66. data/vendor/bundle/ruby/3.2.0/specifications/method_source-1.0.0.gemspec +2 -2
  67. data/vendor/bundle/ruby/3.2.0/specifications/parallel-1.22.1.gemspec +2 -2
  68. data/vendor/bundle/ruby/3.2.0/specifications/parser-3.1.2.0.gemspec +2 -2
  69. data/vendor/bundle/ruby/3.2.0/specifications/pry-0.13.1.gemspec +2 -2
  70. data/vendor/bundle/ruby/3.2.0/specifications/pry-byebug-3.9.0.gemspec +2 -2
  71. data/vendor/bundle/ruby/3.2.0/specifications/psych-4.0.4.gemspec +2 -2
  72. data/vendor/bundle/ruby/3.2.0/specifications/rainbow-3.1.1.gemspec +2 -2
  73. data/vendor/bundle/ruby/3.2.0/specifications/rake-13.0.6.gemspec +2 -2
  74. data/vendor/bundle/ruby/3.2.0/specifications/rspec-3.11.0.gemspec +2 -2
  75. data/vendor/bundle/ruby/3.2.0/specifications/rspec-core-3.11.0.gemspec +2 -2
  76. data/vendor/bundle/ruby/3.2.0/specifications/rspec-expectations-3.11.0.gemspec +2 -2
  77. data/vendor/bundle/ruby/3.2.0/specifications/rspec-mocks-3.11.1.gemspec +2 -2
  78. data/vendor/bundle/ruby/3.2.0/specifications/rspec-support-3.11.0.gemspec +2 -2
  79. data/vendor/bundle/ruby/3.2.0/specifications/rubocop-0.66.0.gemspec +2 -2
  80. data/vendor/bundle/ruby/3.2.0/specifications/ruby-progressbar-1.11.0.gemspec +2 -2
  81. data/vendor/bundle/ruby/3.2.0/specifications/solid_assert-1.1.0.gemspec +2 -2
  82. data/vendor/bundle/ruby/3.2.0/specifications/stringio-3.0.2.gemspec +2 -2
  83. data/vendor/bundle/ruby/3.2.0/specifications/typhoeus-1.4.1.gemspec +2 -2
  84. data/vendor/bundle/ruby/3.2.0/specifications/unicode-display_width-1.5.0.gemspec +2 -2
  85. metadata +158 -150
@@ -0,0 +1,218 @@
1
+ =begin
2
+ #Mux API
3
+
4
+ #Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: devex@mux.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MuxRuby
17
+ class GenerateTrackSubtitlesResponse
18
+ attr_accessor :data
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'data' => :'data'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'data' => :'Track'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::GenerateTrackSubtitlesResponse` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::GenerateTrackSubtitlesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'data')
61
+ self.data = attributes[:'data']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ data == o.data
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(o)
89
+ self == o
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Integer] Hash code
94
+ def hash
95
+ [data].hash
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ self.class.openapi_types.each_pair do |key, type|
111
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
112
+ self.send("#{key}=", nil)
113
+ elsif type =~ /\AArray<(.*)>/i
114
+ # check to ensure the input is an array given that the attribute
115
+ # is documented as an array but the input is not
116
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
117
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
118
+ end
119
+ elsif !attributes[self.class.attribute_map[key]].nil?
120
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
121
+ end
122
+ end
123
+
124
+ self
125
+ end
126
+
127
+ # Deserializes the data based on type
128
+ # @param string type Data type
129
+ # @param string value Value to be deserialized
130
+ # @return [Object] Deserialized data
131
+ def _deserialize(type, value)
132
+ case type.to_sym
133
+ when :Time
134
+ Time.parse(value)
135
+ when :Date
136
+ Date.parse(value)
137
+ when :String
138
+ value.to_s
139
+ when :Integer
140
+ value.to_i
141
+ when :Float
142
+ value.to_f
143
+ when :Boolean
144
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
+ true
146
+ else
147
+ false
148
+ end
149
+ when :Object
150
+ # generic object (usually a Hash), return directly
151
+ value
152
+ when /\AArray<(?<inner_type>.+)>\z/
153
+ inner_type = Regexp.last_match[:inner_type]
154
+ value.map { |v| _deserialize(inner_type, v) }
155
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
+ k_type = Regexp.last_match[:k_type]
157
+ v_type = Regexp.last_match[:v_type]
158
+ {}.tap do |hash|
159
+ value.each do |k, v|
160
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
+ end
162
+ end
163
+ else # model
164
+ # models (e.g. Pet) or oneOf
165
+ klass = MuxRuby.const_get(type)
166
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
167
+ end
168
+ end
169
+
170
+ # Returns the string representation of the object
171
+ # @return [String] String presentation of the object
172
+ def to_s
173
+ to_hash.to_s
174
+ end
175
+
176
+ # to_body is an alias to to_hash (backward compatibility)
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_body
179
+ to_hash
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.openapi_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ # Outputs non-array value in the form of hash
199
+ # For object, use to_hash. Otherwise, just return the value
200
+ # @param [Object] value Any valid value
201
+ # @return [Hash] Returns the value in the form of hash
202
+ def _to_hash(value)
203
+ if value.is_a?(Array)
204
+ value.compact.map { |v| _to_hash(v) }
205
+ elsif value.is_a?(Hash)
206
+ {}.tap do |hash|
207
+ value.each { |k, v| hash[k] = _to_hash(v) }
208
+ end
209
+ elsif value.respond_to? :to_hash
210
+ value.to_hash
211
+ else
212
+ value
213
+ end
214
+ end
215
+
216
+ end
217
+
218
+ end
@@ -21,7 +21,7 @@ module MuxRuby
21
21
 
22
22
  attr_accessor :overlay_settings
23
23
 
24
- # Generate subtitle tracks using automatic speech recognition using this configuration. This may only be provided for the first input object (the main input file). For direct uploads, this first input should omit the url parameter, as the main input file is provided via the direct upload. This will create subtitles based on the audio track ingested from that main input file. Note that subtitle generation happens after initial ingest, so the generated tracks will be in the `preparing` state when the asset transitions to `ready`.
24
+ # Generate subtitle tracks using automatic speech recognition with this configuration. This may only be provided for the first input object (the main input file). For direct uploads, this first input should omit the url parameter, as the main input file is provided via the direct upload. This will create subtitles based on the audio track ingested from that main input file. Note that subtitle generation happens after initial ingest, so the generated tracks will be in the `preparing` state when the asset transitions to `ready`.
25
25
  attr_accessor :generated_subtitles
26
26
 
27
27
  # The time offset in seconds from the beginning of the video indicating the clip's starting marker. The default value is 0 when not included. This parameter is only applicable for creating clips when `input.url` has `mux://assets/{asset_id}` format.
@@ -79,6 +79,9 @@ module MuxRuby
79
79
  # Unique key used for encrypting a stream to a Mux SRT endpoint.
80
80
  attr_accessor :srt_passphrase
81
81
 
82
+ # The protocol used for the active ingest stream. This is only set when the live stream is active.
83
+ attr_accessor :active_ingest_protocol
84
+
82
85
  class EnumAttributeValidator
83
86
  attr_reader :datatype
84
87
  attr_reader :allowable_values
@@ -125,7 +128,8 @@ module MuxRuby
125
128
  :'latency_mode' => :'latency_mode',
126
129
  :'test' => :'test',
127
130
  :'max_continuous_duration' => :'max_continuous_duration',
128
- :'srt_passphrase' => :'srt_passphrase'
131
+ :'srt_passphrase' => :'srt_passphrase',
132
+ :'active_ingest_protocol' => :'active_ingest_protocol'
129
133
  }
130
134
  end
131
135
 
@@ -158,7 +162,8 @@ module MuxRuby
158
162
  :'latency_mode' => :'String',
159
163
  :'test' => :'Boolean',
160
164
  :'max_continuous_duration' => :'Integer',
161
- :'srt_passphrase' => :'String'
165
+ :'srt_passphrase' => :'String',
166
+ :'active_ingest_protocol' => :'String'
162
167
  }
163
168
  end
164
169
 
@@ -286,6 +291,10 @@ module MuxRuby
286
291
  if attributes.key?(:'srt_passphrase')
287
292
  self.srt_passphrase = attributes[:'srt_passphrase']
288
293
  end
294
+
295
+ if attributes.key?(:'active_ingest_protocol')
296
+ self.active_ingest_protocol = attributes[:'active_ingest_protocol']
297
+ end
289
298
  end
290
299
 
291
300
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -320,6 +329,8 @@ module MuxRuby
320
329
  return false unless latency_mode_validator.valid?(@latency_mode)
321
330
  return false if !@max_continuous_duration.nil? && @max_continuous_duration > 43200
322
331
  return false if !@max_continuous_duration.nil? && @max_continuous_duration < 60
332
+ active_ingest_protocol_validator = EnumAttributeValidator.new('String', ["rtmp", "srt"])
333
+ return false unless active_ingest_protocol_validator.valid?(@active_ingest_protocol)
323
334
  true
324
335
  end
325
336
 
@@ -361,6 +372,16 @@ module MuxRuby
361
372
  @max_continuous_duration = max_continuous_duration
362
373
  end
363
374
 
375
+ # Custom attribute writer method checking allowed values (enum).
376
+ # @param [Object] active_ingest_protocol Object to be assigned
377
+ def active_ingest_protocol=(active_ingest_protocol)
378
+ validator = EnumAttributeValidator.new('String', ["rtmp", "srt"])
379
+ unless validator.valid?(active_ingest_protocol)
380
+ fail ArgumentError, "invalid value for \"active_ingest_protocol\", must be one of #{validator.allowable_values}."
381
+ end
382
+ @active_ingest_protocol = active_ingest_protocol
383
+ end
384
+
364
385
  # Checks equality by comparing each attribute.
365
386
  # @param [Object] Object to be compared
366
387
  def ==(o)
@@ -387,7 +408,8 @@ module MuxRuby
387
408
  latency_mode == o.latency_mode &&
388
409
  test == o.test &&
389
410
  max_continuous_duration == o.max_continuous_duration &&
390
- srt_passphrase == o.srt_passphrase
411
+ srt_passphrase == o.srt_passphrase &&
412
+ active_ingest_protocol == o.active_ingest_protocol
391
413
  end
392
414
 
393
415
  # @see the `==` method
@@ -399,7 +421,7 @@ module MuxRuby
399
421
  # Calculates hash code according to all attributes.
400
422
  # @return [Integer] Hash code
401
423
  def hash
402
- [id, created_at, stream_key, active_asset_id, recent_asset_ids, status, playback_ids, new_asset_settings, passthrough, audio_only, embedded_subtitles, generated_subtitles, reconnect_window, use_slate_for_standard_latency, reconnect_slate_url, reduced_latency, low_latency, simulcast_targets, latency_mode, test, max_continuous_duration, srt_passphrase].hash
424
+ [id, created_at, stream_key, active_asset_id, recent_asset_ids, status, playback_ids, new_asset_settings, passthrough, audio_only, embedded_subtitles, generated_subtitles, reconnect_window, use_slate_for_standard_latency, reconnect_slate_url, reduced_latency, low_latency, simulcast_targets, latency_mode, test, max_continuous_duration, srt_passphrase, active_ingest_protocol].hash
403
425
  end
404
426
 
405
427
  # Builds the object from hash
@@ -21,12 +21,15 @@ module MuxRuby
21
21
 
22
22
  attr_accessor :concurrent_viewers
23
23
 
24
+ attr_accessor :starting_up_viewers
25
+
24
26
  # Attribute mapping from ruby-style variable name to JSON key.
25
27
  def self.attribute_map
26
28
  {
27
29
  :'value' => :'value',
28
30
  :'metric_value' => :'metric_value',
29
- :'concurrent_viewers' => :'concurrent_viewers'
31
+ :'concurrent_viewers' => :'concurrent_viewers',
32
+ :'starting_up_viewers' => :'starting_up_viewers'
30
33
  }
31
34
  end
32
35
 
@@ -40,7 +43,8 @@ module MuxRuby
40
43
  {
41
44
  :'value' => :'String',
42
45
  :'metric_value' => :'Float',
43
- :'concurrent_viewers' => :'Integer'
46
+ :'concurrent_viewers' => :'Integer',
47
+ :'starting_up_viewers' => :'Integer'
44
48
  }
45
49
  end
46
50
 
@@ -78,6 +82,10 @@ module MuxRuby
78
82
  if attributes.key?(:'concurrent_viewers')
79
83
  self.concurrent_viewers = attributes[:'concurrent_viewers']
80
84
  end
85
+
86
+ if attributes.key?(:'starting_up_viewers')
87
+ self.starting_up_viewers = attributes[:'starting_up_viewers']
88
+ end
81
89
  end
82
90
 
83
91
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -100,7 +108,8 @@ module MuxRuby
100
108
  self.class == o.class &&
101
109
  value == o.value &&
102
110
  metric_value == o.metric_value &&
103
- concurrent_viewers == o.concurrent_viewers
111
+ concurrent_viewers == o.concurrent_viewers &&
112
+ starting_up_viewers == o.starting_up_viewers
104
113
  end
105
114
 
106
115
  # @see the `==` method
@@ -112,7 +121,7 @@ module MuxRuby
112
121
  # Calculates hash code according to all attributes.
113
122
  # @return [Integer] Hash code
114
123
  def hash
115
- [value, metric_value, concurrent_viewers].hash
124
+ [value, metric_value, concurrent_viewers, starting_up_viewers].hash
116
125
  end
117
126
 
118
127
  # Builds the object from hash
@@ -21,15 +21,18 @@ module MuxRuby
21
21
  # Arbitrary user-supplied metadata set when creating a simulcast target.
22
22
  attr_accessor :passthrough
23
23
 
24
- # The current status of the simulcast target. See Statuses below for detailed description. * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state. * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state. * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service. * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. Compared to other errored statuses in the Mux Video API, a simulcast may transition back into the broadcasting state if a connection with the service can be re-established.
24
+ # The current status of the simulcast target. See Statuses below for detailed description. * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state. * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state. * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service. * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. When a simulcast target has this status it will have an `error_severity` field with more details about the error.
25
25
  attr_accessor :status
26
26
 
27
- # Stream Key represents an stream identifier for the third party live streaming service to simulcast the parent live stream too.
27
+ # Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. Only used for RTMP(s) simulcast destinations.
28
28
  attr_accessor :stream_key
29
29
 
30
- # RTMP hostname including the application name for the third party live streaming service.
30
+ # The RTMP(s) or SRT endpoint for a simulcast destination. * For RTMP(s) destinations, this should include the application name for the third party live streaming service, for example: `rtmp://live.example.com/app`. * For SRT destinations, this should be a fully formed SRT connection string, for example: `srt://srt-live.example.com:1234?streamid={stream_key}&passphrase={srt_passphrase}`. Note: SRT simulcast targets can only be used when an source is connected over SRT.
31
31
  attr_accessor :url
32
32
 
33
+ # The severity of the error encountered by the simulcast target. This field is only set when the simulcast target is in the `errored` status. See the values of severities below and their descriptions. * `normal`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. A simulcast may transition back into the broadcasting state if a connection with the service can be re-established. * `fatal`: The simulcast target is incompatible with the current input to the parent live stream. No further attempts to this simulcast target will be made for the current live stream asset.
34
+ attr_accessor :error_severity
35
+
33
36
  class EnumAttributeValidator
34
37
  attr_reader :datatype
35
38
  attr_reader :allowable_values
@@ -59,7 +62,8 @@ module MuxRuby
59
62
  :'passthrough' => :'passthrough',
60
63
  :'status' => :'status',
61
64
  :'stream_key' => :'stream_key',
62
- :'url' => :'url'
65
+ :'url' => :'url',
66
+ :'error_severity' => :'error_severity'
63
67
  }
64
68
  end
65
69
 
@@ -75,7 +79,8 @@ module MuxRuby
75
79
  :'passthrough' => :'String',
76
80
  :'status' => :'String',
77
81
  :'stream_key' => :'String',
78
- :'url' => :'String'
82
+ :'url' => :'String',
83
+ :'error_severity' => :'String'
79
84
  }
80
85
  end
81
86
 
@@ -119,6 +124,10 @@ module MuxRuby
119
124
  if attributes.key?(:'url')
120
125
  self.url = attributes[:'url']
121
126
  end
127
+
128
+ if attributes.key?(:'error_severity')
129
+ self.error_severity = attributes[:'error_severity']
130
+ end
122
131
  end
123
132
 
124
133
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -133,6 +142,8 @@ module MuxRuby
133
142
  def valid?
134
143
  status_validator = EnumAttributeValidator.new('String', ["idle", "starting", "broadcasting", "errored"])
135
144
  return false unless status_validator.valid?(@status)
145
+ error_severity_validator = EnumAttributeValidator.new('String', ["normal", "fatal"])
146
+ return false unless error_severity_validator.valid?(@error_severity)
136
147
  true
137
148
  end
138
149
 
@@ -146,6 +157,16 @@ module MuxRuby
146
157
  @status = status
147
158
  end
148
159
 
160
+ # Custom attribute writer method checking allowed values (enum).
161
+ # @param [Object] error_severity Object to be assigned
162
+ def error_severity=(error_severity)
163
+ validator = EnumAttributeValidator.new('String', ["normal", "fatal"])
164
+ unless validator.valid?(error_severity)
165
+ fail ArgumentError, "invalid value for \"error_severity\", must be one of #{validator.allowable_values}."
166
+ end
167
+ @error_severity = error_severity
168
+ end
169
+
149
170
  # Checks equality by comparing each attribute.
150
171
  # @param [Object] Object to be compared
151
172
  def ==(o)
@@ -155,7 +176,8 @@ module MuxRuby
155
176
  passthrough == o.passthrough &&
156
177
  status == o.status &&
157
178
  stream_key == o.stream_key &&
158
- url == o.url
179
+ url == o.url &&
180
+ error_severity == o.error_severity
159
181
  end
160
182
 
161
183
  # @see the `==` method
@@ -167,7 +189,7 @@ module MuxRuby
167
189
  # Calculates hash code according to all attributes.
168
190
  # @return [Integer] Hash code
169
191
  def hash
170
- [id, passthrough, status, stream_key, url].hash
192
+ [id, passthrough, status, stream_key, url, error_severity].hash
171
193
  end
172
194
 
173
195
  # Builds the object from hash
@@ -323,6 +323,12 @@ module MuxRuby
323
323
 
324
324
  attr_accessor :long_rebuffering
325
325
 
326
+ attr_accessor :playback_failure_error_type_id
327
+
328
+ attr_accessor :playback_business_exception_error_type_id
329
+
330
+ attr_accessor :video_startup_business_exception_error_type_id
331
+
326
332
  # Attribute mapping from ruby-style variable name to JSON key.
327
333
  def self.attribute_map
328
334
  {
@@ -479,7 +485,10 @@ module MuxRuby
479
485
  :'ad_exit_before_start_count' => :'ad_exit_before_start_count',
480
486
  :'ad_exit_before_start_percentage' => :'ad_exit_before_start_percentage',
481
487
  :'long_resume' => :'long_resume',
482
- :'long_rebuffering' => :'long_rebuffering'
488
+ :'long_rebuffering' => :'long_rebuffering',
489
+ :'playback_failure_error_type_id' => :'playback_failure_error_type_id',
490
+ :'playback_business_exception_error_type_id' => :'playback_business_exception_error_type_id',
491
+ :'video_startup_business_exception_error_type_id' => :'video_startup_business_exception_error_type_id'
483
492
  }
484
493
  end
485
494
 
@@ -644,7 +653,10 @@ module MuxRuby
644
653
  :'ad_exit_before_start_count' => :'Integer',
645
654
  :'ad_exit_before_start_percentage' => :'String',
646
655
  :'long_resume' => :'Boolean',
647
- :'long_rebuffering' => :'Boolean'
656
+ :'long_rebuffering' => :'Boolean',
657
+ :'playback_failure_error_type_id' => :'Integer',
658
+ :'playback_business_exception_error_type_id' => :'Integer',
659
+ :'video_startup_business_exception_error_type_id' => :'Integer'
648
660
  }
649
661
  end
650
662
 
@@ -1418,6 +1430,18 @@ module MuxRuby
1418
1430
  if attributes.key?(:'long_rebuffering')
1419
1431
  self.long_rebuffering = attributes[:'long_rebuffering']
1420
1432
  end
1433
+
1434
+ if attributes.key?(:'playback_failure_error_type_id')
1435
+ self.playback_failure_error_type_id = attributes[:'playback_failure_error_type_id']
1436
+ end
1437
+
1438
+ if attributes.key?(:'playback_business_exception_error_type_id')
1439
+ self.playback_business_exception_error_type_id = attributes[:'playback_business_exception_error_type_id']
1440
+ end
1441
+
1442
+ if attributes.key?(:'video_startup_business_exception_error_type_id')
1443
+ self.video_startup_business_exception_error_type_id = attributes[:'video_startup_business_exception_error_type_id']
1444
+ end
1421
1445
  end
1422
1446
 
1423
1447
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -1591,7 +1615,10 @@ module MuxRuby
1591
1615
  ad_exit_before_start_count == o.ad_exit_before_start_count &&
1592
1616
  ad_exit_before_start_percentage == o.ad_exit_before_start_percentage &&
1593
1617
  long_resume == o.long_resume &&
1594
- long_rebuffering == o.long_rebuffering
1618
+ long_rebuffering == o.long_rebuffering &&
1619
+ playback_failure_error_type_id == o.playback_failure_error_type_id &&
1620
+ playback_business_exception_error_type_id == o.playback_business_exception_error_type_id &&
1621
+ video_startup_business_exception_error_type_id == o.video_startup_business_exception_error_type_id
1595
1622
  end
1596
1623
 
1597
1624
  # @see the `==` method
@@ -1603,7 +1630,7 @@ module MuxRuby
1603
1630
  # Calculates hash code according to all attributes.
1604
1631
  # @return [Integer] Hash code
1605
1632
  def hash
1606
- [view_total_upscaling, preroll_ad_asset_hostname, player_source_domain, region, viewer_user_agent, preroll_requested, page_type, startup_score, view_seek_duration, country_name, player_source_height, longitude, buffering_count, video_duration, player_source_type, city, view_id, platform_description, video_startup_preroll_request_time, viewer_device_name, video_series, viewer_application_name, updated_at, view_total_content_playback_time, cdn, player_instance_id, video_language, player_source_width, player_error_message, player_mux_plugin_version, watched, playback_score, page_url, metro, view_max_request_latency, requests_for_first_preroll, view_total_downscaling, latitude, player_source_host_name, inserted_at, view_end, mux_embed_version, player_language, page_load_time, viewer_device_category, video_startup_preroll_load_time, player_version, watch_time, player_source_stream_type, preroll_ad_tag_hostname, viewer_device_manufacturer, rebuffering_score, experiment_name, viewer_os_version, player_preload, buffering_duration, player_view_count, player_software, player_load_time, platform_summary, video_encoding_variant, player_width, view_seek_count, viewer_experience_score, view_error_id, video_variant_name, preroll_played, viewer_application_engine, viewer_os_architecture, player_error_code, buffering_rate, events, player_name, view_start, view_average_request_throughput, video_producer, error_type_id, mux_viewer_id, video_id, continent_code, session_id, exit_before_video_start, video_content_type, viewer_os_family, player_poster, view_average_request_latency, video_variant_id, player_source_duration, player_source_url, mux_api_version, video_title, id, short_time, rebuffer_percentage, time_to_first_frame, viewer_user_id, video_stream_type, player_startup_time, viewer_application_version, view_max_downscale_percentage, view_max_upscale_percentage, country_code, used_fullscreen, isp, property_id, player_autoplay, player_height, asn, asn_name, quality_score, player_software_version, player_mux_plugin_name, sub_property_id, player_remote_played, view_max_playhead_position, view_playing_time, view_session_id, viewer_connection_type, viewer_device_model, weighted_average_bitrate, custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10, live_stream_latency, asset_id, environment_id, live_stream_id, mux_embed, playback_id, player_error_context, view_drm_type, view_dropped_frame_count, view_has_ad, video_startup_failure, ad_attempt_count, ad_break_count, ad_break_error_count, ad_break_error_percentage, ad_error_count, ad_error_percentage, ad_impression_count, ad_startup_error_count, ad_startup_error_percentage, ad_exit_before_start_count, ad_exit_before_start_percentage, long_resume, long_rebuffering].hash
1633
+ [view_total_upscaling, preroll_ad_asset_hostname, player_source_domain, region, viewer_user_agent, preroll_requested, page_type, startup_score, view_seek_duration, country_name, player_source_height, longitude, buffering_count, video_duration, player_source_type, city, view_id, platform_description, video_startup_preroll_request_time, viewer_device_name, video_series, viewer_application_name, updated_at, view_total_content_playback_time, cdn, player_instance_id, video_language, player_source_width, player_error_message, player_mux_plugin_version, watched, playback_score, page_url, metro, view_max_request_latency, requests_for_first_preroll, view_total_downscaling, latitude, player_source_host_name, inserted_at, view_end, mux_embed_version, player_language, page_load_time, viewer_device_category, video_startup_preroll_load_time, player_version, watch_time, player_source_stream_type, preroll_ad_tag_hostname, viewer_device_manufacturer, rebuffering_score, experiment_name, viewer_os_version, player_preload, buffering_duration, player_view_count, player_software, player_load_time, platform_summary, video_encoding_variant, player_width, view_seek_count, viewer_experience_score, view_error_id, video_variant_name, preroll_played, viewer_application_engine, viewer_os_architecture, player_error_code, buffering_rate, events, player_name, view_start, view_average_request_throughput, video_producer, error_type_id, mux_viewer_id, video_id, continent_code, session_id, exit_before_video_start, video_content_type, viewer_os_family, player_poster, view_average_request_latency, video_variant_id, player_source_duration, player_source_url, mux_api_version, video_title, id, short_time, rebuffer_percentage, time_to_first_frame, viewer_user_id, video_stream_type, player_startup_time, viewer_application_version, view_max_downscale_percentage, view_max_upscale_percentage, country_code, used_fullscreen, isp, property_id, player_autoplay, player_height, asn, asn_name, quality_score, player_software_version, player_mux_plugin_name, sub_property_id, player_remote_played, view_max_playhead_position, view_playing_time, view_session_id, viewer_connection_type, viewer_device_model, weighted_average_bitrate, custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10, live_stream_latency, asset_id, environment_id, live_stream_id, mux_embed, playback_id, player_error_context, view_drm_type, view_dropped_frame_count, view_has_ad, video_startup_failure, ad_attempt_count, ad_break_count, ad_break_error_count, ad_break_error_percentage, ad_error_count, ad_error_percentage, ad_impression_count, ad_startup_error_count, ad_startup_error_percentage, ad_exit_before_start_count, ad_exit_before_start_percentage, long_resume, long_rebuffering, playback_failure_error_type_id, playback_business_exception_error_type_id, video_startup_business_exception_error_type_id].hash
1607
1634
  end
1608
1635
 
1609
1636
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.0.1
11
11
  =end
12
12
 
13
13
  module MuxRuby
14
- VERSION = '3.13.0'
14
+ VERSION = '3.14.0'
15
15
  end
data/lib/mux_ruby.rb CHANGED
@@ -55,6 +55,8 @@ require 'mux_ruby/models/error'
55
55
  require 'mux_ruby/models/export_date'
56
56
  require 'mux_ruby/models/export_file'
57
57
  require 'mux_ruby/models/filter_value'
58
+ require 'mux_ruby/models/generate_track_subtitles_request'
59
+ require 'mux_ruby/models/generate_track_subtitles_response'
58
60
  require 'mux_ruby/models/get_asset_input_info_response'
59
61
  require 'mux_ruby/models/get_asset_or_live_stream_id_response'
60
62
  require 'mux_ruby/models/get_asset_or_live_stream_id_response_data'
@@ -0,0 +1,34 @@
1
+ =begin
2
+ #Mux API
3
+
4
+ #Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: devex@mux.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for MuxRuby::GenerateTrackSubtitlesRequest
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe MuxRuby::GenerateTrackSubtitlesRequest do
21
+ let(:instance) { MuxRuby::GenerateTrackSubtitlesRequest.new }
22
+
23
+ describe 'test an instance of GenerateTrackSubtitlesRequest' do
24
+ it 'should create an instance of GenerateTrackSubtitlesRequest' do
25
+ expect(instance).to be_instance_of(MuxRuby::GenerateTrackSubtitlesRequest)
26
+ end
27
+ end
28
+ describe 'test attribute "generated_subtitles"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ end
@@ -0,0 +1,34 @@
1
+ =begin
2
+ #Mux API
3
+
4
+ #Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: devex@mux.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for MuxRuby::GenerateTrackSubtitlesResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe MuxRuby::GenerateTrackSubtitlesResponse do
21
+ let(:instance) { MuxRuby::GenerateTrackSubtitlesResponse.new }
22
+
23
+ describe 'test an instance of GenerateTrackSubtitlesResponse' do
24
+ it 'should create an instance of GenerateTrackSubtitlesResponse' do
25
+ expect(instance).to be_instance_of(MuxRuby::GenerateTrackSubtitlesResponse)
26
+ end
27
+ end
28
+ describe 'test attribute "data"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ end