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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +4 -4
- data/docs/Asset.md +4 -2
- data/docs/AssetMetadata.md +22 -0
- data/docs/AssetStaticRenditions.md +2 -2
- data/docs/AssetsApi.md +146 -1
- data/docs/CreateAssetRequest.md +14 -6
- data/docs/CreateLiveStreamRequest.md +4 -2
- data/docs/CreateStaticRenditionRequest.md +20 -0
- data/docs/CreateStaticRenditionResponse.md +18 -0
- data/docs/InputSettings.md +1 -1
- data/docs/LiveStreamsApi.md +143 -0
- data/docs/PlaybackRestrictionsApi.md +1 -1
- data/docs/StaticRendition.md +40 -0
- data/docs/UpdateAssetRequest.md +4 -2
- data/docs/UpdateLiveStreamNewAssetSettings.md +6 -2
- data/docs/UpdateLiveStreamNewAssetSettingsStaticRenditionsRequest.md +18 -0
- data/docs/UpdateReferrerDomainRestrictionRequest.md +10 -37
- data/docs/Upload.md +1 -1
- data/docs/VideoView.md +35 -1
- data/examples/video/exercise-assets.rb +1 -1
- data/gen/generator-config.json +1 -1
- data/lib/mux_ruby/api/assets_api.rb +140 -2
- data/lib/mux_ruby/api/live_streams_api.rb +132 -0
- data/lib/mux_ruby/api/metrics_api.rb +2 -2
- data/lib/mux_ruby/models/asset.rb +14 -5
- data/lib/mux_ruby/models/{space_response.rb → asset_metadata.rb} +74 -13
- data/lib/mux_ruby/models/asset_static_renditions.rb +2 -2
- data/lib/mux_ruby/models/create_asset_request.rb +54 -9
- data/lib/mux_ruby/models/create_live_stream_request.rb +15 -2
- data/lib/mux_ruby/models/{create_broadcast_request.rb → create_static_rendition_request.rb} +49 -53
- data/lib/mux_ruby/models/{start_space_broadcast_response.rb → create_static_rendition_response.rb} +4 -4
- data/lib/mux_ruby/models/input_settings.rb +1 -1
- data/lib/mux_ruby/models/{asset_static_renditions_files.rb → static_rendition.rb} +118 -9
- data/lib/mux_ruby/models/update_asset_request.rb +14 -5
- data/lib/mux_ruby/models/update_live_stream_new_asset_settings.rb +37 -6
- data/lib/mux_ruby/models/{list_spaces_response.rb → update_live_stream_new_asset_settings_static_renditions_request.rb} +11 -16
- data/lib/mux_ruby/models/update_referrer_domain_restriction_request.rb +203 -73
- data/lib/mux_ruby/models/upload.rb +1 -1
- data/lib/mux_ruby/models/video_view.rb +171 -4
- data/lib/mux_ruby/version.rb +1 -1
- data/lib/mux_ruby.rb +5 -16
- data/spec/models/asset_metadata_spec.rb +46 -0
- data/spec/models/create_static_rendition_request_spec.rb +44 -0
- data/spec/models/create_static_rendition_response_spec.rb +34 -0
- data/spec/models/static_rendition_spec.rb +124 -0
- data/spec/models/update_live_stream_new_asset_settings_static_renditions_request_spec.rb +34 -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 +8 -8
- 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 +19 -19
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +7 -7
- 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
- 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 +5 -5
- 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.6/ext/jaro_winkler/Makefile +3 -3
- data/vendor/bundle/ruby/3.2.0/gems/jaro_winkler-1.5.6/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 +184 -199
- data/docs/AssetStaticRenditionsFiles.md +0 -28
- data/docs/Broadcast.md +0 -30
- data/docs/BroadcastLayout.md +0 -15
- data/docs/BroadcastResolution.md +0 -15
- data/docs/BroadcastResponse.md +0 -18
- data/docs/BroadcastStatus.md +0 -15
- data/docs/CreateBroadcastRequest.md +0 -26
- data/docs/CreateSpaceRequest.md +0 -22
- data/docs/ListSpacesResponse.md +0 -18
- data/docs/Space.md +0 -30
- data/docs/SpaceResponse.md +0 -18
- data/docs/SpaceStatus.md +0 -15
- data/docs/SpaceType.md +0 -15
- data/docs/SpacesApi.md +0 -658
- data/docs/StartSpaceBroadcastResponse.md +0 -18
- data/docs/StopSpaceBroadcastResponse.md +0 -18
- data/lib/mux_ruby/api/spaces_api.rb +0 -619
- data/lib/mux_ruby/models/broadcast.rb +0 -305
- data/lib/mux_ruby/models/broadcast_layout.rb +0 -38
- data/lib/mux_ruby/models/broadcast_resolution.rb +0 -41
- data/lib/mux_ruby/models/broadcast_response.rb +0 -223
- data/lib/mux_ruby/models/broadcast_status.rb +0 -37
- data/lib/mux_ruby/models/create_space_request.rb +0 -242
- data/lib/mux_ruby/models/space.rb +0 -301
- data/lib/mux_ruby/models/space_status.rb +0 -37
- data/lib/mux_ruby/models/space_type.rb +0 -36
- data/lib/mux_ruby/models/stop_space_broadcast_response.rb +0 -218
@@ -14,13 +14,22 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module MuxRuby
|
17
|
-
class
|
18
|
-
|
17
|
+
class AssetMetadata
|
18
|
+
# The video title. Max 512 code points.
|
19
|
+
attr_accessor :title
|
20
|
+
|
21
|
+
# This is an identifier you provide to keep track of the creator of the video. Max 128 code points.
|
22
|
+
attr_accessor :creator_id
|
23
|
+
|
24
|
+
# This is an identifier you provide to link the video to your own data. Max 128 code points.
|
25
|
+
attr_accessor :external_id
|
19
26
|
|
20
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
21
28
|
def self.attribute_map
|
22
29
|
{
|
23
|
-
:'
|
30
|
+
:'title' => :'title',
|
31
|
+
:'creator_id' => :'creator_id',
|
32
|
+
:'external_id' => :'external_id'
|
24
33
|
}
|
25
34
|
end
|
26
35
|
|
@@ -32,7 +41,9 @@ module MuxRuby
|
|
32
41
|
# Attribute type mapping.
|
33
42
|
def self.openapi_types
|
34
43
|
{
|
35
|
-
:'
|
44
|
+
:'title' => :'String',
|
45
|
+
:'creator_id' => :'String',
|
46
|
+
:'external_id' => :'String'
|
36
47
|
}
|
37
48
|
end
|
38
49
|
|
@@ -46,19 +57,27 @@ module MuxRuby
|
|
46
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
47
58
|
def initialize(attributes = {})
|
48
59
|
if (!attributes.is_a?(Hash))
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::AssetMetadata` initialize method"
|
50
61
|
end
|
51
62
|
|
52
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
53
64
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
65
|
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::AssetMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
67
|
end
|
57
68
|
h[k.to_sym] = v
|
58
69
|
}
|
59
70
|
|
60
|
-
if attributes.key?(:'
|
61
|
-
self.
|
71
|
+
if attributes.key?(:'title')
|
72
|
+
self.title = attributes[:'title']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.key?(:'creator_id')
|
76
|
+
self.creator_id = attributes[:'creator_id']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.key?(:'external_id')
|
80
|
+
self.external_id = attributes[:'external_id']
|
62
81
|
end
|
63
82
|
end
|
64
83
|
|
@@ -66,8 +85,16 @@ module MuxRuby
|
|
66
85
|
# @return Array for valid properties with the reasons
|
67
86
|
def list_invalid_properties
|
68
87
|
invalid_properties = Array.new
|
69
|
-
if
|
70
|
-
invalid_properties.push('invalid value for "
|
88
|
+
if !@title.nil? && @title.to_s.length > 512
|
89
|
+
invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 512.')
|
90
|
+
end
|
91
|
+
|
92
|
+
if !@creator_id.nil? && @creator_id.to_s.length > 128
|
93
|
+
invalid_properties.push('invalid value for "creator_id", the character length must be smaller than or equal to 128.')
|
94
|
+
end
|
95
|
+
|
96
|
+
if !@external_id.nil? && @external_id.to_s.length > 128
|
97
|
+
invalid_properties.push('invalid value for "external_id", the character length must be smaller than or equal to 128.')
|
71
98
|
end
|
72
99
|
|
73
100
|
invalid_properties
|
@@ -76,16 +103,50 @@ module MuxRuby
|
|
76
103
|
# Check to see if the all the properties in the model are valid
|
77
104
|
# @return true if the model is valid
|
78
105
|
def valid?
|
79
|
-
return false if
|
106
|
+
return false if !@title.nil? && @title.to_s.length > 512
|
107
|
+
return false if !@creator_id.nil? && @creator_id.to_s.length > 128
|
108
|
+
return false if !@external_id.nil? && @external_id.to_s.length > 128
|
80
109
|
true
|
81
110
|
end
|
82
111
|
|
112
|
+
# Custom attribute writer method with validation
|
113
|
+
# @param [Object] title Value to be assigned
|
114
|
+
def title=(title)
|
115
|
+
if !title.nil? && title.to_s.length > 512
|
116
|
+
fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 512.'
|
117
|
+
end
|
118
|
+
|
119
|
+
@title = title
|
120
|
+
end
|
121
|
+
|
122
|
+
# Custom attribute writer method with validation
|
123
|
+
# @param [Object] creator_id Value to be assigned
|
124
|
+
def creator_id=(creator_id)
|
125
|
+
if !creator_id.nil? && creator_id.to_s.length > 128
|
126
|
+
fail ArgumentError, 'invalid value for "creator_id", the character length must be smaller than or equal to 128.'
|
127
|
+
end
|
128
|
+
|
129
|
+
@creator_id = creator_id
|
130
|
+
end
|
131
|
+
|
132
|
+
# Custom attribute writer method with validation
|
133
|
+
# @param [Object] external_id Value to be assigned
|
134
|
+
def external_id=(external_id)
|
135
|
+
if !external_id.nil? && external_id.to_s.length > 128
|
136
|
+
fail ArgumentError, 'invalid value for "external_id", the character length must be smaller than or equal to 128.'
|
137
|
+
end
|
138
|
+
|
139
|
+
@external_id = external_id
|
140
|
+
end
|
141
|
+
|
83
142
|
# Checks equality by comparing each attribute.
|
84
143
|
# @param [Object] Object to be compared
|
85
144
|
def ==(o)
|
86
145
|
return true if self.equal?(o)
|
87
146
|
self.class == o.class &&
|
88
|
-
|
147
|
+
title == o.title &&
|
148
|
+
creator_id == o.creator_id &&
|
149
|
+
external_id == o.external_id
|
89
150
|
end
|
90
151
|
|
91
152
|
# @see the `==` method
|
@@ -97,7 +158,7 @@ module MuxRuby
|
|
97
158
|
# Calculates hash code according to all attributes.
|
98
159
|
# @return [Integer] Hash code
|
99
160
|
def hash
|
100
|
-
[
|
161
|
+
[title, creator_id, external_id].hash
|
101
162
|
end
|
102
163
|
|
103
164
|
# Builds the object from hash
|
@@ -16,7 +16,7 @@ require 'time'
|
|
16
16
|
module MuxRuby
|
17
17
|
# An object containing the current status of any static renditions (mp4s). The object does not exist if no static renditions have been requested. See [Download your videos](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information.
|
18
18
|
class AssetStaticRenditions
|
19
|
-
# Indicates the status of downloadable MP4 versions of this asset.
|
19
|
+
# Indicates the status of downloadable MP4 versions of this asset. This field is only valid when `mp4_support` is enabled
|
20
20
|
attr_accessor :status
|
21
21
|
|
22
22
|
# Array of file objects.
|
@@ -61,7 +61,7 @@ module MuxRuby
|
|
61
61
|
def self.openapi_types
|
62
62
|
{
|
63
63
|
:'status' => :'String',
|
64
|
-
:'files' => :'Array<
|
64
|
+
:'files' => :'Array<StaticRendition>'
|
65
65
|
}
|
66
66
|
end
|
67
67
|
|
@@ -15,21 +15,27 @@ require 'time'
|
|
15
15
|
|
16
16
|
module MuxRuby
|
17
17
|
class CreateAssetRequest
|
18
|
-
#
|
18
|
+
# Deprecated. Use `inputs` instead, which accepts an identical type.
|
19
19
|
attr_accessor :input
|
20
20
|
|
21
|
-
# An array of
|
21
|
+
# An array of objects that each describe an input file to be used to create the asset. As a shortcut, input can also be a string URL for a file when only one input file is used. See `input[].url` for requirements.
|
22
|
+
attr_accessor :inputs
|
23
|
+
|
24
|
+
# Deprecated. Use `playback_policies` instead, which accepts an identical type.
|
22
25
|
attr_accessor :playback_policy
|
23
26
|
|
24
|
-
# An array of playback policy
|
27
|
+
# An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: * `\"public\"` (anyone with the playback URL can stream the asset). * `\"signed\"` (an additional access token is required to play the asset). If no `playback_policies` are set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy.
|
28
|
+
attr_accessor :playback_policies
|
29
|
+
|
30
|
+
# An array of playback policy objects that you want applied to this asset and available through `playback_ids`. `advanced_playback_policies` must be used instead of `playback_policies` when creating a DRM playback ID.
|
25
31
|
attr_accessor :advanced_playback_policies
|
26
32
|
|
27
33
|
attr_accessor :per_title_encode
|
28
34
|
|
29
|
-
#
|
35
|
+
# 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**.
|
30
36
|
attr_accessor :passthrough
|
31
37
|
|
32
|
-
# Specify what level of support for mp4 playback. * 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). MP4 files are not produced for `none` (default). In most cases you should use our default HLS-based streaming playback (`{playback_id}.m3u8`) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information.
|
38
|
+
# Deprecated. See the [Static Renditions API](https://www.mux.com/docs/guides/enable-static-mp4-renditions) for the updated API. Specify what level of support for mp4 playback. You may not enable both `mp4_support` and `static_renditions`. * 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). MP4 files are not produced for `none` (default). In most cases you should use our default HLS-based streaming playback (`{playback_id}.m3u8`) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information.
|
33
39
|
attr_accessor :mp4_support
|
34
40
|
|
35
41
|
# Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets.
|
@@ -50,6 +56,11 @@ module MuxRuby
|
|
50
56
|
# The video quality controls the cost, quality, and available platform features for the asset. The default video quality for an account can be set in the Mux Dashboard. This field replaces the deprecated `encoding_tier` value. [See the video quality guide for more details.](https://docs.mux.com/guides/use-video-quality-levels)
|
51
57
|
attr_accessor :video_quality
|
52
58
|
|
59
|
+
# An array of static renditions to create for this asset. You may not enable both `static_renditions` and `mp4_support (the latter being deprecated)`
|
60
|
+
attr_accessor :static_renditions
|
61
|
+
|
62
|
+
attr_accessor :meta
|
63
|
+
|
53
64
|
class EnumAttributeValidator
|
54
65
|
attr_reader :datatype
|
55
66
|
attr_reader :allowable_values
|
@@ -76,7 +87,9 @@ module MuxRuby
|
|
76
87
|
def self.attribute_map
|
77
88
|
{
|
78
89
|
:'input' => :'input',
|
90
|
+
:'inputs' => :'inputs',
|
79
91
|
:'playback_policy' => :'playback_policy',
|
92
|
+
:'playback_policies' => :'playback_policies',
|
80
93
|
:'advanced_playback_policies' => :'advanced_playback_policies',
|
81
94
|
:'per_title_encode' => :'per_title_encode',
|
82
95
|
:'passthrough' => :'passthrough',
|
@@ -86,7 +99,9 @@ module MuxRuby
|
|
86
99
|
:'test' => :'test',
|
87
100
|
:'max_resolution_tier' => :'max_resolution_tier',
|
88
101
|
:'encoding_tier' => :'encoding_tier',
|
89
|
-
:'video_quality' => :'video_quality'
|
102
|
+
:'video_quality' => :'video_quality',
|
103
|
+
:'static_renditions' => :'static_renditions',
|
104
|
+
:'meta' => :'meta'
|
90
105
|
}
|
91
106
|
end
|
92
107
|
|
@@ -99,7 +114,9 @@ module MuxRuby
|
|
99
114
|
def self.openapi_types
|
100
115
|
{
|
101
116
|
:'input' => :'Array<InputSettings>',
|
117
|
+
:'inputs' => :'Array<InputSettings>',
|
102
118
|
:'playback_policy' => :'Array<PlaybackPolicy>',
|
119
|
+
:'playback_policies' => :'Array<PlaybackPolicy>',
|
103
120
|
:'advanced_playback_policies' => :'Array<CreatePlaybackIDRequest>',
|
104
121
|
:'per_title_encode' => :'Boolean',
|
105
122
|
:'passthrough' => :'String',
|
@@ -109,7 +126,9 @@ module MuxRuby
|
|
109
126
|
:'test' => :'Boolean',
|
110
127
|
:'max_resolution_tier' => :'String',
|
111
128
|
:'encoding_tier' => :'String',
|
112
|
-
:'video_quality' => :'String'
|
129
|
+
:'video_quality' => :'String',
|
130
|
+
:'static_renditions' => :'Array<CreateStaticRenditionRequest>',
|
131
|
+
:'meta' => :'AssetMetadata'
|
113
132
|
}
|
114
133
|
end
|
115
134
|
|
@@ -140,12 +159,24 @@ module MuxRuby
|
|
140
159
|
end
|
141
160
|
end
|
142
161
|
|
162
|
+
if attributes.key?(:'inputs')
|
163
|
+
if (value = attributes[:'inputs']).is_a?(Array)
|
164
|
+
self.inputs = value
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
143
168
|
if attributes.key?(:'playback_policy')
|
144
169
|
if (value = attributes[:'playback_policy']).is_a?(Array)
|
145
170
|
self.playback_policy = value
|
146
171
|
end
|
147
172
|
end
|
148
173
|
|
174
|
+
if attributes.key?(:'playback_policies')
|
175
|
+
if (value = attributes[:'playback_policies']).is_a?(Array)
|
176
|
+
self.playback_policies = value
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
149
180
|
if attributes.key?(:'advanced_playback_policies')
|
150
181
|
if (value = attributes[:'advanced_playback_policies']).is_a?(Array)
|
151
182
|
self.advanced_playback_policies = value
|
@@ -189,6 +220,16 @@ module MuxRuby
|
|
189
220
|
if attributes.key?(:'video_quality')
|
190
221
|
self.video_quality = attributes[:'video_quality']
|
191
222
|
end
|
223
|
+
|
224
|
+
if attributes.key?(:'static_renditions')
|
225
|
+
if (value = attributes[:'static_renditions']).is_a?(Array)
|
226
|
+
self.static_renditions = value
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes.key?(:'meta')
|
231
|
+
self.meta = attributes[:'meta']
|
232
|
+
end
|
192
233
|
end
|
193
234
|
|
194
235
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -270,7 +311,9 @@ module MuxRuby
|
|
270
311
|
return true if self.equal?(o)
|
271
312
|
self.class == o.class &&
|
272
313
|
input == o.input &&
|
314
|
+
inputs == o.inputs &&
|
273
315
|
playback_policy == o.playback_policy &&
|
316
|
+
playback_policies == o.playback_policies &&
|
274
317
|
advanced_playback_policies == o.advanced_playback_policies &&
|
275
318
|
per_title_encode == o.per_title_encode &&
|
276
319
|
passthrough == o.passthrough &&
|
@@ -280,7 +323,9 @@ module MuxRuby
|
|
280
323
|
test == o.test &&
|
281
324
|
max_resolution_tier == o.max_resolution_tier &&
|
282
325
|
encoding_tier == o.encoding_tier &&
|
283
|
-
video_quality == o.video_quality
|
326
|
+
video_quality == o.video_quality &&
|
327
|
+
static_renditions == o.static_renditions &&
|
328
|
+
meta == o.meta
|
284
329
|
end
|
285
330
|
|
286
331
|
# @see the `==` method
|
@@ -292,7 +337,7 @@ module MuxRuby
|
|
292
337
|
# Calculates hash code according to all attributes.
|
293
338
|
# @return [Integer] Hash code
|
294
339
|
def hash
|
295
|
-
[input, playback_policy, advanced_playback_policies, per_title_encode, passthrough, mp4_support, normalize_audio, master_access, test, max_resolution_tier, encoding_tier, video_quality].hash
|
340
|
+
[input, inputs, playback_policy, playback_policies, advanced_playback_policies, per_title_encode, passthrough, mp4_support, normalize_audio, master_access, test, max_resolution_tier, encoding_tier, video_quality, static_renditions, meta].hash
|
296
341
|
end
|
297
342
|
|
298
343
|
# Builds the object from hash
|
@@ -15,9 +15,13 @@ require 'time'
|
|
15
15
|
|
16
16
|
module MuxRuby
|
17
17
|
class CreateLiveStreamRequest
|
18
|
+
# Deprecated. Use `playback_policies` instead, which accepts an identical type.
|
18
19
|
attr_accessor :playback_policy
|
19
20
|
|
20
|
-
# An array of playback policy
|
21
|
+
# An array of playback policy names that you want applied to this live stream and available through `playback_ids`. Options include: * `\"public\"` (anyone with the playback URL can stream the live stream). * `\"signed\"` (an additional access token is required to play the live stream). If no `playback_policies` is set, the live stream will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy.
|
22
|
+
attr_accessor :playback_policies
|
23
|
+
|
24
|
+
# An array of playback policy objects that you want applied on this live stream and available through `playback_ids`. `advanced_playback_policies` must be used instead of `playback_policies` when creating a DRM playback ID.
|
21
25
|
attr_accessor :advanced_playback_policies
|
22
26
|
|
23
27
|
attr_accessor :new_asset_settings
|
@@ -85,6 +89,7 @@ module MuxRuby
|
|
85
89
|
def self.attribute_map
|
86
90
|
{
|
87
91
|
:'playback_policy' => :'playback_policy',
|
92
|
+
:'playback_policies' => :'playback_policies',
|
88
93
|
:'advanced_playback_policies' => :'advanced_playback_policies',
|
89
94
|
:'new_asset_settings' => :'new_asset_settings',
|
90
95
|
:'reconnect_window' => :'reconnect_window',
|
@@ -112,6 +117,7 @@ module MuxRuby
|
|
112
117
|
def self.openapi_types
|
113
118
|
{
|
114
119
|
:'playback_policy' => :'Array<PlaybackPolicy>',
|
120
|
+
:'playback_policies' => :'Array<PlaybackPolicy>',
|
115
121
|
:'advanced_playback_policies' => :'Array<CreatePlaybackIDRequest>',
|
116
122
|
:'new_asset_settings' => :'CreateAssetRequest',
|
117
123
|
:'reconnect_window' => :'Float',
|
@@ -157,6 +163,12 @@ module MuxRuby
|
|
157
163
|
end
|
158
164
|
end
|
159
165
|
|
166
|
+
if attributes.key?(:'playback_policies')
|
167
|
+
if (value = attributes[:'playback_policies']).is_a?(Array)
|
168
|
+
self.playback_policies = value
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
160
172
|
if attributes.key?(:'advanced_playback_policies')
|
161
173
|
if (value = attributes[:'advanced_playback_policies']).is_a?(Array)
|
162
174
|
self.advanced_playback_policies = value
|
@@ -311,6 +323,7 @@ module MuxRuby
|
|
311
323
|
return true if self.equal?(o)
|
312
324
|
self.class == o.class &&
|
313
325
|
playback_policy == o.playback_policy &&
|
326
|
+
playback_policies == o.playback_policies &&
|
314
327
|
advanced_playback_policies == o.advanced_playback_policies &&
|
315
328
|
new_asset_settings == o.new_asset_settings &&
|
316
329
|
reconnect_window == o.reconnect_window &&
|
@@ -337,7 +350,7 @@ module MuxRuby
|
|
337
350
|
# Calculates hash code according to all attributes.
|
338
351
|
# @return [Integer] Hash code
|
339
352
|
def hash
|
340
|
-
[playback_policy, advanced_playback_policies, new_asset_settings, reconnect_window, use_slate_for_standard_latency, reconnect_slate_url, passthrough, audio_only, embedded_subtitles, generated_subtitles, reduced_latency, low_latency, latency_mode, test, simulcast_targets, max_continuous_duration].hash
|
353
|
+
[playback_policy, playback_policies, advanced_playback_policies, new_asset_settings, reconnect_window, use_slate_for_standard_latency, reconnect_slate_url, passthrough, audio_only, embedded_subtitles, generated_subtitles, reduced_latency, low_latency, latency_mode, test, simulcast_targets, max_continuous_duration].hash
|
341
354
|
end
|
342
355
|
|
343
356
|
# Builds the object from hash
|
@@ -14,28 +14,39 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module MuxRuby
|
17
|
-
class
|
18
|
-
|
19
|
-
attr_accessor :passthrough
|
20
|
-
|
21
|
-
# The ID of the live stream that you want to broadcast to.
|
22
|
-
attr_accessor :live_stream_id
|
17
|
+
class CreateStaticRenditionRequest
|
18
|
+
attr_accessor :resolution
|
23
19
|
|
24
|
-
|
20
|
+
# Arbitrary user-supplied metadata set for the static rendition. Max 255 characters.
|
21
|
+
attr_accessor :passthrough
|
25
22
|
|
26
|
-
|
27
|
-
|
23
|
+
class EnumAttributeValidator
|
24
|
+
attr_reader :datatype
|
25
|
+
attr_reader :allowable_values
|
26
|
+
|
27
|
+
def initialize(datatype, allowable_values)
|
28
|
+
@allowable_values = allowable_values.map do |value|
|
29
|
+
case datatype.to_s
|
30
|
+
when /Integer/i
|
31
|
+
value.to_i
|
32
|
+
when /Float/i
|
33
|
+
value.to_f
|
34
|
+
else
|
35
|
+
value
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
28
39
|
|
29
|
-
|
40
|
+
def valid?(value)
|
41
|
+
!value || allowable_values.include?(value)
|
42
|
+
end
|
43
|
+
end
|
30
44
|
|
31
45
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
46
|
def self.attribute_map
|
33
47
|
{
|
34
|
-
:'
|
35
|
-
:'
|
36
|
-
:'layout' => :'layout',
|
37
|
-
:'background' => :'background',
|
38
|
-
:'resolution' => :'resolution'
|
48
|
+
:'resolution' => :'resolution',
|
49
|
+
:'passthrough' => :'passthrough'
|
39
50
|
}
|
40
51
|
end
|
41
52
|
|
@@ -47,11 +58,8 @@ module MuxRuby
|
|
47
58
|
# Attribute type mapping.
|
48
59
|
def self.openapi_types
|
49
60
|
{
|
50
|
-
:'
|
51
|
-
:'
|
52
|
-
:'layout' => :'BroadcastLayout',
|
53
|
-
:'background' => :'String',
|
54
|
-
:'resolution' => :'BroadcastResolution'
|
61
|
+
:'resolution' => :'String',
|
62
|
+
:'passthrough' => :'String'
|
55
63
|
}
|
56
64
|
end
|
57
65
|
|
@@ -65,39 +73,23 @@ module MuxRuby
|
|
65
73
|
# @param [Hash] attributes Model attributes in the form of hash
|
66
74
|
def initialize(attributes = {})
|
67
75
|
if (!attributes.is_a?(Hash))
|
68
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::CreateStaticRenditionRequest` initialize method"
|
69
77
|
end
|
70
78
|
|
71
79
|
# check to see if the attribute exists and convert string to symbol for hash key
|
72
80
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
73
81
|
if (!self.class.attribute_map.key?(k.to_sym))
|
74
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::CreateStaticRenditionRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
75
83
|
end
|
76
84
|
h[k.to_sym] = v
|
77
85
|
}
|
78
86
|
|
79
|
-
if attributes.key?(:'passthrough')
|
80
|
-
self.passthrough = attributes[:'passthrough']
|
81
|
-
end
|
82
|
-
|
83
|
-
if attributes.key?(:'live_stream_id')
|
84
|
-
self.live_stream_id = attributes[:'live_stream_id']
|
85
|
-
end
|
86
|
-
|
87
|
-
if attributes.key?(:'layout')
|
88
|
-
self.layout = attributes[:'layout']
|
89
|
-
else
|
90
|
-
self.layout = 'gallery'
|
91
|
-
end
|
92
|
-
|
93
|
-
if attributes.key?(:'background')
|
94
|
-
self.background = attributes[:'background']
|
95
|
-
end
|
96
|
-
|
97
87
|
if attributes.key?(:'resolution')
|
98
88
|
self.resolution = attributes[:'resolution']
|
99
|
-
|
100
|
-
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.key?(:'passthrough')
|
92
|
+
self.passthrough = attributes[:'passthrough']
|
101
93
|
end
|
102
94
|
end
|
103
95
|
|
@@ -105,30 +97,34 @@ module MuxRuby
|
|
105
97
|
# @return Array for valid properties with the reasons
|
106
98
|
def list_invalid_properties
|
107
99
|
invalid_properties = Array.new
|
108
|
-
if @live_stream_id.nil?
|
109
|
-
invalid_properties.push('invalid value for "live_stream_id", live_stream_id cannot be nil.')
|
110
|
-
end
|
111
|
-
|
112
100
|
invalid_properties
|
113
101
|
end
|
114
102
|
|
115
103
|
# Check to see if the all the properties in the model are valid
|
116
104
|
# @return true if the model is valid
|
117
105
|
def valid?
|
118
|
-
|
106
|
+
resolution_validator = EnumAttributeValidator.new('String', ["highest", "audio-only", "2160p", "1440p", "1080p", "720p", "540p", "480p", "360p", "270p"])
|
107
|
+
return false unless resolution_validator.valid?(@resolution)
|
119
108
|
true
|
120
109
|
end
|
121
110
|
|
111
|
+
# Custom attribute writer method checking allowed values (enum).
|
112
|
+
# @param [Object] resolution Object to be assigned
|
113
|
+
def resolution=(resolution)
|
114
|
+
validator = EnumAttributeValidator.new('String', ["highest", "audio-only", "2160p", "1440p", "1080p", "720p", "540p", "480p", "360p", "270p"])
|
115
|
+
unless validator.valid?(resolution)
|
116
|
+
fail ArgumentError, "invalid value for \"resolution\", must be one of #{validator.allowable_values}."
|
117
|
+
end
|
118
|
+
@resolution = resolution
|
119
|
+
end
|
120
|
+
|
122
121
|
# Checks equality by comparing each attribute.
|
123
122
|
# @param [Object] Object to be compared
|
124
123
|
def ==(o)
|
125
124
|
return true if self.equal?(o)
|
126
125
|
self.class == o.class &&
|
127
|
-
|
128
|
-
|
129
|
-
layout == o.layout &&
|
130
|
-
background == o.background &&
|
131
|
-
resolution == o.resolution
|
126
|
+
resolution == o.resolution &&
|
127
|
+
passthrough == o.passthrough
|
132
128
|
end
|
133
129
|
|
134
130
|
# @see the `==` method
|
@@ -140,7 +136,7 @@ module MuxRuby
|
|
140
136
|
# Calculates hash code according to all attributes.
|
141
137
|
# @return [Integer] Hash code
|
142
138
|
def hash
|
143
|
-
[
|
139
|
+
[resolution, passthrough].hash
|
144
140
|
end
|
145
141
|
|
146
142
|
# Builds the object from hash
|
data/lib/mux_ruby/models/{start_space_broadcast_response.rb → create_static_rendition_response.rb}
RENAMED
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module MuxRuby
|
17
|
-
class
|
17
|
+
class CreateStaticRenditionResponse
|
18
18
|
attr_accessor :data
|
19
19
|
|
20
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -32,7 +32,7 @@ module MuxRuby
|
|
32
32
|
# Attribute type mapping.
|
33
33
|
def self.openapi_types
|
34
34
|
{
|
35
|
-
:'data' => :'
|
35
|
+
:'data' => :'StaticRendition'
|
36
36
|
}
|
37
37
|
end
|
38
38
|
|
@@ -46,13 +46,13 @@ 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::
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::CreateStaticRenditionResponse` 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::
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::CreateStaticRenditionResponse`. 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
|
}
|
@@ -45,7 +45,7 @@ module MuxRuby
|
|
45
45
|
# Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This optional parameter should be used for tracks with `type` of `text` and `text_type` set to `subtitles`.
|
46
46
|
attr_accessor :closed_captions
|
47
47
|
|
48
|
-
# This optional parameter should be used tracks with `type` of `text` and `text_type` set to `subtitles`.
|
48
|
+
# This optional parameter should be used for tracks with `type` of `text` and `text_type` set to `subtitles`.
|
49
49
|
attr_accessor :passthrough
|
50
50
|
|
51
51
|
class EnumAttributeValidator
|