mux_ruby 3.20.0 → 5.0.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 (99) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +4 -4
  4. data/docs/Asset.md +4 -2
  5. data/docs/AssetMetadata.md +22 -0
  6. data/docs/AssetStaticRenditions.md +2 -2
  7. data/docs/AssetsApi.md +146 -1
  8. data/docs/CreateAssetRequest.md +14 -6
  9. data/docs/CreateLiveStreamRequest.md +4 -2
  10. data/docs/CreateStaticRenditionRequest.md +20 -0
  11. data/docs/CreateStaticRenditionResponse.md +18 -0
  12. data/docs/InputSettings.md +1 -1
  13. data/docs/LiveStreamsApi.md +143 -0
  14. data/docs/PlaybackRestrictionsApi.md +1 -1
  15. data/docs/StaticRendition.md +40 -0
  16. data/docs/UpdateAssetRequest.md +4 -2
  17. data/docs/UpdateLiveStreamNewAssetSettings.md +6 -2
  18. data/docs/UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.md +18 -0
  19. data/docs/UpdateReferrerDomainRestrictionRequest.md +10 -37
  20. data/docs/Upload.md +1 -1
  21. data/docs/VideoView.md +35 -1
  22. data/examples/video/exercise-assets.rb +1 -1
  23. data/gen/generator-config.json +1 -1
  24. data/lib/mux_ruby/api/assets_api.rb +140 -2
  25. data/lib/mux_ruby/api/live_streams_api.rb +132 -0
  26. data/lib/mux_ruby/api/metrics_api.rb +2 -2
  27. data/lib/mux_ruby/models/asset.rb +14 -5
  28. data/lib/mux_ruby/models/{space_response.rb → asset_metadata.rb} +74 -13
  29. data/lib/mux_ruby/models/asset_static_renditions.rb +2 -2
  30. data/lib/mux_ruby/models/create_asset_request.rb +54 -9
  31. data/lib/mux_ruby/models/create_live_stream_request.rb +15 -2
  32. data/lib/mux_ruby/models/{create_broadcast_request.rb → create_static_rendition_request.rb} +49 -53
  33. data/lib/mux_ruby/models/{start_space_broadcast_response.rb → create_static_rendition_response.rb} +4 -4
  34. data/lib/mux_ruby/models/input_settings.rb +1 -1
  35. data/lib/mux_ruby/models/{asset_static_renditions_files.rb → static_rendition.rb} +118 -9
  36. data/lib/mux_ruby/models/update_asset_request.rb +14 -5
  37. data/lib/mux_ruby/models/update_live_stream_new_asset_settings.rb +37 -6
  38. data/lib/mux_ruby/models/{list_spaces_response.rb → update_live_stream_new_asset_settings_static_renditions_request.rb} +11 -16
  39. data/lib/mux_ruby/models/update_referrer_domain_restriction_request.rb +203 -73
  40. data/lib/mux_ruby/models/upload.rb +1 -1
  41. data/lib/mux_ruby/models/video_view.rb +171 -4
  42. data/lib/mux_ruby/version.rb +1 -1
  43. data/lib/mux_ruby.rb +5 -16
  44. data/spec/models/asset_metadata_spec.rb +46 -0
  45. data/spec/models/create_static_rendition_request_spec.rb +44 -0
  46. data/spec/models/create_static_rendition_response_spec.rb +34 -0
  47. data/spec/models/static_rendition_spec.rb +124 -0
  48. data/spec/models/update_live_stream_new_asset_settings_static_renditions_request_spec.rb +34 -0
  49. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/byebug/byebug.so +0 -0
  50. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/gem_make.out +8 -8
  51. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.16.3/ffi_c.so +0 -0
  52. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.16.3/gem_make.out +6 -6
  53. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.16.3/mkmf.log +19 -19
  54. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +7 -7
  55. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/jaro_winkler/jaro_winkler_ext.so +0 -0
  56. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-4.0.4/gem_make.out +6 -6
  57. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-4.0.4/mkmf.log +5 -5
  58. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-4.0.4/psych.so +0 -0
  59. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.2/gem_make.out +6 -6
  60. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.2/mkmf.log +2 -2
  61. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.2/stringio.so +0 -0
  62. data/vendor/bundle/ruby/3.2.0/gems/byebug-11.1.3/ext/byebug/Makefile +3 -3
  63. data/vendor/bundle/ruby/3.2.0/gems/byebug-11.1.3/lib/byebug/byebug.so +0 -0
  64. data/vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/Makefile +3 -3
  65. data/vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/lib/ffi_c.so +0 -0
  66. data/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.6/ext/jaro_winkler/Makefile +3 -3
  67. data/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.6/lib/jaro_winkler/jaro_winkler_ext.so +0 -0
  68. data/vendor/bundle/ruby/3.2.0/gems/psych-4.0.4/ext/psych/Makefile +3 -3
  69. data/vendor/bundle/ruby/3.2.0/gems/psych-4.0.4/lib/psych.so +0 -0
  70. data/vendor/bundle/ruby/3.2.0/gems/stringio-3.0.2/ext/stringio/Makefile +3 -3
  71. data/vendor/bundle/ruby/3.2.0/gems/stringio-3.0.2/lib/stringio.so +0 -0
  72. metadata +184 -199
  73. data/docs/AssetStaticRenditionsFiles.md +0 -28
  74. data/docs/Broadcast.md +0 -30
  75. data/docs/BroadcastLayout.md +0 -15
  76. data/docs/BroadcastResolution.md +0 -15
  77. data/docs/BroadcastResponse.md +0 -18
  78. data/docs/BroadcastStatus.md +0 -15
  79. data/docs/CreateBroadcastRequest.md +0 -26
  80. data/docs/CreateSpaceRequest.md +0 -22
  81. data/docs/ListSpacesResponse.md +0 -18
  82. data/docs/Space.md +0 -30
  83. data/docs/SpaceResponse.md +0 -18
  84. data/docs/SpaceStatus.md +0 -15
  85. data/docs/SpaceType.md +0 -15
  86. data/docs/SpacesApi.md +0 -658
  87. data/docs/StartSpaceBroadcastResponse.md +0 -18
  88. data/docs/StopSpaceBroadcastResponse.md +0 -18
  89. data/lib/mux_ruby/api/spaces_api.rb +0 -619
  90. data/lib/mux_ruby/models/broadcast.rb +0 -305
  91. data/lib/mux_ruby/models/broadcast_layout.rb +0 -38
  92. data/lib/mux_ruby/models/broadcast_resolution.rb +0 -41
  93. data/lib/mux_ruby/models/broadcast_response.rb +0 -223
  94. data/lib/mux_ruby/models/broadcast_status.rb +0 -37
  95. data/lib/mux_ruby/models/create_space_request.rb +0 -242
  96. data/lib/mux_ruby/models/space.rb +0 -301
  97. data/lib/mux_ruby/models/space_status.rb +0 -37
  98. data/lib/mux_ruby/models/space_type.rb +0 -36
  99. data/lib/mux_ruby/models/stop_space_broadcast_response.rb +0 -218
@@ -14,7 +14,8 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MuxRuby
17
- class AssetStaticRenditionsFiles
17
+ class StaticRendition
18
+ # Name of the static rendition file
18
19
  attr_accessor :name
19
20
 
20
21
  # Extension of the static rendition file
@@ -32,6 +33,24 @@ module MuxRuby
32
33
  # The file size in bytes
33
34
  attr_accessor :filesize
34
35
 
36
+ # Indicates the static rendition type of this specific MP4 version of this asset. This field is only valid for `static_renditions`, not for `mp4_support`.
37
+ attr_accessor :type
38
+
39
+ # Indicates the status of this specific MP4 version of this asset. This field is only valid for `static_renditions`, not for `mp4_support`. * `ready` indicates the MP4 has been generated and is ready for download * `preparing` indicates the asset has not been ingested or the static rendition is still being generated after an asset is ready * `skipped` indicates the static rendition will not be generated because the requested resolution conflicts with the asset attributes after the asset has been ingested * `errored` indicates the static rendition cannot be generated. For example, an asset could not be ingested
40
+ attr_accessor :status
41
+
42
+ # Indicates the resolution tier of this specific MP4 version of this asset. This field is only valid for `static_renditions`, not for `mp4_support`.
43
+ attr_accessor :resolution_tier
44
+
45
+ # Indicates the resolution of this specific MP4 version of this asset. This field is only valid for `static_renditions`, not for `mp4_support`.
46
+ attr_accessor :resolution
47
+
48
+ # The ID of this static rendition, used in managing this static rendition. This field is only valid for `static_renditions`, not for `mp4_support`.
49
+ attr_accessor :id
50
+
51
+ # Arbitrary user-supplied metadata set for the static rendition. Max 255 characters.
52
+ attr_accessor :passthrough
53
+
35
54
  class EnumAttributeValidator
36
55
  attr_reader :datatype
37
56
  attr_reader :allowable_values
@@ -62,7 +81,13 @@ module MuxRuby
62
81
  :'height' => :'height',
63
82
  :'width' => :'width',
64
83
  :'bitrate' => :'bitrate',
65
- :'filesize' => :'filesize'
84
+ :'filesize' => :'filesize',
85
+ :'type' => :'type',
86
+ :'status' => :'status',
87
+ :'resolution_tier' => :'resolution_tier',
88
+ :'resolution' => :'resolution',
89
+ :'id' => :'id',
90
+ :'passthrough' => :'passthrough'
66
91
  }
67
92
  end
68
93
 
@@ -79,7 +104,13 @@ module MuxRuby
79
104
  :'height' => :'Integer',
80
105
  :'width' => :'Integer',
81
106
  :'bitrate' => :'Integer',
82
- :'filesize' => :'String'
107
+ :'filesize' => :'String',
108
+ :'type' => :'String',
109
+ :'status' => :'String',
110
+ :'resolution_tier' => :'String',
111
+ :'resolution' => :'String',
112
+ :'id' => :'String',
113
+ :'passthrough' => :'String'
83
114
  }
84
115
  end
85
116
 
@@ -93,13 +124,13 @@ module MuxRuby
93
124
  # @param [Hash] attributes Model attributes in the form of hash
94
125
  def initialize(attributes = {})
95
126
  if (!attributes.is_a?(Hash))
96
- fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::AssetStaticRenditionsFiles` initialize method"
127
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::StaticRendition` initialize method"
97
128
  end
98
129
 
99
130
  # check to see if the attribute exists and convert string to symbol for hash key
100
131
  attributes = attributes.each_with_object({}) { |(k, v), h|
101
132
  if (!self.class.attribute_map.key?(k.to_sym))
102
- fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::AssetStaticRenditionsFiles`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
133
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::StaticRendition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
103
134
  end
104
135
  h[k.to_sym] = v
105
136
  }
@@ -127,6 +158,30 @@ module MuxRuby
127
158
  if attributes.key?(:'filesize')
128
159
  self.filesize = attributes[:'filesize']
129
160
  end
161
+
162
+ if attributes.key?(:'type')
163
+ self.type = attributes[:'type']
164
+ end
165
+
166
+ if attributes.key?(:'status')
167
+ self.status = attributes[:'status']
168
+ end
169
+
170
+ if attributes.key?(:'resolution_tier')
171
+ self.resolution_tier = attributes[:'resolution_tier']
172
+ end
173
+
174
+ if attributes.key?(:'resolution')
175
+ self.resolution = attributes[:'resolution']
176
+ end
177
+
178
+ if attributes.key?(:'id')
179
+ self.id = attributes[:'id']
180
+ end
181
+
182
+ if attributes.key?(:'passthrough')
183
+ self.passthrough = attributes[:'passthrough']
184
+ end
130
185
  end
131
186
 
132
187
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -139,17 +194,25 @@ module MuxRuby
139
194
  # Check to see if the all the properties in the model are valid
140
195
  # @return true if the model is valid
141
196
  def valid?
142
- name_validator = EnumAttributeValidator.new('String', ["low.mp4", "medium.mp4", "high.mp4", "audio.m4a", "capped-1080p.mp4"])
197
+ name_validator = EnumAttributeValidator.new('String', ["low.mp4", "medium.mp4", "high.mp4", "highest.mp4", "audio.m4a", "capped-1080p.mp4", "2160p.mp4", "1440p.mp4", "1080p.mp4", "720p.mp4", "540p.mp4", "480p.mp4", "360p.mp4", "270p.mp4"])
143
198
  return false unless name_validator.valid?(@name)
144
199
  ext_validator = EnumAttributeValidator.new('String', ["mp4", "m4a"])
145
200
  return false unless ext_validator.valid?(@ext)
201
+ type_validator = EnumAttributeValidator.new('String', ["standard", "advanced"])
202
+ return false unless type_validator.valid?(@type)
203
+ status_validator = EnumAttributeValidator.new('String', ["ready", "preparing", "skipped", "errored"])
204
+ return false unless status_validator.valid?(@status)
205
+ resolution_tier_validator = EnumAttributeValidator.new('String', ["2160p", "1440p", "1080p", "720p"])
206
+ return false unless resolution_tier_validator.valid?(@resolution_tier)
207
+ resolution_validator = EnumAttributeValidator.new('String', ["highest", "audio-only", "2160p", "1440p", "1080p", "720p", "540p", "480p", "360p", "270p"])
208
+ return false unless resolution_validator.valid?(@resolution)
146
209
  true
147
210
  end
148
211
 
149
212
  # Custom attribute writer method checking allowed values (enum).
150
213
  # @param [Object] name Object to be assigned
151
214
  def name=(name)
152
- validator = EnumAttributeValidator.new('String', ["low.mp4", "medium.mp4", "high.mp4", "audio.m4a", "capped-1080p.mp4"])
215
+ validator = EnumAttributeValidator.new('String', ["low.mp4", "medium.mp4", "high.mp4", "highest.mp4", "audio.m4a", "capped-1080p.mp4", "2160p.mp4", "1440p.mp4", "1080p.mp4", "720p.mp4", "540p.mp4", "480p.mp4", "360p.mp4", "270p.mp4"])
153
216
  unless validator.valid?(name)
154
217
  fail ArgumentError, "invalid value for \"name\", must be one of #{validator.allowable_values}."
155
218
  end
@@ -166,6 +229,46 @@ module MuxRuby
166
229
  @ext = ext
167
230
  end
168
231
 
232
+ # Custom attribute writer method checking allowed values (enum).
233
+ # @param [Object] type Object to be assigned
234
+ def type=(type)
235
+ validator = EnumAttributeValidator.new('String', ["standard", "advanced"])
236
+ unless validator.valid?(type)
237
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
238
+ end
239
+ @type = type
240
+ end
241
+
242
+ # Custom attribute writer method checking allowed values (enum).
243
+ # @param [Object] status Object to be assigned
244
+ def status=(status)
245
+ validator = EnumAttributeValidator.new('String', ["ready", "preparing", "skipped", "errored"])
246
+ unless validator.valid?(status)
247
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
248
+ end
249
+ @status = status
250
+ end
251
+
252
+ # Custom attribute writer method checking allowed values (enum).
253
+ # @param [Object] resolution_tier Object to be assigned
254
+ def resolution_tier=(resolution_tier)
255
+ validator = EnumAttributeValidator.new('String', ["2160p", "1440p", "1080p", "720p"])
256
+ unless validator.valid?(resolution_tier)
257
+ fail ArgumentError, "invalid value for \"resolution_tier\", must be one of #{validator.allowable_values}."
258
+ end
259
+ @resolution_tier = resolution_tier
260
+ end
261
+
262
+ # Custom attribute writer method checking allowed values (enum).
263
+ # @param [Object] resolution Object to be assigned
264
+ def resolution=(resolution)
265
+ validator = EnumAttributeValidator.new('String', ["highest", "audio-only", "2160p", "1440p", "1080p", "720p", "540p", "480p", "360p", "270p"])
266
+ unless validator.valid?(resolution)
267
+ fail ArgumentError, "invalid value for \"resolution\", must be one of #{validator.allowable_values}."
268
+ end
269
+ @resolution = resolution
270
+ end
271
+
169
272
  # Checks equality by comparing each attribute.
170
273
  # @param [Object] Object to be compared
171
274
  def ==(o)
@@ -176,7 +279,13 @@ module MuxRuby
176
279
  height == o.height &&
177
280
  width == o.width &&
178
281
  bitrate == o.bitrate &&
179
- filesize == o.filesize
282
+ filesize == o.filesize &&
283
+ type == o.type &&
284
+ status == o.status &&
285
+ resolution_tier == o.resolution_tier &&
286
+ resolution == o.resolution &&
287
+ id == o.id &&
288
+ passthrough == o.passthrough
180
289
  end
181
290
 
182
291
  # @see the `==` method
@@ -188,7 +297,7 @@ module MuxRuby
188
297
  # Calculates hash code according to all attributes.
189
298
  # @return [Integer] Hash code
190
299
  def hash
191
- [name, ext, height, width, bitrate, filesize].hash
300
+ [name, ext, height, width, bitrate, filesize, type, status, resolution_tier, resolution, id, passthrough].hash
192
301
  end
193
302
 
194
303
  # Builds the object from hash
@@ -15,13 +15,16 @@ require 'time'
15
15
 
16
16
  module MuxRuby
17
17
  class UpdateAssetRequest
18
- # Arbitrary metadata set for the Asset. Max 255 characters. In order to clear this value, the field should be included with an empty string value.
18
+ # You can set this field to anything you want. It will be included in the asset details and related webhooks. If you're looking for more structured metadata, such as `title` or `external_id` , you can use the `meta` object instead. **Max: 255 characters**. In order to clear this value, the field should be included with an empty string value.
19
19
  attr_accessor :passthrough
20
20
 
21
+ attr_accessor :meta
22
+
21
23
  # Attribute mapping from ruby-style variable name to JSON key.
22
24
  def self.attribute_map
23
25
  {
24
- :'passthrough' => :'passthrough'
26
+ :'passthrough' => :'passthrough',
27
+ :'meta' => :'meta'
25
28
  }
26
29
  end
27
30
 
@@ -33,7 +36,8 @@ module MuxRuby
33
36
  # Attribute type mapping.
34
37
  def self.openapi_types
35
38
  {
36
- :'passthrough' => :'String'
39
+ :'passthrough' => :'String',
40
+ :'meta' => :'AssetMetadata'
37
41
  }
38
42
  end
39
43
 
@@ -61,6 +65,10 @@ module MuxRuby
61
65
  if attributes.key?(:'passthrough')
62
66
  self.passthrough = attributes[:'passthrough']
63
67
  end
68
+
69
+ if attributes.key?(:'meta')
70
+ self.meta = attributes[:'meta']
71
+ end
64
72
  end
65
73
 
66
74
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -81,7 +89,8 @@ module MuxRuby
81
89
  def ==(o)
82
90
  return true if self.equal?(o)
83
91
  self.class == o.class &&
84
- passthrough == o.passthrough
92
+ passthrough == o.passthrough &&
93
+ meta == o.meta
85
94
  end
86
95
 
87
96
  # @see the `==` method
@@ -93,7 +102,7 @@ module MuxRuby
93
102
  # Calculates hash code according to all attributes.
94
103
  # @return [Integer] Hash code
95
104
  def hash
96
- [passthrough].hash
105
+ [passthrough, meta].hash
97
106
  end
98
107
 
99
108
  # Builds the object from hash
@@ -14,14 +14,19 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MuxRuby
17
- # Updates the new asset settings to use to generate a new asset for this live stream. Only the `mp4_support` and `master_access` settings may be updated.
17
+ # Updates the new asset settings to use to generate a new asset for this live stream. Only the `mp4_support`, `master_access`, and `video_quality` settings may be updated.
18
18
  class UpdateLiveStreamNewAssetSettings
19
- # Specify what level of support for mp4 playback should be added to new assets generated from this live stream. * The `none` option disables MP4 support for new assets. MP4 files will not be produced for an asset generated from this live stream. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. * The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset).
19
+ # Deprecated. See the [Static Renditions API](https://www.mux.com/docs/guides/enable-static-mp4-renditions#during-live-stream-creation) for the updated API. Specify what level of support for mp4 playback should be added to new assets generated from this live stream. * The `none` option disables MP4 support for new assets. MP4 files will not be produced for an asset generated from this live stream. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. * The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset).
20
20
  attr_accessor :mp4_support
21
21
 
22
22
  # Add or remove access to the master version of the video.
23
23
  attr_accessor :master_access
24
24
 
25
+ # The video quality controls the cost, quality, and available platform features for the asset. [See the video quality guide for more details.](https://docs.mux.com/guides/use-video-quality-levels)
26
+ attr_accessor :video_quality
27
+
28
+ attr_accessor :meta
29
+
25
30
  class EnumAttributeValidator
26
31
  attr_reader :datatype
27
32
  attr_reader :allowable_values
@@ -48,7 +53,9 @@ module MuxRuby
48
53
  def self.attribute_map
49
54
  {
50
55
  :'mp4_support' => :'mp4_support',
51
- :'master_access' => :'master_access'
56
+ :'master_access' => :'master_access',
57
+ :'video_quality' => :'video_quality',
58
+ :'meta' => :'meta'
52
59
  }
53
60
  end
54
61
 
@@ -61,7 +68,9 @@ module MuxRuby
61
68
  def self.openapi_types
62
69
  {
63
70
  :'mp4_support' => :'String',
64
- :'master_access' => :'String'
71
+ :'master_access' => :'String',
72
+ :'video_quality' => :'String',
73
+ :'meta' => :'AssetMetadata'
65
74
  }
66
75
  end
67
76
 
@@ -93,6 +102,14 @@ module MuxRuby
93
102
  if attributes.key?(:'master_access')
94
103
  self.master_access = attributes[:'master_access']
95
104
  end
105
+
106
+ if attributes.key?(:'video_quality')
107
+ self.video_quality = attributes[:'video_quality']
108
+ end
109
+
110
+ if attributes.key?(:'meta')
111
+ self.meta = attributes[:'meta']
112
+ end
96
113
  end
97
114
 
98
115
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -109,6 +126,8 @@ module MuxRuby
109
126
  return false unless mp4_support_validator.valid?(@mp4_support)
110
127
  master_access_validator = EnumAttributeValidator.new('String', ["temporary", "none"])
111
128
  return false unless master_access_validator.valid?(@master_access)
129
+ video_quality_validator = EnumAttributeValidator.new('String', ["plus", "premium"])
130
+ return false unless video_quality_validator.valid?(@video_quality)
112
131
  true
113
132
  end
114
133
 
@@ -132,13 +151,25 @@ module MuxRuby
132
151
  @master_access = master_access
133
152
  end
134
153
 
154
+ # Custom attribute writer method checking allowed values (enum).
155
+ # @param [Object] video_quality Object to be assigned
156
+ def video_quality=(video_quality)
157
+ validator = EnumAttributeValidator.new('String', ["plus", "premium"])
158
+ unless validator.valid?(video_quality)
159
+ fail ArgumentError, "invalid value for \"video_quality\", must be one of #{validator.allowable_values}."
160
+ end
161
+ @video_quality = video_quality
162
+ end
163
+
135
164
  # Checks equality by comparing each attribute.
136
165
  # @param [Object] Object to be compared
137
166
  def ==(o)
138
167
  return true if self.equal?(o)
139
168
  self.class == o.class &&
140
169
  mp4_support == o.mp4_support &&
141
- master_access == o.master_access
170
+ master_access == o.master_access &&
171
+ video_quality == o.video_quality &&
172
+ meta == o.meta
142
173
  end
143
174
 
144
175
  # @see the `==` method
@@ -150,7 +181,7 @@ module MuxRuby
150
181
  # Calculates hash code according to all attributes.
151
182
  # @return [Integer] Hash code
152
183
  def hash
153
- [mp4_support, master_access].hash
184
+ [mp4_support, master_access, video_quality, meta].hash
154
185
  end
155
186
 
156
187
  # Builds the object from hash
@@ -14,13 +14,13 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MuxRuby
17
- class ListSpacesResponse
18
- attr_accessor :data
17
+ class UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest
18
+ attr_accessor :static_renditions
19
19
 
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
21
21
  def self.attribute_map
22
22
  {
23
- :'data' => :'data'
23
+ :'static_renditions' => :'static_renditions'
24
24
  }
25
25
  end
26
26
 
@@ -32,7 +32,7 @@ module MuxRuby
32
32
  # Attribute type mapping.
33
33
  def self.openapi_types
34
34
  {
35
- :'data' => :'Array<Space>'
35
+ :'static_renditions' => :'Array<CreateStaticRenditionRequest>'
36
36
  }
37
37
  end
38
38
 
@@ -46,20 +46,20 @@ module MuxRuby
46
46
  # @param [Hash] attributes Model attributes in the form of hash
47
47
  def initialize(attributes = {})
48
48
  if (!attributes.is_a?(Hash))
49
- fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::ListSpacesResponse` initialize method"
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest` initialize method"
50
50
  end
51
51
 
52
52
  # check to see if the attribute exists and convert string to symbol for hash key
53
53
  attributes = attributes.each_with_object({}) { |(k, v), h|
54
54
  if (!self.class.attribute_map.key?(k.to_sym))
55
- fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::ListSpacesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
56
  end
57
57
  h[k.to_sym] = v
58
58
  }
59
59
 
60
- if attributes.key?(:'data')
61
- if (value = attributes[:'data']).is_a?(Array)
62
- self.data = value
60
+ if attributes.key?(:'static_renditions')
61
+ if (value = attributes[:'static_renditions']).is_a?(Array)
62
+ self.static_renditions = value
63
63
  end
64
64
  end
65
65
  end
@@ -68,17 +68,12 @@ module MuxRuby
68
68
  # @return Array for valid properties with the reasons
69
69
  def list_invalid_properties
70
70
  invalid_properties = Array.new
71
- if @data.nil?
72
- invalid_properties.push('invalid value for "data", data cannot be nil.')
73
- end
74
-
75
71
  invalid_properties
76
72
  end
77
73
 
78
74
  # Check to see if the all the properties in the model are valid
79
75
  # @return true if the model is valid
80
76
  def valid?
81
- return false if @data.nil?
82
77
  true
83
78
  end
84
79
 
@@ -87,7 +82,7 @@ module MuxRuby
87
82
  def ==(o)
88
83
  return true if self.equal?(o)
89
84
  self.class == o.class &&
90
- data == o.data
85
+ static_renditions == o.static_renditions
91
86
  end
92
87
 
93
88
  # @see the `==` method
@@ -99,7 +94,7 @@ module MuxRuby
99
94
  # Calculates hash code according to all attributes.
100
95
  # @return [Integer] Hash code
101
96
  def hash
102
- [data].hash
97
+ [static_renditions].hash
103
98
  end
104
99
 
105
100
  # Builds the object from hash