mux_ruby 3.15.0 → 3.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +4 -4
- data/docs/AbridgedVideoView.md +3 -1
- data/docs/CreateAssetRequest.md +3 -1
- data/docs/CreateLiveStreamRequest.md +2 -0
- data/docs/CreatePlaybackIDRequest.md +3 -1
- data/docs/CreatePlaybackRestrictionRequest.md +3 -1
- data/docs/CreateUploadRequest.md +1 -1
- data/docs/DRMConfiguration.md +18 -0
- data/docs/DRMConfigurationResponse.md +18 -0
- data/docs/DRMConfigurationsApi.md +153 -0
- data/docs/DeliveryReport.md +2 -0
- data/docs/GenerateTrackSubtitlesResponse.md +1 -1
- data/docs/ListDRMConfigurationsResponse.md +18 -0
- data/docs/MetricsApi.md +8 -8
- data/docs/PlaybackID.md +3 -1
- data/docs/PlaybackRestriction.md +3 -1
- data/docs/PlaybackRestrictionsApi.md +73 -0
- data/docs/UpdateLiveStreamNewAssetSettings.md +18 -0
- data/docs/UpdateLiveStreamRequest.md +3 -1
- data/docs/UpdateUserAgentRestrictionRequest.md +20 -0
- data/docs/UserAgentRestrictionRequest.md +20 -0
- data/docs/UserAgentRestrictionSettings.md +20 -0
- data/docs/VideoView.md +13 -1
- data/gen/generator-config.json +1 -1
- data/lib/mux_ruby/api/drm_configurations_api.rb +148 -0
- data/lib/mux_ruby/api/metrics_api.rb +14 -14
- data/lib/mux_ruby/api/playback_restrictions_api.rb +71 -0
- data/lib/mux_ruby/models/abridged_video_view.rb +14 -5
- data/lib/mux_ruby/models/create_asset_request.rb +14 -2
- data/lib/mux_ruby/models/create_live_stream_request.rb +13 -1
- data/lib/mux_ruby/models/create_playback_id_request.rb +14 -4
- data/lib/mux_ruby/models/create_playback_restriction_request.rb +13 -4
- data/lib/mux_ruby/models/create_upload_request.rb +1 -0
- data/lib/mux_ruby/models/delivery_report.rb +23 -1
- data/lib/mux_ruby/models/drm_configuration.rb +219 -0
- data/lib/mux_ruby/models/drm_configuration_response.rb +218 -0
- data/lib/mux_ruby/models/generate_track_subtitles_response.rb +4 -2
- data/lib/mux_ruby/models/list_drm_configurations_response.rb +220 -0
- data/lib/mux_ruby/models/playback_id.rb +14 -4
- data/lib/mux_ruby/models/playback_policy.rb +1 -0
- data/lib/mux_ruby/models/playback_restriction.rb +13 -4
- data/lib/mux_ruby/models/update_live_stream_new_asset_settings.rb +254 -0
- data/lib/mux_ruby/models/update_live_stream_request.rb +13 -4
- data/lib/mux_ruby/models/update_user_agent_restriction_request.rb +233 -0
- data/lib/mux_ruby/models/user_agent_restriction_request.rb +234 -0
- data/lib/mux_ruby/models/user_agent_restriction_settings.rb +234 -0
- data/lib/mux_ruby/models/video_view.rb +66 -4
- data/lib/mux_ruby/version.rb +1 -1
- data/lib/mux_ruby.rb +8 -0
- data/spec/api/drm_configurations_api_spec.rb +60 -0
- data/spec/models/drm_configuration_response_spec.rb +34 -0
- data/spec/models/drm_configuration_spec.rb +34 -0
- data/spec/models/list_drm_configurations_response_spec.rb +34 -0
- data/spec/models/update_live_stream_new_asset_settings_spec.rb +38 -0
- data/spec/models/update_user_agent_restriction_request_spec.rb +40 -0
- data/spec/models/user_agent_restriction_request_spec.rb +40 -0
- data/spec/models/user_agent_restriction_settings_spec.rb +40 -0
- 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.16.3/ffi_c.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.16.3/gem_make.out +6 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.16.3/mkmf.log +18 -18
- 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 +3 -3
- 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.16.3/ext/ffi_c/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/lib/ffi_c.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/Makefile +3 -3
- 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 +3 -3
- 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 +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/stringio-3.0.2/lib/stringio.so +0 -0
- metadata +185 -153
@@ -0,0 +1,234 @@
|
|
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
|
+
# Rules that control what user agents are allowed to play your videos. Please see [Using User-Agent HTTP header for validation](https://docs.mux.com/guides/secure-video-playback#using-user-agent-http-header-for-validation) for more details on this feature.
|
18
|
+
class UserAgentRestrictionRequest
|
19
|
+
# Whether or not to allow views without a `User-Agent` HTTP request header.
|
20
|
+
attr_accessor :allow_no_user_agent
|
21
|
+
|
22
|
+
# Whether or not to allow high risk user agents. The high risk user agents are defined by Mux.
|
23
|
+
attr_accessor :allow_high_risk_user_agent
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'allow_no_user_agent' => :'allow_no_user_agent',
|
29
|
+
:'allow_high_risk_user_agent' => :'allow_high_risk_user_agent'
|
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
|
+
:'allow_no_user_agent' => :'Boolean',
|
42
|
+
:'allow_high_risk_user_agent' => :'Boolean'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# List of attributes with nullable: true
|
47
|
+
def self.openapi_nullable
|
48
|
+
Set.new([
|
49
|
+
])
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
+
def initialize(attributes = {})
|
55
|
+
if (!attributes.is_a?(Hash))
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::UserAgentRestrictionRequest` initialize method"
|
57
|
+
end
|
58
|
+
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::UserAgentRestrictionRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
63
|
+
end
|
64
|
+
h[k.to_sym] = v
|
65
|
+
}
|
66
|
+
|
67
|
+
if attributes.key?(:'allow_no_user_agent')
|
68
|
+
self.allow_no_user_agent = attributes[:'allow_no_user_agent']
|
69
|
+
else
|
70
|
+
self.allow_no_user_agent = true
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'allow_high_risk_user_agent')
|
74
|
+
self.allow_high_risk_user_agent = attributes[:'allow_high_risk_user_agent']
|
75
|
+
else
|
76
|
+
self.allow_high_risk_user_agent = true
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
81
|
+
# @return Array for valid properties with the reasons
|
82
|
+
def list_invalid_properties
|
83
|
+
invalid_properties = Array.new
|
84
|
+
invalid_properties
|
85
|
+
end
|
86
|
+
|
87
|
+
# Check to see if the all the properties in the model are valid
|
88
|
+
# @return true if the model is valid
|
89
|
+
def valid?
|
90
|
+
true
|
91
|
+
end
|
92
|
+
|
93
|
+
# Checks equality by comparing each attribute.
|
94
|
+
# @param [Object] Object to be compared
|
95
|
+
def ==(o)
|
96
|
+
return true if self.equal?(o)
|
97
|
+
self.class == o.class &&
|
98
|
+
allow_no_user_agent == o.allow_no_user_agent &&
|
99
|
+
allow_high_risk_user_agent == o.allow_high_risk_user_agent
|
100
|
+
end
|
101
|
+
|
102
|
+
# @see the `==` method
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def eql?(o)
|
105
|
+
self == o
|
106
|
+
end
|
107
|
+
|
108
|
+
# Calculates hash code according to all attributes.
|
109
|
+
# @return [Integer] Hash code
|
110
|
+
def hash
|
111
|
+
[allow_no_user_agent, allow_high_risk_user_agent].hash
|
112
|
+
end
|
113
|
+
|
114
|
+
# Builds the object from hash
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
# @return [Object] Returns the model itself
|
117
|
+
def self.build_from_hash(attributes)
|
118
|
+
new.build_from_hash(attributes)
|
119
|
+
end
|
120
|
+
|
121
|
+
# Builds the object from hash
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
+
# @return [Object] Returns the model itself
|
124
|
+
def build_from_hash(attributes)
|
125
|
+
return nil unless attributes.is_a?(Hash)
|
126
|
+
self.class.openapi_types.each_pair do |key, type|
|
127
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
128
|
+
self.send("#{key}=", nil)
|
129
|
+
elsif type =~ /\AArray<(.*)>/i
|
130
|
+
# check to ensure the input is an array given that the attribute
|
131
|
+
# is documented as an array but the input is not
|
132
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
133
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
134
|
+
end
|
135
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
136
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
self
|
141
|
+
end
|
142
|
+
|
143
|
+
# Deserializes the data based on type
|
144
|
+
# @param string type Data type
|
145
|
+
# @param string value Value to be deserialized
|
146
|
+
# @return [Object] Deserialized data
|
147
|
+
def _deserialize(type, value)
|
148
|
+
case type.to_sym
|
149
|
+
when :Time
|
150
|
+
Time.parse(value)
|
151
|
+
when :Date
|
152
|
+
Date.parse(value)
|
153
|
+
when :String
|
154
|
+
value.to_s
|
155
|
+
when :Integer
|
156
|
+
value.to_i
|
157
|
+
when :Float
|
158
|
+
value.to_f
|
159
|
+
when :Boolean
|
160
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
161
|
+
true
|
162
|
+
else
|
163
|
+
false
|
164
|
+
end
|
165
|
+
when :Object
|
166
|
+
# generic object (usually a Hash), return directly
|
167
|
+
value
|
168
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
169
|
+
inner_type = Regexp.last_match[:inner_type]
|
170
|
+
value.map { |v| _deserialize(inner_type, v) }
|
171
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
172
|
+
k_type = Regexp.last_match[:k_type]
|
173
|
+
v_type = Regexp.last_match[:v_type]
|
174
|
+
{}.tap do |hash|
|
175
|
+
value.each do |k, v|
|
176
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
else # model
|
180
|
+
# models (e.g. Pet) or oneOf
|
181
|
+
klass = MuxRuby.const_get(type)
|
182
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
# Returns the string representation of the object
|
187
|
+
# @return [String] String presentation of the object
|
188
|
+
def to_s
|
189
|
+
to_hash.to_s
|
190
|
+
end
|
191
|
+
|
192
|
+
# to_body is an alias to to_hash (backward compatibility)
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
194
|
+
def to_body
|
195
|
+
to_hash
|
196
|
+
end
|
197
|
+
|
198
|
+
# Returns the object in the form of hash
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
200
|
+
def to_hash
|
201
|
+
hash = {}
|
202
|
+
self.class.attribute_map.each_pair do |attr, param|
|
203
|
+
value = self.send(attr)
|
204
|
+
if value.nil?
|
205
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
206
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
207
|
+
end
|
208
|
+
|
209
|
+
hash[param] = _to_hash(value)
|
210
|
+
end
|
211
|
+
hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# Outputs non-array value in the form of hash
|
215
|
+
# For object, use to_hash. Otherwise, just return the value
|
216
|
+
# @param [Object] value Any valid value
|
217
|
+
# @return [Hash] Returns the value in the form of hash
|
218
|
+
def _to_hash(value)
|
219
|
+
if value.is_a?(Array)
|
220
|
+
value.compact.map { |v| _to_hash(v) }
|
221
|
+
elsif value.is_a?(Hash)
|
222
|
+
{}.tap do |hash|
|
223
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
224
|
+
end
|
225
|
+
elsif value.respond_to? :to_hash
|
226
|
+
value.to_hash
|
227
|
+
else
|
228
|
+
value
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
end
|
233
|
+
|
234
|
+
end
|
@@ -0,0 +1,234 @@
|
|
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
|
+
# Rules that control what user agents are allowed to play your videos. Please see [Using User-Agent HTTP header for validation](https://docs.mux.com/guides/secure-video-playback#using-user-agent-http-header-for-validation) for more details on this feature.
|
18
|
+
class UserAgentRestrictionSettings
|
19
|
+
# Whether or not to allow views without a `User-Agent` HTTP request header.
|
20
|
+
attr_accessor :allow_no_user_agent
|
21
|
+
|
22
|
+
# Whether or not to allow high risk user agents. The high risk user agents are defined by Mux.
|
23
|
+
attr_accessor :allow_high_risk_user_agent
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'allow_no_user_agent' => :'allow_no_user_agent',
|
29
|
+
:'allow_high_risk_user_agent' => :'allow_high_risk_user_agent'
|
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
|
+
:'allow_no_user_agent' => :'Boolean',
|
42
|
+
:'allow_high_risk_user_agent' => :'Boolean'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# List of attributes with nullable: true
|
47
|
+
def self.openapi_nullable
|
48
|
+
Set.new([
|
49
|
+
])
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
+
def initialize(attributes = {})
|
55
|
+
if (!attributes.is_a?(Hash))
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::UserAgentRestrictionSettings` initialize method"
|
57
|
+
end
|
58
|
+
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::UserAgentRestrictionSettings`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
63
|
+
end
|
64
|
+
h[k.to_sym] = v
|
65
|
+
}
|
66
|
+
|
67
|
+
if attributes.key?(:'allow_no_user_agent')
|
68
|
+
self.allow_no_user_agent = attributes[:'allow_no_user_agent']
|
69
|
+
else
|
70
|
+
self.allow_no_user_agent = true
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'allow_high_risk_user_agent')
|
74
|
+
self.allow_high_risk_user_agent = attributes[:'allow_high_risk_user_agent']
|
75
|
+
else
|
76
|
+
self.allow_high_risk_user_agent = true
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
81
|
+
# @return Array for valid properties with the reasons
|
82
|
+
def list_invalid_properties
|
83
|
+
invalid_properties = Array.new
|
84
|
+
invalid_properties
|
85
|
+
end
|
86
|
+
|
87
|
+
# Check to see if the all the properties in the model are valid
|
88
|
+
# @return true if the model is valid
|
89
|
+
def valid?
|
90
|
+
true
|
91
|
+
end
|
92
|
+
|
93
|
+
# Checks equality by comparing each attribute.
|
94
|
+
# @param [Object] Object to be compared
|
95
|
+
def ==(o)
|
96
|
+
return true if self.equal?(o)
|
97
|
+
self.class == o.class &&
|
98
|
+
allow_no_user_agent == o.allow_no_user_agent &&
|
99
|
+
allow_high_risk_user_agent == o.allow_high_risk_user_agent
|
100
|
+
end
|
101
|
+
|
102
|
+
# @see the `==` method
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def eql?(o)
|
105
|
+
self == o
|
106
|
+
end
|
107
|
+
|
108
|
+
# Calculates hash code according to all attributes.
|
109
|
+
# @return [Integer] Hash code
|
110
|
+
def hash
|
111
|
+
[allow_no_user_agent, allow_high_risk_user_agent].hash
|
112
|
+
end
|
113
|
+
|
114
|
+
# Builds the object from hash
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
# @return [Object] Returns the model itself
|
117
|
+
def self.build_from_hash(attributes)
|
118
|
+
new.build_from_hash(attributes)
|
119
|
+
end
|
120
|
+
|
121
|
+
# Builds the object from hash
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
+
# @return [Object] Returns the model itself
|
124
|
+
def build_from_hash(attributes)
|
125
|
+
return nil unless attributes.is_a?(Hash)
|
126
|
+
self.class.openapi_types.each_pair do |key, type|
|
127
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
128
|
+
self.send("#{key}=", nil)
|
129
|
+
elsif type =~ /\AArray<(.*)>/i
|
130
|
+
# check to ensure the input is an array given that the attribute
|
131
|
+
# is documented as an array but the input is not
|
132
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
133
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
134
|
+
end
|
135
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
136
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
self
|
141
|
+
end
|
142
|
+
|
143
|
+
# Deserializes the data based on type
|
144
|
+
# @param string type Data type
|
145
|
+
# @param string value Value to be deserialized
|
146
|
+
# @return [Object] Deserialized data
|
147
|
+
def _deserialize(type, value)
|
148
|
+
case type.to_sym
|
149
|
+
when :Time
|
150
|
+
Time.parse(value)
|
151
|
+
when :Date
|
152
|
+
Date.parse(value)
|
153
|
+
when :String
|
154
|
+
value.to_s
|
155
|
+
when :Integer
|
156
|
+
value.to_i
|
157
|
+
when :Float
|
158
|
+
value.to_f
|
159
|
+
when :Boolean
|
160
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
161
|
+
true
|
162
|
+
else
|
163
|
+
false
|
164
|
+
end
|
165
|
+
when :Object
|
166
|
+
# generic object (usually a Hash), return directly
|
167
|
+
value
|
168
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
169
|
+
inner_type = Regexp.last_match[:inner_type]
|
170
|
+
value.map { |v| _deserialize(inner_type, v) }
|
171
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
172
|
+
k_type = Regexp.last_match[:k_type]
|
173
|
+
v_type = Regexp.last_match[:v_type]
|
174
|
+
{}.tap do |hash|
|
175
|
+
value.each do |k, v|
|
176
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
else # model
|
180
|
+
# models (e.g. Pet) or oneOf
|
181
|
+
klass = MuxRuby.const_get(type)
|
182
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
# Returns the string representation of the object
|
187
|
+
# @return [String] String presentation of the object
|
188
|
+
def to_s
|
189
|
+
to_hash.to_s
|
190
|
+
end
|
191
|
+
|
192
|
+
# to_body is an alias to to_hash (backward compatibility)
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
194
|
+
def to_body
|
195
|
+
to_hash
|
196
|
+
end
|
197
|
+
|
198
|
+
# Returns the object in the form of hash
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
200
|
+
def to_hash
|
201
|
+
hash = {}
|
202
|
+
self.class.attribute_map.each_pair do |attr, param|
|
203
|
+
value = self.send(attr)
|
204
|
+
if value.nil?
|
205
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
206
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
207
|
+
end
|
208
|
+
|
209
|
+
hash[param] = _to_hash(value)
|
210
|
+
end
|
211
|
+
hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# Outputs non-array value in the form of hash
|
215
|
+
# For object, use to_hash. Otherwise, just return the value
|
216
|
+
# @param [Object] value Any valid value
|
217
|
+
# @return [Hash] Returns the value in the form of hash
|
218
|
+
def _to_hash(value)
|
219
|
+
if value.is_a?(Array)
|
220
|
+
value.compact.map { |v| _to_hash(v) }
|
221
|
+
elsif value.is_a?(Hash)
|
222
|
+
{}.tap do |hash|
|
223
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
224
|
+
end
|
225
|
+
elsif value.respond_to? :to_hash
|
226
|
+
value.to_hash
|
227
|
+
else
|
228
|
+
value
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
end
|
233
|
+
|
234
|
+
end
|
@@ -329,6 +329,18 @@ module MuxRuby
|
|
329
329
|
|
330
330
|
attr_accessor :video_startup_business_exception_error_type_id
|
331
331
|
|
332
|
+
attr_accessor :playback_failure
|
333
|
+
|
334
|
+
attr_accessor :ad_playback_failure_error_type_id
|
335
|
+
|
336
|
+
attr_accessor :view_content_startup_time
|
337
|
+
|
338
|
+
attr_accessor :ad_preroll_startup_time
|
339
|
+
|
340
|
+
attr_accessor :ad_watch_time
|
341
|
+
|
342
|
+
attr_accessor :view_content_watch_time
|
343
|
+
|
332
344
|
# Attribute mapping from ruby-style variable name to JSON key.
|
333
345
|
def self.attribute_map
|
334
346
|
{
|
@@ -488,7 +500,13 @@ module MuxRuby
|
|
488
500
|
:'long_rebuffering' => :'long_rebuffering',
|
489
501
|
:'playback_failure_error_type_id' => :'playback_failure_error_type_id',
|
490
502
|
:'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'
|
503
|
+
:'video_startup_business_exception_error_type_id' => :'video_startup_business_exception_error_type_id',
|
504
|
+
:'playback_failure' => :'playback_failure',
|
505
|
+
:'ad_playback_failure_error_type_id' => :'ad_playback_failure_error_type_id',
|
506
|
+
:'view_content_startup_time' => :'view_content_startup_time',
|
507
|
+
:'ad_preroll_startup_time' => :'ad_preroll_startup_time',
|
508
|
+
:'ad_watch_time' => :'ad_watch_time',
|
509
|
+
:'view_content_watch_time' => :'view_content_watch_time'
|
492
510
|
}
|
493
511
|
end
|
494
512
|
|
@@ -656,7 +674,13 @@ module MuxRuby
|
|
656
674
|
:'long_rebuffering' => :'Boolean',
|
657
675
|
:'playback_failure_error_type_id' => :'Integer',
|
658
676
|
:'playback_business_exception_error_type_id' => :'Integer',
|
659
|
-
:'video_startup_business_exception_error_type_id' => :'Integer'
|
677
|
+
:'video_startup_business_exception_error_type_id' => :'Integer',
|
678
|
+
:'playback_failure' => :'Boolean',
|
679
|
+
:'ad_playback_failure_error_type_id' => :'Integer',
|
680
|
+
:'view_content_startup_time' => :'Integer',
|
681
|
+
:'ad_preroll_startup_time' => :'Integer',
|
682
|
+
:'ad_watch_time' => :'Integer',
|
683
|
+
:'view_content_watch_time' => :'Integer'
|
660
684
|
}
|
661
685
|
end
|
662
686
|
|
@@ -795,6 +819,14 @@ module MuxRuby
|
|
795
819
|
:'ad_startup_error_percentage',
|
796
820
|
:'ad_exit_before_start_count',
|
797
821
|
:'ad_exit_before_start_percentage',
|
822
|
+
:'playback_failure_error_type_id',
|
823
|
+
:'playback_business_exception_error_type_id',
|
824
|
+
:'video_startup_business_exception_error_type_id',
|
825
|
+
:'ad_playback_failure_error_type_id',
|
826
|
+
:'view_content_startup_time',
|
827
|
+
:'ad_preroll_startup_time',
|
828
|
+
:'ad_watch_time',
|
829
|
+
:'view_content_watch_time'
|
798
830
|
])
|
799
831
|
end
|
800
832
|
|
@@ -1442,6 +1474,30 @@ module MuxRuby
|
|
1442
1474
|
if attributes.key?(:'video_startup_business_exception_error_type_id')
|
1443
1475
|
self.video_startup_business_exception_error_type_id = attributes[:'video_startup_business_exception_error_type_id']
|
1444
1476
|
end
|
1477
|
+
|
1478
|
+
if attributes.key?(:'playback_failure')
|
1479
|
+
self.playback_failure = attributes[:'playback_failure']
|
1480
|
+
end
|
1481
|
+
|
1482
|
+
if attributes.key?(:'ad_playback_failure_error_type_id')
|
1483
|
+
self.ad_playback_failure_error_type_id = attributes[:'ad_playback_failure_error_type_id']
|
1484
|
+
end
|
1485
|
+
|
1486
|
+
if attributes.key?(:'view_content_startup_time')
|
1487
|
+
self.view_content_startup_time = attributes[:'view_content_startup_time']
|
1488
|
+
end
|
1489
|
+
|
1490
|
+
if attributes.key?(:'ad_preroll_startup_time')
|
1491
|
+
self.ad_preroll_startup_time = attributes[:'ad_preroll_startup_time']
|
1492
|
+
end
|
1493
|
+
|
1494
|
+
if attributes.key?(:'ad_watch_time')
|
1495
|
+
self.ad_watch_time = attributes[:'ad_watch_time']
|
1496
|
+
end
|
1497
|
+
|
1498
|
+
if attributes.key?(:'view_content_watch_time')
|
1499
|
+
self.view_content_watch_time = attributes[:'view_content_watch_time']
|
1500
|
+
end
|
1445
1501
|
end
|
1446
1502
|
|
1447
1503
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -1618,7 +1674,13 @@ module MuxRuby
|
|
1618
1674
|
long_rebuffering == o.long_rebuffering &&
|
1619
1675
|
playback_failure_error_type_id == o.playback_failure_error_type_id &&
|
1620
1676
|
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
|
1677
|
+
video_startup_business_exception_error_type_id == o.video_startup_business_exception_error_type_id &&
|
1678
|
+
playback_failure == o.playback_failure &&
|
1679
|
+
ad_playback_failure_error_type_id == o.ad_playback_failure_error_type_id &&
|
1680
|
+
view_content_startup_time == o.view_content_startup_time &&
|
1681
|
+
ad_preroll_startup_time == o.ad_preroll_startup_time &&
|
1682
|
+
ad_watch_time == o.ad_watch_time &&
|
1683
|
+
view_content_watch_time == o.view_content_watch_time
|
1622
1684
|
end
|
1623
1685
|
|
1624
1686
|
# @see the `==` method
|
@@ -1630,7 +1692,7 @@ module MuxRuby
|
|
1630
1692
|
# Calculates hash code according to all attributes.
|
1631
1693
|
# @return [Integer] Hash code
|
1632
1694
|
def 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
|
1695
|
+
[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, playback_failure, ad_playback_failure_error_type_id, view_content_startup_time, ad_preroll_startup_time, ad_watch_time, view_content_watch_time].hash
|
1634
1696
|
end
|
1635
1697
|
|
1636
1698
|
# Builds the object from hash
|
data/lib/mux_ruby/version.rb
CHANGED
data/lib/mux_ruby.rb
CHANGED
@@ -46,6 +46,8 @@ require 'mux_ruby/models/create_track_response'
|
|
46
46
|
require 'mux_ruby/models/create_transcription_vocabulary_request'
|
47
47
|
require 'mux_ruby/models/create_upload_request'
|
48
48
|
require 'mux_ruby/models/create_web_input_request'
|
49
|
+
require 'mux_ruby/models/drm_configuration'
|
50
|
+
require 'mux_ruby/models/drm_configuration_response'
|
49
51
|
require 'mux_ruby/models/delivery_report'
|
50
52
|
require 'mux_ruby/models/delivery_report_delivered_seconds_by_resolution'
|
51
53
|
require 'mux_ruby/models/dimension_value'
|
@@ -90,6 +92,7 @@ require 'mux_ruby/models/list_all_metric_values_response'
|
|
90
92
|
require 'mux_ruby/models/list_assets_response'
|
91
93
|
require 'mux_ruby/models/list_breakdown_values_response'
|
92
94
|
require 'mux_ruby/models/list_breakdown_values_response_meta'
|
95
|
+
require 'mux_ruby/models/list_drm_configurations_response'
|
93
96
|
require 'mux_ruby/models/list_delivery_usage_response'
|
94
97
|
require 'mux_ruby/models/list_dimension_values_response'
|
95
98
|
require 'mux_ruby/models/list_dimensions_response'
|
@@ -162,13 +165,17 @@ require 'mux_ruby/models/update_asset_master_access_request'
|
|
162
165
|
require 'mux_ruby/models/update_asset_request'
|
163
166
|
require 'mux_ruby/models/update_live_stream_embedded_subtitles_request'
|
164
167
|
require 'mux_ruby/models/update_live_stream_generated_subtitles_request'
|
168
|
+
require 'mux_ruby/models/update_live_stream_new_asset_settings'
|
165
169
|
require 'mux_ruby/models/update_live_stream_request'
|
166
170
|
require 'mux_ruby/models/update_referrer_domain_restriction_request'
|
167
171
|
require 'mux_ruby/models/update_transcription_vocabulary_request'
|
172
|
+
require 'mux_ruby/models/update_user_agent_restriction_request'
|
168
173
|
require 'mux_ruby/models/update_web_input_url_request'
|
169
174
|
require 'mux_ruby/models/upload'
|
170
175
|
require 'mux_ruby/models/upload_error'
|
171
176
|
require 'mux_ruby/models/upload_response'
|
177
|
+
require 'mux_ruby/models/user_agent_restriction_request'
|
178
|
+
require 'mux_ruby/models/user_agent_restriction_settings'
|
172
179
|
require 'mux_ruby/models/video_view'
|
173
180
|
require 'mux_ruby/models/video_view_event'
|
174
181
|
require 'mux_ruby/models/video_view_response'
|
@@ -177,6 +184,7 @@ require 'mux_ruby/models/web_input_response'
|
|
177
184
|
|
178
185
|
# APIs
|
179
186
|
require 'mux_ruby/api/assets_api'
|
187
|
+
require 'mux_ruby/api/drm_configurations_api'
|
180
188
|
require 'mux_ruby/api/delivery_usage_api'
|
181
189
|
require 'mux_ruby/api/dimensions_api'
|
182
190
|
require 'mux_ruby/api/direct_uploads_api'
|