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.
- checksums.yaml +4 -4
- data/CODEOWNERS +1 -1
- data/Gemfile.lock +2 -2
- data/README.md +4 -4
- data/docs/Asset.md +7 -1
- data/docs/AssetGeneratedSubtitleSettings.md +22 -0
- data/docs/AssetNonStandardInputReasons.md +3 -1
- data/docs/AssetsApi.md +1 -1
- data/docs/CreateAssetRequest.md +5 -1
- data/docs/CreateLiveStreamRequest.md +3 -3
- data/docs/CreateTrackRequest.md +2 -2
- data/docs/DeliveryReport.md +5 -1
- data/docs/DeliveryReportDeliveredSecondsByResolution.md +26 -0
- data/docs/DirectUploadsApi.md +1 -1
- data/docs/GetMonitoringBreakdownTimeseriesResponse.md +22 -0
- data/docs/InputSettings.md +7 -5
- data/docs/LiveStream.md +4 -4
- data/docs/MetricsApi.md +2 -2
- data/docs/MonitoringApi.md +93 -6
- data/docs/MonitoringBreakdownTimeseriesDatapoint.md +22 -0
- data/docs/MonitoringBreakdownTimeseriesValues.md +20 -0
- data/docs/RealTimeApi.md +8 -6
- data/docs/SigningKeysApi.md +291 -0
- data/docs/Track.md +4 -4
- data/docs/URLSigningKeysApi.md +4 -4
- data/docs/UpdateLiveStreamRequest.md +1 -1
- data/docs/VideoView.md +33 -1
- data/examples/video/exercise-signing-keys.rb +5 -4
- data/gen/generator-config.json +1 -1
- data/gen/package.json +1 -1
- data/gen/yarn.lock +411 -318
- data/lib/mux_ruby/api/assets_api.rb +2 -2
- data/lib/mux_ruby/api/direct_uploads_api.rb +2 -2
- data/lib/mux_ruby/api/metrics_api.rb +9 -9
- data/lib/mux_ruby/api/monitoring_api.rb +110 -9
- data/lib/mux_ruby/api/real_time_api.rb +9 -6
- data/lib/mux_ruby/api/signing_keys_api.rb +266 -0
- data/lib/mux_ruby/api/url_signing_keys_api.rb +8 -8
- data/lib/mux_ruby/models/asset.rb +68 -2
- data/lib/mux_ruby/models/asset_generated_subtitle_settings.rb +275 -0
- data/lib/mux_ruby/models/asset_non_standard_input_reasons.rb +14 -4
- data/lib/mux_ruby/models/broadcast_layout.rb +1 -0
- data/lib/mux_ruby/models/create_asset_request.rb +48 -4
- data/lib/mux_ruby/models/create_live_stream_request.rb +3 -3
- data/lib/mux_ruby/models/create_track_request.rb +4 -3
- data/lib/mux_ruby/models/delivery_report.rb +35 -4
- data/lib/mux_ruby/models/delivery_report_delivered_seconds_by_resolution.rb +260 -0
- data/lib/mux_ruby/models/get_monitoring_breakdown_timeseries_response.rb +240 -0
- data/lib/mux_ruby/models/input_settings.rb +18 -6
- data/lib/mux_ruby/models/live_stream.rb +4 -4
- data/lib/mux_ruby/models/live_stream_embedded_subtitle_settings.rb +2 -2
- data/lib/mux_ruby/models/monitoring_breakdown_timeseries_datapoint.rb +236 -0
- data/lib/mux_ruby/models/monitoring_breakdown_timeseries_values.rb +229 -0
- data/lib/mux_ruby/models/track.rb +6 -6
- data/lib/mux_ruby/models/update_live_stream_request.rb +1 -1
- data/lib/mux_ruby/models/video_view.rb +162 -5
- data/lib/mux_ruby/version.rb +1 -1
- data/lib/mux_ruby.rb +6 -0
- data/spec/api/signing_keys_api_spec.rb +83 -0
- data/spec/models/asset_generated_subtitle_settings_spec.rb +50 -0
- data/spec/models/delivery_report_delivered_seconds_by_resolution_spec.rb +46 -0
- data/spec/models/get_monitoring_breakdown_timeseries_response_spec.rb +46 -0
- data/spec/models/monitoring_breakdown_timeseries_datapoint_spec.rb +46 -0
- data/spec/models/monitoring_breakdown_timeseries_values_spec.rb +40 -0
- data/test.sh +2 -2
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/byebug/byebug.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.15.5/ffi_c.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.15.5/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.15.5/mkmf.log +15 -15
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.4/gem_make.out +14 -14
- 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
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-4.0.4/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-4.0.4/mkmf.log +4 -4
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-4.0.4/psych.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.2/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.2/mkmf.log +2 -2
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.2/stringio.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/byebug-11.1.3/ext/byebug/Makefile +6 -6
- data/vendor/bundle/ruby/3.2.0/gems/byebug-11.1.3/lib/byebug/byebug.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/ffi-1.15.5/ext/ffi_c/Makefile +6 -6
- data/vendor/bundle/ruby/3.2.0/gems/ffi-1.15.5/lib/ffi_c.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/Makefile +6 -6
- data/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.4/lib/jaro_winkler/jaro_winkler_ext.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/psych-4.0.4/ext/psych/Makefile +6 -6
- data/vendor/bundle/ruby/3.2.0/gems/psych-4.0.4/lib/psych.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/stringio-3.0.2/ext/stringio/Makefile +6 -6
- data/vendor/bundle/ruby/3.2.0/gems/stringio-3.0.2/lib/stringio.so +0 -0
- data/vendor/bundle/ruby/3.2.0/specifications/ast-2.4.2.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/byebug-11.1.3.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/coderay-1.1.3.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/diff-lcs-1.5.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/ethon-0.16.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/ffi-1.15.5.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/jaro_winkler-1.5.4.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/method_source-1.0.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/parallel-1.22.1.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/parser-3.1.2.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/pry-0.13.1.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/pry-byebug-3.9.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/psych-4.0.4.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/rainbow-3.1.1.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/rake-13.0.6.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/rspec-3.11.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/rspec-core-3.11.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/rspec-expectations-3.11.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/rspec-mocks-3.11.1.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/rspec-support-3.11.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/rubocop-0.66.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/ruby-progressbar-1.11.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/solid_assert-1.1.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/stringio-3.0.2.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/typhoeus-1.4.0.gemspec +2 -2
- data/vendor/bundle/ruby/3.2.0/specifications/unicode-display_width-1.5.0.gemspec +2 -2
- metadata +164 -140
|
@@ -0,0 +1,236 @@
|
|
|
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 MonitoringBreakdownTimeseriesDatapoint
|
|
18
|
+
attr_accessor :value
|
|
19
|
+
|
|
20
|
+
attr_accessor :metric_value
|
|
21
|
+
|
|
22
|
+
attr_accessor :concurrent_viewers
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'value' => :'value',
|
|
28
|
+
:'metric_value' => :'metric_value',
|
|
29
|
+
:'concurrent_viewers' => :'concurrent_viewers'
|
|
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
|
+
:'value' => :'String',
|
|
42
|
+
:'metric_value' => :'Float',
|
|
43
|
+
:'concurrent_viewers' => :'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::MonitoringBreakdownTimeseriesDatapoint` 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::MonitoringBreakdownTimeseriesDatapoint`. 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?(:'value')
|
|
69
|
+
self.value = attributes[:'value']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'metric_value')
|
|
73
|
+
self.metric_value = attributes[:'metric_value']
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'concurrent_viewers')
|
|
77
|
+
self.concurrent_viewers = attributes[:'concurrent_viewers']
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
82
|
+
# @return Array for valid properties with the reasons
|
|
83
|
+
def list_invalid_properties
|
|
84
|
+
invalid_properties = Array.new
|
|
85
|
+
invalid_properties
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Check to see if the all the properties in the model are valid
|
|
89
|
+
# @return true if the model is valid
|
|
90
|
+
def valid?
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Checks equality by comparing each attribute.
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def ==(o)
|
|
97
|
+
return true if self.equal?(o)
|
|
98
|
+
self.class == o.class &&
|
|
99
|
+
value == o.value &&
|
|
100
|
+
metric_value == o.metric_value &&
|
|
101
|
+
concurrent_viewers == o.concurrent_viewers
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @see the `==` method
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def eql?(o)
|
|
107
|
+
self == o
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Calculates hash code according to all attributes.
|
|
111
|
+
# @return [Integer] Hash code
|
|
112
|
+
def hash
|
|
113
|
+
[value, metric_value, concurrent_viewers].hash
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Builds the object from hash
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
# @return [Object] Returns the model itself
|
|
119
|
+
def self.build_from_hash(attributes)
|
|
120
|
+
new.build_from_hash(attributes)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Builds the object from hash
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
# @return [Object] Returns the model itself
|
|
126
|
+
def build_from_hash(attributes)
|
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
|
128
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
129
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
130
|
+
self.send("#{key}=", nil)
|
|
131
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
132
|
+
# check to ensure the input is an array given that the attribute
|
|
133
|
+
# is documented as an array but the input is not
|
|
134
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
135
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
136
|
+
end
|
|
137
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
138
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
self
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Deserializes the data based on type
|
|
146
|
+
# @param string type Data type
|
|
147
|
+
# @param string value Value to be deserialized
|
|
148
|
+
# @return [Object] Deserialized data
|
|
149
|
+
def _deserialize(type, value)
|
|
150
|
+
case type.to_sym
|
|
151
|
+
when :Time
|
|
152
|
+
Time.parse(value)
|
|
153
|
+
when :Date
|
|
154
|
+
Date.parse(value)
|
|
155
|
+
when :String
|
|
156
|
+
value.to_s
|
|
157
|
+
when :Integer
|
|
158
|
+
value.to_i
|
|
159
|
+
when :Float
|
|
160
|
+
value.to_f
|
|
161
|
+
when :Boolean
|
|
162
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
163
|
+
true
|
|
164
|
+
else
|
|
165
|
+
false
|
|
166
|
+
end
|
|
167
|
+
when :Object
|
|
168
|
+
# generic object (usually a Hash), return directly
|
|
169
|
+
value
|
|
170
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
171
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
172
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
173
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
174
|
+
k_type = Regexp.last_match[:k_type]
|
|
175
|
+
v_type = Regexp.last_match[:v_type]
|
|
176
|
+
{}.tap do |hash|
|
|
177
|
+
value.each do |k, v|
|
|
178
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
else # model
|
|
182
|
+
# models (e.g. Pet) or oneOf
|
|
183
|
+
klass = MuxRuby.const_get(type)
|
|
184
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Returns the string representation of the object
|
|
189
|
+
# @return [String] String presentation of the object
|
|
190
|
+
def to_s
|
|
191
|
+
to_hash.to_s
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
|
196
|
+
def to_body
|
|
197
|
+
to_hash
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Returns the object in the form of hash
|
|
201
|
+
# @return [Hash] Returns the object in the form of hash
|
|
202
|
+
def to_hash
|
|
203
|
+
hash = {}
|
|
204
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
205
|
+
value = self.send(attr)
|
|
206
|
+
if value.nil?
|
|
207
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
208
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
hash[param] = _to_hash(value)
|
|
212
|
+
end
|
|
213
|
+
hash
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Outputs non-array value in the form of hash
|
|
217
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
218
|
+
# @param [Object] value Any valid value
|
|
219
|
+
# @return [Hash] Returns the value in the form of hash
|
|
220
|
+
def _to_hash(value)
|
|
221
|
+
if value.is_a?(Array)
|
|
222
|
+
value.compact.map { |v| _to_hash(v) }
|
|
223
|
+
elsif value.is_a?(Hash)
|
|
224
|
+
{}.tap do |hash|
|
|
225
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
226
|
+
end
|
|
227
|
+
elsif value.respond_to? :to_hash
|
|
228
|
+
value.to_hash
|
|
229
|
+
else
|
|
230
|
+
value
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
end
|
|
@@ -0,0 +1,229 @@
|
|
|
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 MonitoringBreakdownTimeseriesValues
|
|
18
|
+
attr_accessor :values
|
|
19
|
+
|
|
20
|
+
attr_accessor :date
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'values' => :'values',
|
|
26
|
+
:'date' => :'date'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns all the JSON keys this model knows about
|
|
31
|
+
def self.acceptable_attributes
|
|
32
|
+
attribute_map.values
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Attribute type mapping.
|
|
36
|
+
def self.openapi_types
|
|
37
|
+
{
|
|
38
|
+
:'values' => :'Array<MonitoringBreakdownTimeseriesDatapoint>',
|
|
39
|
+
:'date' => :'String'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# List of attributes with nullable: true
|
|
44
|
+
def self.openapi_nullable
|
|
45
|
+
Set.new([
|
|
46
|
+
])
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Initializes the object
|
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
51
|
+
def initialize(attributes = {})
|
|
52
|
+
if (!attributes.is_a?(Hash))
|
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::MonitoringBreakdownTimeseriesValues` initialize method"
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::MonitoringBreakdownTimeseriesValues`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
60
|
+
end
|
|
61
|
+
h[k.to_sym] = v
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if attributes.key?(:'values')
|
|
65
|
+
if (value = attributes[:'values']).is_a?(Array)
|
|
66
|
+
self.values = value
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'date')
|
|
71
|
+
self.date = attributes[:'date']
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
76
|
+
# @return Array for valid properties with the reasons
|
|
77
|
+
def list_invalid_properties
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
invalid_properties
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Check to see if the all the properties in the model are valid
|
|
83
|
+
# @return true if the model is valid
|
|
84
|
+
def valid?
|
|
85
|
+
true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def ==(o)
|
|
91
|
+
return true if self.equal?(o)
|
|
92
|
+
self.class == o.class &&
|
|
93
|
+
values == o.values &&
|
|
94
|
+
date == o.date
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @see the `==` method
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def eql?(o)
|
|
100
|
+
self == o
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Calculates hash code according to all attributes.
|
|
104
|
+
# @return [Integer] Hash code
|
|
105
|
+
def hash
|
|
106
|
+
[values, date].hash
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Builds the object from hash
|
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
111
|
+
# @return [Object] Returns the model itself
|
|
112
|
+
def self.build_from_hash(attributes)
|
|
113
|
+
new.build_from_hash(attributes)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Builds the object from hash
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
# @return [Object] Returns the model itself
|
|
119
|
+
def build_from_hash(attributes)
|
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
|
121
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
122
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
123
|
+
self.send("#{key}=", nil)
|
|
124
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
125
|
+
# check to ensure the input is an array given that the attribute
|
|
126
|
+
# is documented as an array but the input is not
|
|
127
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
128
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
129
|
+
end
|
|
130
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
131
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
self
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Deserializes the data based on type
|
|
139
|
+
# @param string type Data type
|
|
140
|
+
# @param string value Value to be deserialized
|
|
141
|
+
# @return [Object] Deserialized data
|
|
142
|
+
def _deserialize(type, value)
|
|
143
|
+
case type.to_sym
|
|
144
|
+
when :Time
|
|
145
|
+
Time.parse(value)
|
|
146
|
+
when :Date
|
|
147
|
+
Date.parse(value)
|
|
148
|
+
when :String
|
|
149
|
+
value.to_s
|
|
150
|
+
when :Integer
|
|
151
|
+
value.to_i
|
|
152
|
+
when :Float
|
|
153
|
+
value.to_f
|
|
154
|
+
when :Boolean
|
|
155
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
156
|
+
true
|
|
157
|
+
else
|
|
158
|
+
false
|
|
159
|
+
end
|
|
160
|
+
when :Object
|
|
161
|
+
# generic object (usually a Hash), return directly
|
|
162
|
+
value
|
|
163
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
164
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
165
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
166
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
167
|
+
k_type = Regexp.last_match[:k_type]
|
|
168
|
+
v_type = Regexp.last_match[:v_type]
|
|
169
|
+
{}.tap do |hash|
|
|
170
|
+
value.each do |k, v|
|
|
171
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
else # model
|
|
175
|
+
# models (e.g. Pet) or oneOf
|
|
176
|
+
klass = MuxRuby.const_get(type)
|
|
177
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Returns the string representation of the object
|
|
182
|
+
# @return [String] String presentation of the object
|
|
183
|
+
def to_s
|
|
184
|
+
to_hash.to_s
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
|
189
|
+
def to_body
|
|
190
|
+
to_hash
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Returns the object in the form of hash
|
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
|
195
|
+
def to_hash
|
|
196
|
+
hash = {}
|
|
197
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
198
|
+
value = self.send(attr)
|
|
199
|
+
if value.nil?
|
|
200
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
201
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
hash[param] = _to_hash(value)
|
|
205
|
+
end
|
|
206
|
+
hash
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Outputs non-array value in the form of hash
|
|
210
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
211
|
+
# @param [Object] value Any valid value
|
|
212
|
+
# @return [Hash] Returns the value in the form of hash
|
|
213
|
+
def _to_hash(value)
|
|
214
|
+
if value.is_a?(Array)
|
|
215
|
+
value.compact.map { |v| _to_hash(v) }
|
|
216
|
+
elsif value.is_a?(Hash)
|
|
217
|
+
{}.tap do |hash|
|
|
218
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
219
|
+
end
|
|
220
|
+
elsif value.respond_to? :to_hash
|
|
221
|
+
value.to_hash
|
|
222
|
+
else
|
|
223
|
+
value
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
end
|
|
@@ -42,16 +42,16 @@ module MuxRuby
|
|
|
42
42
|
# This parameter is only set for `text` type tracks.
|
|
43
43
|
attr_accessor :text_type
|
|
44
44
|
|
|
45
|
-
# The source of the text contained in a Track of type `text`. Valid `text_source` values are listed below. * `uploaded`: Tracks uploaded to Mux as caption or subtitle files using the Create Asset Track API. * `embedded`: Tracks extracted from an embedded stream of CEA-608 closed captions. * `generated_live`: Tracks generated by automatic speech recognition on a live stream configured with `generated_subtitles`. 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. * `generated_live_final`: Tracks generated by automatic speech recognition on a live stream using `generated_subtitles`. The accuracy, timing, and formatting of these subtitles is improved compared to the corresponding `generated_live` tracks. 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.
|
|
45
|
+
# The source of the text contained in a Track of type `text`. Valid `text_source` values are listed below. * `uploaded`: Tracks uploaded to Mux as caption or subtitle files using the Create Asset Track API. * `embedded`: Tracks extracted from an embedded stream of CEA-608 closed captions. * `generated_vod`: Tracks generated by automatic speech recognition on an on-demand asset. * `generated_live`: Tracks generated by automatic speech recognition on a live stream configured with `generated_subtitles`. 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. * `generated_live_final`: Tracks generated by automatic speech recognition on a live stream using `generated_subtitles`. The accuracy, timing, and formatting of these subtitles is improved compared to the corresponding `generated_live` tracks. 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.
|
|
46
46
|
attr_accessor :text_source
|
|
47
47
|
|
|
48
|
-
# The language code value represents [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 only set for `text`
|
|
48
|
+
# The language code value represents [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 only set for `text` and `audio` track types.
|
|
49
49
|
attr_accessor :language_code
|
|
50
50
|
|
|
51
|
-
# The name of the track containing a human-readable description. The
|
|
51
|
+
# The name of the track containing a human-readable description. The HLS manifest will associate a subtitle `text` or `audio` track with this value. For example, the value should be \"English\" for a subtitle text track for the `language_code` value of `en-US`. This parameter is only set for `text` and `audio` track types.
|
|
52
52
|
attr_accessor :name
|
|
53
53
|
|
|
54
|
-
# Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This parameter is only set
|
|
54
|
+
# Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This parameter is only set tracks where `type` is `text` and `text_type` is `subtitles`.
|
|
55
55
|
attr_accessor :closed_captions
|
|
56
56
|
|
|
57
57
|
# Arbitrary user-supplied metadata set for the track either when creating the asset or track. This parameter is only set for `text` type tracks. Max 255 characters.
|
|
@@ -227,7 +227,7 @@ module MuxRuby
|
|
|
227
227
|
return false unless text_type_validator.valid?(@text_type)
|
|
228
228
|
text_source_validator = EnumAttributeValidator.new('String', ["uploaded", "embedded", "generated_live", "generated_live_final"])
|
|
229
229
|
return false unless text_source_validator.valid?(@text_source)
|
|
230
|
-
status_validator = EnumAttributeValidator.new('String', ["preparing", "ready", "errored"])
|
|
230
|
+
status_validator = EnumAttributeValidator.new('String', ["preparing", "ready", "errored", "deleted"])
|
|
231
231
|
return false unless status_validator.valid?(@status)
|
|
232
232
|
true
|
|
233
233
|
end
|
|
@@ -265,7 +265,7 @@ module MuxRuby
|
|
|
265
265
|
# Custom attribute writer method checking allowed values (enum).
|
|
266
266
|
# @param [Object] status Object to be assigned
|
|
267
267
|
def status=(status)
|
|
268
|
-
validator = EnumAttributeValidator.new('String', ["preparing", "ready", "errored"])
|
|
268
|
+
validator = EnumAttributeValidator.new('String', ["preparing", "ready", "errored", "deleted"])
|
|
269
269
|
unless validator.valid?(status)
|
|
270
270
|
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
271
271
|
end
|
|
@@ -21,7 +21,7 @@ module MuxRuby
|
|
|
21
21
|
# Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this as an alternative to setting low latency or reduced latency flags. The Low Latency value is a beta feature. Read more here: https://mux.com/blog/introducing-low-latency-live-streaming/
|
|
22
22
|
attr_accessor :latency_mode
|
|
23
23
|
|
|
24
|
-
# 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. 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.
|
|
24
|
+
# 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. 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.
|
|
25
25
|
attr_accessor :reconnect_window
|
|
26
26
|
|
|
27
27
|
# 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.
|