mux_ruby 3.8.0 → 3.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/CODEOWNERS +1 -1
  3. data/Gemfile.lock +2 -2
  4. data/README.md +4 -4
  5. data/docs/Asset.md +7 -1
  6. data/docs/AssetGeneratedSubtitleSettings.md +22 -0
  7. data/docs/AssetNonStandardInputReasons.md +3 -1
  8. data/docs/AssetsApi.md +1 -1
  9. data/docs/CreateAssetRequest.md +5 -1
  10. data/docs/CreateLiveStreamRequest.md +3 -3
  11. data/docs/CreateTrackRequest.md +2 -2
  12. data/docs/DeliveryReport.md +5 -1
  13. data/docs/DeliveryReportDeliveredSecondsByResolution.md +26 -0
  14. data/docs/DirectUploadsApi.md +1 -1
  15. data/docs/GetMonitoringBreakdownTimeseriesResponse.md +22 -0
  16. data/docs/InputSettings.md +7 -5
  17. data/docs/LiveStream.md +4 -4
  18. data/docs/MetricsApi.md +2 -2
  19. data/docs/MonitoringApi.md +93 -6
  20. data/docs/MonitoringBreakdownTimeseriesDatapoint.md +22 -0
  21. data/docs/MonitoringBreakdownTimeseriesValues.md +20 -0
  22. data/docs/RealTimeApi.md +8 -6
  23. data/docs/SigningKeysApi.md +291 -0
  24. data/docs/Track.md +4 -4
  25. data/docs/URLSigningKeysApi.md +4 -4
  26. data/docs/UpdateLiveStreamRequest.md +1 -1
  27. data/docs/VideoView.md +33 -1
  28. data/examples/video/exercise-signing-keys.rb +5 -4
  29. data/gen/generator-config.json +1 -1
  30. data/gen/package.json +1 -1
  31. data/gen/yarn.lock +411 -318
  32. data/lib/mux_ruby/api/assets_api.rb +2 -2
  33. data/lib/mux_ruby/api/direct_uploads_api.rb +2 -2
  34. data/lib/mux_ruby/api/metrics_api.rb +9 -9
  35. data/lib/mux_ruby/api/monitoring_api.rb +110 -9
  36. data/lib/mux_ruby/api/real_time_api.rb +9 -6
  37. data/lib/mux_ruby/api/signing_keys_api.rb +266 -0
  38. data/lib/mux_ruby/api/url_signing_keys_api.rb +8 -8
  39. data/lib/mux_ruby/models/asset.rb +68 -2
  40. data/lib/mux_ruby/models/asset_generated_subtitle_settings.rb +275 -0
  41. data/lib/mux_ruby/models/asset_non_standard_input_reasons.rb +14 -4
  42. data/lib/mux_ruby/models/broadcast_layout.rb +1 -0
  43. data/lib/mux_ruby/models/create_asset_request.rb +48 -4
  44. data/lib/mux_ruby/models/create_live_stream_request.rb +3 -3
  45. data/lib/mux_ruby/models/create_track_request.rb +4 -3
  46. data/lib/mux_ruby/models/delivery_report.rb +35 -4
  47. data/lib/mux_ruby/models/delivery_report_delivered_seconds_by_resolution.rb +260 -0
  48. data/lib/mux_ruby/models/get_monitoring_breakdown_timeseries_response.rb +240 -0
  49. data/lib/mux_ruby/models/input_settings.rb +18 -6
  50. data/lib/mux_ruby/models/live_stream.rb +4 -4
  51. data/lib/mux_ruby/models/live_stream_embedded_subtitle_settings.rb +2 -2
  52. data/lib/mux_ruby/models/monitoring_breakdown_timeseries_datapoint.rb +236 -0
  53. data/lib/mux_ruby/models/monitoring_breakdown_timeseries_values.rb +229 -0
  54. data/lib/mux_ruby/models/track.rb +6 -6
  55. data/lib/mux_ruby/models/update_live_stream_request.rb +1 -1
  56. data/lib/mux_ruby/models/video_view.rb +162 -5
  57. data/lib/mux_ruby/version.rb +1 -1
  58. data/lib/mux_ruby.rb +6 -0
  59. data/spec/api/signing_keys_api_spec.rb +83 -0
  60. data/spec/models/asset_generated_subtitle_settings_spec.rb +50 -0
  61. data/spec/models/delivery_report_delivered_seconds_by_resolution_spec.rb +46 -0
  62. data/spec/models/get_monitoring_breakdown_timeseries_response_spec.rb +46 -0
  63. data/spec/models/monitoring_breakdown_timeseries_datapoint_spec.rb +46 -0
  64. data/spec/models/monitoring_breakdown_timeseries_values_spec.rb +40 -0
  65. data/test.sh +2 -2
  66. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/byebug/byebug.so +0 -0
  67. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/gem_make.out +6 -6
  68. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.15.5/ffi_c.so +0 -0
  69. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.15.5/gem_make.out +6 -6
  70. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.15.5/mkmf.log +15 -15
  71. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.4/gem_make.out +14 -14
  72. 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
  73. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-4.0.4/gem_make.out +6 -6
  74. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-4.0.4/mkmf.log +4 -4
  75. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-4.0.4/psych.so +0 -0
  76. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.2/gem_make.out +6 -6
  77. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.2/mkmf.log +2 -2
  78. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.2/stringio.so +0 -0
  79. data/vendor/bundle/ruby/3.2.0/gems/byebug-11.1.3/ext/byebug/Makefile +6 -6
  80. data/vendor/bundle/ruby/3.2.0/gems/byebug-11.1.3/lib/byebug/byebug.so +0 -0
  81. data/vendor/bundle/ruby/3.2.0/gems/ffi-1.15.5/ext/ffi_c/Makefile +6 -6
  82. data/vendor/bundle/ruby/3.2.0/gems/ffi-1.15.5/lib/ffi_c.so +0 -0
  83. data/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/Makefile +6 -6
  84. data/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.4/lib/jaro_winkler/jaro_winkler_ext.so +0 -0
  85. data/vendor/bundle/ruby/3.2.0/gems/psych-4.0.4/ext/psych/Makefile +6 -6
  86. data/vendor/bundle/ruby/3.2.0/gems/psych-4.0.4/lib/psych.so +0 -0
  87. data/vendor/bundle/ruby/3.2.0/gems/stringio-3.0.2/ext/stringio/Makefile +6 -6
  88. data/vendor/bundle/ruby/3.2.0/gems/stringio-3.0.2/lib/stringio.so +0 -0
  89. data/vendor/bundle/ruby/3.2.0/specifications/ast-2.4.2.gemspec +2 -2
  90. data/vendor/bundle/ruby/3.2.0/specifications/byebug-11.1.3.gemspec +2 -2
  91. data/vendor/bundle/ruby/3.2.0/specifications/coderay-1.1.3.gemspec +2 -2
  92. data/vendor/bundle/ruby/3.2.0/specifications/diff-lcs-1.5.0.gemspec +2 -2
  93. data/vendor/bundle/ruby/3.2.0/specifications/ethon-0.16.0.gemspec +2 -2
  94. data/vendor/bundle/ruby/3.2.0/specifications/ffi-1.15.5.gemspec +2 -2
  95. data/vendor/bundle/ruby/3.2.0/specifications/jaro_winkler-1.5.4.gemspec +2 -2
  96. data/vendor/bundle/ruby/3.2.0/specifications/method_source-1.0.0.gemspec +2 -2
  97. data/vendor/bundle/ruby/3.2.0/specifications/parallel-1.22.1.gemspec +2 -2
  98. data/vendor/bundle/ruby/3.2.0/specifications/parser-3.1.2.0.gemspec +2 -2
  99. data/vendor/bundle/ruby/3.2.0/specifications/pry-0.13.1.gemspec +2 -2
  100. data/vendor/bundle/ruby/3.2.0/specifications/pry-byebug-3.9.0.gemspec +2 -2
  101. data/vendor/bundle/ruby/3.2.0/specifications/psych-4.0.4.gemspec +2 -2
  102. data/vendor/bundle/ruby/3.2.0/specifications/rainbow-3.1.1.gemspec +2 -2
  103. data/vendor/bundle/ruby/3.2.0/specifications/rake-13.0.6.gemspec +2 -2
  104. data/vendor/bundle/ruby/3.2.0/specifications/rspec-3.11.0.gemspec +2 -2
  105. data/vendor/bundle/ruby/3.2.0/specifications/rspec-core-3.11.0.gemspec +2 -2
  106. data/vendor/bundle/ruby/3.2.0/specifications/rspec-expectations-3.11.0.gemspec +2 -2
  107. data/vendor/bundle/ruby/3.2.0/specifications/rspec-mocks-3.11.1.gemspec +2 -2
  108. data/vendor/bundle/ruby/3.2.0/specifications/rspec-support-3.11.0.gemspec +2 -2
  109. data/vendor/bundle/ruby/3.2.0/specifications/rubocop-0.66.0.gemspec +2 -2
  110. data/vendor/bundle/ruby/3.2.0/specifications/ruby-progressbar-1.11.0.gemspec +2 -2
  111. data/vendor/bundle/ruby/3.2.0/specifications/solid_assert-1.1.0.gemspec +2 -2
  112. data/vendor/bundle/ruby/3.2.0/specifications/stringio-3.0.2.gemspec +2 -2
  113. data/vendor/bundle/ruby/3.2.0/specifications/typhoeus-1.4.0.gemspec +2 -2
  114. data/vendor/bundle/ruby/3.2.0/specifications/unicode-display_width-1.5.0.gemspec +2 -2
  115. metadata +164 -140
@@ -0,0 +1,260 @@
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
+ # Seconds delivered broken into resolution tiers. Each tier will only be displayed if there was content delivered in the tier.
18
+ class DeliveryReportDeliveredSecondsByResolution
19
+ # Total number of delivered seconds during this time window that had a resolution larger than the 1440p tier (over 4,194,304 pixels total).
20
+ attr_accessor :tier_2160p
21
+
22
+ # Total number of delivered seconds during this time window that had a resolution larger than the 1080p tier but less than or equal to the 2160p tier (over 2,073,600 and <= 4,194,304 pixels total).
23
+ attr_accessor :tier_1440p
24
+
25
+ # Total number of delivered seconds during this time window that had a resolution larger than the 720p tier but less than or equal to the 1440p tier (over 921,600 and <= 2,073,600 pixels total).
26
+ attr_accessor :tier_1080p
27
+
28
+ # Total number of delivered seconds during this time window that had a resolution within the 720p tier (up to 921,600 pixels total, based on typical 1280x720).
29
+ attr_accessor :tier_720p
30
+
31
+ # Total number of delivered seconds during this time window that had a resolution of audio only.
32
+ attr_accessor :tier_audio_only
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'tier_2160p' => :'tier_2160p',
38
+ :'tier_1440p' => :'tier_1440p',
39
+ :'tier_1080p' => :'tier_1080p',
40
+ :'tier_720p' => :'tier_720p',
41
+ :'tier_audio_only' => :'tier_audio_only'
42
+ }
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'tier_2160p' => :'Float',
54
+ :'tier_1440p' => :'Float',
55
+ :'tier_1080p' => :'Float',
56
+ :'tier_720p' => :'Float',
57
+ :'tier_audio_only' => :'Float'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ ])
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::DeliveryReportDeliveredSecondsByResolution` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!self.class.attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::DeliveryReportDeliveredSecondsByResolution`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'tier_2160p')
83
+ self.tier_2160p = attributes[:'tier_2160p']
84
+ end
85
+
86
+ if attributes.key?(:'tier_1440p')
87
+ self.tier_1440p = attributes[:'tier_1440p']
88
+ end
89
+
90
+ if attributes.key?(:'tier_1080p')
91
+ self.tier_1080p = attributes[:'tier_1080p']
92
+ end
93
+
94
+ if attributes.key?(:'tier_720p')
95
+ self.tier_720p = attributes[:'tier_720p']
96
+ end
97
+
98
+ if attributes.key?(:'tier_audio_only')
99
+ self.tier_audio_only = attributes[:'tier_audio_only']
100
+ end
101
+ end
102
+
103
+ # Show invalid properties with the reasons. Usually used together with valid?
104
+ # @return Array for valid properties with the reasons
105
+ def list_invalid_properties
106
+ invalid_properties = Array.new
107
+ invalid_properties
108
+ end
109
+
110
+ # Check to see if the all the properties in the model are valid
111
+ # @return true if the model is valid
112
+ def valid?
113
+ true
114
+ end
115
+
116
+ # Checks equality by comparing each attribute.
117
+ # @param [Object] Object to be compared
118
+ def ==(o)
119
+ return true if self.equal?(o)
120
+ self.class == o.class &&
121
+ tier_2160p == o.tier_2160p &&
122
+ tier_1440p == o.tier_1440p &&
123
+ tier_1080p == o.tier_1080p &&
124
+ tier_720p == o.tier_720p &&
125
+ tier_audio_only == o.tier_audio_only
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Integer] Hash code
136
+ def hash
137
+ [tier_2160p, tier_1440p, tier_1080p, tier_720p, tier_audio_only].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def self.build_from_hash(attributes)
144
+ new.build_from_hash(attributes)
145
+ end
146
+
147
+ # Builds the object from hash
148
+ # @param [Hash] attributes Model attributes in the form of hash
149
+ # @return [Object] Returns the model itself
150
+ def build_from_hash(attributes)
151
+ return nil unless attributes.is_a?(Hash)
152
+ self.class.openapi_types.each_pair do |key, type|
153
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
154
+ self.send("#{key}=", nil)
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
159
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
160
+ end
161
+ elsif !attributes[self.class.attribute_map[key]].nil?
162
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
163
+ end
164
+ end
165
+
166
+ self
167
+ end
168
+
169
+ # Deserializes the data based on type
170
+ # @param string type Data type
171
+ # @param string value Value to be deserialized
172
+ # @return [Object] Deserialized data
173
+ def _deserialize(type, value)
174
+ case type.to_sym
175
+ when :Time
176
+ Time.parse(value)
177
+ when :Date
178
+ Date.parse(value)
179
+ when :String
180
+ value.to_s
181
+ when :Integer
182
+ value.to_i
183
+ when :Float
184
+ value.to_f
185
+ when :Boolean
186
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
187
+ true
188
+ else
189
+ false
190
+ end
191
+ when :Object
192
+ # generic object (usually a Hash), return directly
193
+ value
194
+ when /\AArray<(?<inner_type>.+)>\z/
195
+ inner_type = Regexp.last_match[:inner_type]
196
+ value.map { |v| _deserialize(inner_type, v) }
197
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
198
+ k_type = Regexp.last_match[:k_type]
199
+ v_type = Regexp.last_match[:v_type]
200
+ {}.tap do |hash|
201
+ value.each do |k, v|
202
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
203
+ end
204
+ end
205
+ else # model
206
+ # models (e.g. Pet) or oneOf
207
+ klass = MuxRuby.const_get(type)
208
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
209
+ end
210
+ end
211
+
212
+ # Returns the string representation of the object
213
+ # @return [String] String presentation of the object
214
+ def to_s
215
+ to_hash.to_s
216
+ end
217
+
218
+ # to_body is an alias to to_hash (backward compatibility)
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_body
221
+ to_hash
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ self.class.attribute_map.each_pair do |attr, param|
229
+ value = self.send(attr)
230
+ if value.nil?
231
+ is_nullable = self.class.openapi_nullable.include?(attr)
232
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
233
+ end
234
+
235
+ hash[param] = _to_hash(value)
236
+ end
237
+ hash
238
+ end
239
+
240
+ # Outputs non-array value in the form of hash
241
+ # For object, use to_hash. Otherwise, just return the value
242
+ # @param [Object] value Any valid value
243
+ # @return [Hash] Returns the value in the form of hash
244
+ def _to_hash(value)
245
+ if value.is_a?(Array)
246
+ value.compact.map { |v| _to_hash(v) }
247
+ elsif value.is_a?(Hash)
248
+ {}.tap do |hash|
249
+ value.each { |k, v| hash[k] = _to_hash(v) }
250
+ end
251
+ elsif value.respond_to? :to_hash
252
+ value.to_hash
253
+ else
254
+ value
255
+ end
256
+ end
257
+
258
+ end
259
+
260
+ end
@@ -0,0 +1,240 @@
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 GetMonitoringBreakdownTimeseriesResponse
18
+ attr_accessor :data
19
+
20
+ attr_accessor :total_row_count
21
+
22
+ attr_accessor :timeframe
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'data' => :'data',
28
+ :'total_row_count' => :'total_row_count',
29
+ :'timeframe' => :'timeframe'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'data' => :'Array<MonitoringBreakdownTimeseriesValues>',
42
+ :'total_row_count' => :'Integer',
43
+ :'timeframe' => :'Array<Integer>'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::GetMonitoringBreakdownTimeseriesResponse` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::GetMonitoringBreakdownTimeseriesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'data')
69
+ if (value = attributes[:'data']).is_a?(Array)
70
+ self.data = value
71
+ end
72
+ end
73
+
74
+ if attributes.key?(:'total_row_count')
75
+ self.total_row_count = attributes[:'total_row_count']
76
+ end
77
+
78
+ if attributes.key?(:'timeframe')
79
+ if (value = attributes[:'timeframe']).is_a?(Array)
80
+ self.timeframe = value
81
+ end
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ invalid_properties = Array.new
89
+ invalid_properties
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ def valid?
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ data == o.data &&
104
+ total_row_count == o.total_row_count &&
105
+ timeframe == o.timeframe
106
+ end
107
+
108
+ # @see the `==` method
109
+ # @param [Object] Object to be compared
110
+ def eql?(o)
111
+ self == o
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Integer] Hash code
116
+ def hash
117
+ [data, total_row_count, timeframe].hash
118
+ end
119
+
120
+ # Builds the object from hash
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ # @return [Object] Returns the model itself
123
+ def self.build_from_hash(attributes)
124
+ new.build_from_hash(attributes)
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ self.class.openapi_types.each_pair do |key, type|
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = MuxRuby.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end
@@ -16,11 +16,14 @@ require 'time'
16
16
  module MuxRuby
17
17
  # An array of objects that each describe an input file to be used to create the asset. As a shortcut, `input` can also be a string URL for a file when only one input file is used. See `input[].url` for requirements.
18
18
  class InputSettings
19
- # The URL of the file that Mux should download and use. * For subtitles text tracks, the URL is the location of subtitle/captions file. Mux supports [SubRip Text (SRT)](https://en.wikipedia.org/wiki/SubRip) and [Web Video Text Tracks](https://www.w3.org/TR/webvtt1/) format for ingesting Subtitles and Closed Captions. * For Watermarking or Overlay, the URL is the location of the watermark image. * When creating clips from existing Mux assets, the URL is defined with `mux://assets/{asset_id}` template where `asset_id` is the Asset Identifier for creating the clip from.
19
+ # The URL of the file that Mux should download and use. * For the main input file, this should be the URL to the muxed file for Mux to download, for example an MP4, MOV, MKV, or TS file. Mux supports most audio/video file formats and codecs, but for fastest processing, you should [use standard inputs wherever possible](https://docs.mux.com/guides/video/minimize-processing-time). * For `audio` tracks, the URL is the location of the audio file for Mux to download, for example an M4A, WAV, or MP3 file. Mux supports most audio file formats and codecs, but for fastest processing, you should [use standard inputs wherever possible](https://docs.mux.com/guides/video/minimize-processing-time). * For `text` tracks, the URL is the location of subtitle/captions file. Mux supports [SubRip Text (SRT)](https://en.wikipedia.org/wiki/SubRip) and [Web Video Text Tracks](https://www.w3.org/TR/webvtt1/) formats for ingesting Subtitles and Closed Captions. * For Watermarking or Overlay, the URL is the location of the watermark image. * When creating clips from existing Mux assets, the URL is defined with `mux://assets/{asset_id}` template where `asset_id` is the Asset Identifier for creating the clip from. The url property may be omitted on the first input object when providing asset settings for LiveStream and Upload objects, in order to configure settings related to the primary (live stream or direct upload) input.
20
20
  attr_accessor :url
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`.
25
+ attr_accessor :generated_subtitles
26
+
24
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.
25
28
  attr_accessor :start_time
26
29
 
@@ -33,16 +36,16 @@ module MuxRuby
33
36
  # Type of text track. This parameter only supports subtitles value. For more information on Subtitles / Closed Captions, [see this blog post](https://mux.com/blog/subtitles-captions-webvtt-hls-and-those-magic-flags/). This parameter is required for `text` type tracks.
34
37
  attr_accessor :text_type
35
38
 
36
- # The language code value must be a valid [BCP 47](https://tools.ietf.org/html/bcp47) specification compliant value. For example, en for English or en-US for the US version of English. This parameter is required for text type and subtitles text type track.
39
+ # The language code value must be a valid [BCP 47](https://tools.ietf.org/html/bcp47) specification compliant value. For example, `en` for English or `en-US` for the US version of English. This parameter is required for `text` and `audio` track types.
37
40
  attr_accessor :language_code
38
41
 
39
- # The name of the track containing a human-readable description. This value must be unique across all text type and subtitles `text` type tracks. The hls manifest will associate a subtitle text track with this value. For example, the value should be \"English\" for subtitles text track with language_code as en. This optional parameter should be used only for `text` type and subtitles `text` type tracks. If this parameter is not included, Mux will auto-populate based on the `input[].language_code` value.
42
+ # The name of the track containing a human-readable description. This value must be unique within each group of `text` or `audio` track types. The HLS manifest will associate a subtitle text track with this value. For example, the value should be \"English\" for a subtitle text track with `language_code` set to `en`. This optional parameter should be used only for `text` and `audio` type tracks. This parameter can be optionally provided for the first video input to denote the name of the muxed audio track if present. If this parameter is not included, Mux will auto-populate based on the `input[].language_code` value.
40
43
  attr_accessor :name
41
44
 
42
- # Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This optional parameter should be used for `text` type and subtitles `text` type tracks.
45
+ # Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This optional parameter should be used for tracks with `type` of `text` and `text_type` set to `subtitles`.
43
46
  attr_accessor :closed_captions
44
47
 
45
- # This optional parameter should be used for `text` type and subtitles `text` type tracks.
48
+ # This optional parameter should be used tracks with `type` of `text` and `text_type` set to `subtitles`.
46
49
  attr_accessor :passthrough
47
50
 
48
51
  class EnumAttributeValidator
@@ -72,6 +75,7 @@ module MuxRuby
72
75
  {
73
76
  :'url' => :'url',
74
77
  :'overlay_settings' => :'overlay_settings',
78
+ :'generated_subtitles' => :'generated_subtitles',
75
79
  :'start_time' => :'start_time',
76
80
  :'end_time' => :'end_time',
77
81
  :'type' => :'type',
@@ -93,6 +97,7 @@ module MuxRuby
93
97
  {
94
98
  :'url' => :'String',
95
99
  :'overlay_settings' => :'InputSettingsOverlaySettings',
100
+ :'generated_subtitles' => :'Array<AssetGeneratedSubtitleSettings>',
96
101
  :'start_time' => :'Float',
97
102
  :'end_time' => :'Float',
98
103
  :'type' => :'String',
@@ -133,6 +138,12 @@ module MuxRuby
133
138
  self.overlay_settings = attributes[:'overlay_settings']
134
139
  end
135
140
 
141
+ if attributes.key?(:'generated_subtitles')
142
+ if (value = attributes[:'generated_subtitles']).is_a?(Array)
143
+ self.generated_subtitles = value
144
+ end
145
+ end
146
+
136
147
  if attributes.key?(:'start_time')
137
148
  self.start_time = attributes[:'start_time']
138
149
  end
@@ -210,6 +221,7 @@ module MuxRuby
210
221
  self.class == o.class &&
211
222
  url == o.url &&
212
223
  overlay_settings == o.overlay_settings &&
224
+ generated_subtitles == o.generated_subtitles &&
213
225
  start_time == o.start_time &&
214
226
  end_time == o.end_time &&
215
227
  type == o.type &&
@@ -229,7 +241,7 @@ module MuxRuby
229
241
  # Calculates hash code according to all attributes.
230
242
  # @return [Integer] Hash code
231
243
  def hash
232
- [url, overlay_settings, start_time, end_time, type, text_type, language_code, name, closed_captions, passthrough].hash
244
+ [url, overlay_settings, generated_subtitles, start_time, end_time, type, text_type, language_code, name, closed_captions, passthrough].hash
233
245
  end
234
246
 
235
247
  # Builds the object from hash
@@ -27,7 +27,7 @@ module MuxRuby
27
27
  # The Asset that is currently being created if there is an active broadcast.
28
28
  attr_accessor :active_asset_id
29
29
 
30
- # An array of strings with the most recent Assets that were created from this live stream.
30
+ # An array of strings with the most recent Asset IDs that were created from this Live Stream. The most recently generated Asset ID is the last entry in the list.
31
31
  attr_accessor :recent_asset_ids
32
32
 
33
33
  attr_accessor :status
@@ -49,7 +49,7 @@ module MuxRuby
49
49
  # Configure the incoming live stream to include subtitles created with automatic speech recognition. Each Asset created from a live stream with `generated_subtitles` configured will automatically receive two text tracks. The first of these will have a `text_source` value of `generated_live`, and will be available with `ready` status as soon as the stream is live. The second text track will have a `text_source` value of `generated_live_final` and will contain subtitles with improved accuracy, timing, and formatting. However, `generated_live_final` tracks will not be available in `ready` status until the live stream ends. If an Asset has both `generated_live` and `generated_live_final` tracks that are `ready`, then only the `generated_live_final` track will be included during playback.
50
50
  attr_accessor :generated_subtitles
51
51
 
52
- # When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. **Max**: 1800s (30 minutes). Reduced and Low Latency streams with a Reconnect Window greater than zero will insert slate media into the recorded asset while waiting for the streaming software to reconnect or when there are brief interruptions in the live stream media. When using a Reconnect Window setting higher than 60 seconds with a Standard Latency stream, we highly recommend enabling slate with the `use_slate_for_standard_latency` option.
52
+ # When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. **Max**: 1800s (30 minutes). If not specified directly, Standard Latency streams have a Reconnect Window of 60 seconds; Reduced and Low Latency streams have a default of 0 seconds, or no Reconnect Window. For that reason, we suggest specifying a value other than zero for Reduced and Low Latency streams. Reduced and Low Latency streams with a Reconnect Window greater than zero will insert slate media into the recorded asset while waiting for the streaming software to reconnect or when there are brief interruptions in the live stream media. When using a Reconnect Window setting higher than 60 seconds with a Standard Latency stream, we highly recommend enabling slate with the `use_slate_for_standard_latency` option.
53
53
  attr_accessor :reconnect_window
54
54
 
55
55
  # By default, Standard Latency live streams do not have slate media inserted while waiting for live streaming software to reconnect to Mux. Setting this to true enables slate insertion on a Standard Latency stream.
@@ -58,10 +58,10 @@ module MuxRuby
58
58
  # The URL of the image file that Mux should download and use as slate media during interruptions of the live stream media. This file will be downloaded each time a new recorded asset is created from the live stream. If this is not set, the default slate media will be used.
59
59
  attr_accessor :reconnect_slate_url
60
60
 
61
- # This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this if you want lower latency for your live stream. See the [Reduce live stream latency guide](https://docs.mux.com/guides/video/reduce-live-stream-latency) to understand the tradeoffs.
61
+ # This field is deprecated. Please use `latency_mode` instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this if you want lower latency for your live stream. See the [Reduce live stream latency guide](https://docs.mux.com/guides/video/reduce-live-stream-latency) to understand the tradeoffs.
62
62
  attr_accessor :reduced_latency
63
63
 
64
- # This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency.
64
+ # This field is deprecated. Please use `latency_mode` instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency.
65
65
  attr_accessor :low_latency
66
66
 
67
67
  # Each Simulcast Target contains configuration details to broadcast (or \"restream\") a live stream to a third-party streaming service. [See the Stream live to 3rd party platforms guide](https://docs.mux.com/guides/video/stream-live-to-3rd-party-platforms).
@@ -126,7 +126,7 @@ module MuxRuby
126
126
  # Check to see if the all the properties in the model are valid
127
127
  # @return true if the model is valid
128
128
  def valid?
129
- language_channel_validator = EnumAttributeValidator.new('String', ["cc1"])
129
+ language_channel_validator = EnumAttributeValidator.new('String', ["cc1", "cc2", "cc3", "cc4"])
130
130
  return false unless language_channel_validator.valid?(@language_channel)
131
131
  true
132
132
  end
@@ -134,7 +134,7 @@ module MuxRuby
134
134
  # Custom attribute writer method checking allowed values (enum).
135
135
  # @param [Object] language_channel Object to be assigned
136
136
  def language_channel=(language_channel)
137
- validator = EnumAttributeValidator.new('String', ["cc1"])
137
+ validator = EnumAttributeValidator.new('String', ["cc1", "cc2", "cc3", "cc4"])
138
138
  unless validator.valid?(language_channel)
139
139
  fail ArgumentError, "invalid value for \"language_channel\", must be one of #{validator.allowable_values}."
140
140
  end