mux_ruby 1.9.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -1
- data/Gemfile.lock +26 -37
- data/README.md +37 -13
- data/docs/AbridgedVideoView.md +33 -13
- data/docs/Asset.md +59 -26
- data/docs/AssetErrors.md +15 -4
- data/docs/AssetMaster.md +15 -4
- data/docs/AssetNonStandardInputReasons.md +29 -11
- data/docs/AssetRecordingTimes.md +15 -4
- data/docs/AssetResponse.md +13 -3
- data/docs/AssetStaticRenditions.md +15 -4
- data/docs/AssetStaticRenditionsFiles.md +23 -8
- data/docs/AssetsApi.md +396 -163
- data/docs/BreakdownValue.md +21 -7
- data/docs/CreateAssetRequest.md +27 -10
- data/docs/CreateLiveStreamRequest.md +29 -9
- data/docs/CreatePlaybackIDRequest.md +13 -3
- data/docs/CreatePlaybackIDResponse.md +13 -3
- data/docs/CreateSimulcastTargetRequest.md +17 -5
- data/docs/CreateTrackRequest.md +25 -9
- data/docs/CreateTrackResponse.md +13 -3
- data/docs/CreateUploadRequest.md +19 -6
- data/docs/DeliveryReport.md +27 -9
- data/docs/DeliveryUsageApi.md +41 -23
- data/docs/DimensionValue.md +15 -4
- data/docs/DimensionsApi.md +72 -34
- data/docs/DirectUploadsApi.md +131 -56
- data/docs/DisableLiveStreamResponse.md +13 -3
- data/docs/EnableLiveStreamResponse.md +13 -3
- data/docs/Error.md +27 -10
- data/docs/ErrorsApi.md +38 -20
- data/docs/ExportDate.md +20 -0
- data/docs/ExportFile.md +22 -0
- data/docs/ExportsApi.md +99 -12
- data/docs/FilterValue.md +15 -4
- data/docs/FiltersApi.md +71 -33
- data/docs/GetAssetInputInfoResponse.md +13 -3
- data/docs/GetAssetOrLiveStreamIdResponse.md +13 -3
- data/docs/GetAssetOrLiveStreamIdResponseData.md +17 -5
- data/docs/GetAssetOrLiveStreamIdResponseDataObject.md +15 -4
- data/docs/GetAssetPlaybackIDResponse.md +13 -3
- data/docs/GetMetricTimeseriesDataResponse.md +17 -5
- data/docs/GetOverallValuesResponse.md +17 -5
- data/docs/GetRealTimeBreakdownResponse.md +17 -5
- data/docs/GetRealTimeHistogramTimeseriesResponse.md +19 -6
- data/docs/GetRealTimeHistogramTimeseriesResponseMeta.md +13 -3
- data/docs/GetRealTimeTimeseriesResponse.md +17 -5
- data/docs/Incident.md +53 -23
- data/docs/IncidentBreakdown.md +17 -5
- data/docs/IncidentNotification.md +17 -5
- data/docs/IncidentNotificationRule.md +21 -7
- data/docs/IncidentResponse.md +15 -4
- data/docs/IncidentsApi.md +118 -62
- data/docs/InputFile.md +15 -4
- data/docs/InputInfo.md +15 -4
- data/docs/InputSettings.md +31 -12
- data/docs/InputSettingsOverlaySettings.md +25 -9
- data/docs/InputTrack.md +29 -11
- data/docs/Insight.md +23 -8
- data/docs/ListAllMetricValuesResponse.md +17 -5
- data/docs/ListAssetsResponse.md +13 -3
- data/docs/ListBreakdownValuesResponse.md +17 -5
- data/docs/ListDeliveryUsageResponse.md +19 -6
- data/docs/ListDimensionValuesResponse.md +17 -5
- data/docs/ListDimensionsResponse.md +17 -5
- data/docs/ListErrorsResponse.md +17 -5
- data/docs/ListExportsResponse.md +17 -5
- data/docs/ListFilterValuesResponse.md +17 -5
- data/docs/ListFiltersResponse.md +17 -5
- data/docs/ListFiltersResponseData.md +15 -4
- data/docs/ListIncidentsResponse.md +17 -5
- data/docs/ListInsightsResponse.md +17 -5
- data/docs/ListLiveStreamsResponse.md +13 -3
- data/docs/ListRealTimeDimensionsResponse.md +17 -5
- data/docs/ListRealTimeDimensionsResponseData.md +15 -4
- data/docs/ListRealTimeMetricsResponse.md +17 -5
- data/docs/ListRelatedIncidentsResponse.md +17 -5
- data/docs/ListSigningKeysResponse.md +13 -3
- data/docs/ListUploadsResponse.md +13 -3
- data/docs/ListVideoViewExportsResponse.md +22 -0
- data/docs/ListVideoViewsResponse.md +17 -5
- data/docs/LiveStream.md +41 -15
- data/docs/LiveStreamResponse.md +13 -3
- data/docs/LiveStreamsApi.md +418 -170
- data/docs/Metric.md +21 -7
- data/docs/MetricsApi.md +211 -117
- data/docs/NotificationRule.md +17 -5
- data/docs/OverallValues.md +19 -6
- data/docs/PlaybackID.md +15 -4
- data/docs/PlaybackIDApi.md +35 -17
- data/docs/PlaybackPolicy.md +10 -2
- data/docs/RealTimeApi.md +177 -81
- data/docs/RealTimeBreakdownValue.md +21 -7
- data/docs/RealTimeHistogramTimeseriesBucket.md +15 -4
- data/docs/RealTimeHistogramTimeseriesBucketValues.md +15 -4
- data/docs/RealTimeHistogramTimeseriesDatapoint.md +25 -9
- data/docs/RealTimeTimeseriesDatapoint.md +17 -5
- data/docs/Score.md +23 -8
- data/docs/SignalLiveStreamCompleteResponse.md +13 -3
- data/docs/SigningKey.md +17 -5
- data/docs/SigningKeyResponse.md +13 -3
- data/docs/SimulcastTarget.md +21 -7
- data/docs/SimulcastTargetResponse.md +13 -3
- data/docs/Track.md +37 -15
- data/docs/URLSigningKeysApi.md +130 -54
- data/docs/UpdateAssetMP4SupportRequest.md +13 -3
- data/docs/UpdateAssetMasterAccessRequest.md +13 -3
- data/docs/Upload.md +29 -11
- data/docs/UploadError.md +15 -4
- data/docs/UploadResponse.md +13 -3
- data/docs/VideoView.md +251 -114
- data/docs/VideoViewEvent.md +19 -6
- data/docs/VideoViewResponse.md +15 -4
- data/docs/VideoViewsApi.md +78 -41
- data/gen/.gitignore +7 -0
- data/gen/Makefile +31 -0
- data/gen/generator-config.json +11 -0
- data/gen/openapitools.json +7 -0
- data/gen/package.json +17 -0
- data/gen/templates/Gemfile.mustache +11 -0
- data/gen/templates/README.mustache +158 -0
- data/gen/templates/Rakefile.mustache +10 -0
- data/gen/templates/api.mustache +206 -0
- data/gen/templates/api_client.mustache +264 -0
- data/gen/templates/api_client_faraday_partial.mustache +138 -0
- data/gen/templates/api_client_spec.mustache +220 -0
- data/gen/templates/api_client_typhoeus_partial.mustache +183 -0
- data/gen/templates/api_doc.mustache +118 -0
- data/gen/templates/api_error.mustache +67 -0
- data/gen/templates/api_info.mustache +12 -0
- data/gen/templates/api_test.mustache +47 -0
- data/gen/templates/base_object.mustache +120 -0
- data/gen/templates/configuration.mustache +349 -0
- data/gen/templates/configuration_spec.mustache +34 -0
- data/gen/templates/configuration_tls_faraday_partial.mustache +29 -0
- data/gen/templates/configuration_tls_typhoeus_partial.mustache +34 -0
- data/gen/templates/gem.mustache +40 -0
- data/gen/templates/gemspec.mustache +35 -0
- data/gen/templates/gitignore.mustache +39 -0
- data/gen/templates/model.mustache +26 -0
- data/gen/templates/model_doc.mustache +12 -0
- data/gen/templates/model_test.mustache +77 -0
- data/gen/templates/partial_model_enum_class.mustache +20 -0
- data/gen/templates/partial_model_generic.mustache +371 -0
- data/gen/templates/partial_model_generic_doc.mustache +28 -0
- data/gen/templates/partial_oneof_module.mustache +137 -0
- data/gen/templates/partial_oneof_module_doc.mustache +92 -0
- data/gen/templates/rspec.mustache +2 -0
- data/gen/templates/rubocop.mustache +148 -0
- data/gen/templates/spec_helper.mustache +103 -0
- data/gen/templates/version.mustache +7 -0
- data/gen/yarn.lock +1878 -0
- data/lib/mux_ruby/api/assets_api.rb +293 -156
- data/lib/mux_ruby/api/delivery_usage_api.rb +32 -16
- data/lib/mux_ruby/api/dimensions_api.rb +55 -29
- data/lib/mux_ruby/api/direct_uploads_api.rb +90 -44
- data/lib/mux_ruby/api/errors_api.rb +34 -18
- data/lib/mux_ruby/api/exports_api.rb +86 -13
- data/lib/mux_ruby/api/filters_api.rb +53 -27
- data/lib/mux_ruby/api/incidents_api.rb +94 -52
- data/lib/mux_ruby/api/live_streams_api.rb +299 -157
- data/lib/mux_ruby/api/metrics_api.rb +193 -122
- data/lib/mux_ruby/api/playback_id_api.rb +33 -17
- data/lib/mux_ruby/api/real_time_api.rb +149 -87
- data/lib/mux_ruby/api/url_signing_keys_api.rb +95 -48
- data/lib/mux_ruby/api/video_views_api.rb +60 -33
- data/lib/mux_ruby/api_client.rb +94 -79
- data/lib/mux_ruby/api_error.rb +35 -7
- data/lib/mux_ruby/configuration.rb +50 -14
- data/lib/mux_ruby/models/abridged_video_view.rb +58 -24
- data/lib/mux_ruby/models/asset.rb +100 -63
- data/lib/mux_ruby/models/asset_errors.rb +50 -15
- data/lib/mux_ruby/models/asset_master.rb +52 -17
- data/lib/mux_ruby/models/asset_non_standard_input_reasons.rb +70 -35
- data/lib/mux_ruby/models/asset_recording_times.rb +50 -16
- data/lib/mux_ruby/models/asset_response.rb +48 -14
- data/lib/mux_ruby/models/asset_static_renditions.rb +53 -17
- data/lib/mux_ruby/models/asset_static_renditions_files.rb +58 -23
- data/lib/mux_ruby/models/breakdown_value.rb +52 -18
- data/lib/mux_ruby/models/create_asset_request.rb +64 -30
- data/lib/mux_ruby/models/create_live_stream_request.rb +78 -23
- data/lib/mux_ruby/models/create_playback_id_request.rb +48 -14
- data/lib/mux_ruby/models/create_playback_id_response.rb +48 -14
- data/lib/mux_ruby/models/create_simulcast_target_request.rb +50 -16
- data/lib/mux_ruby/models/create_track_request.rb +60 -26
- data/lib/mux_ruby/models/create_track_response.rb +48 -14
- data/lib/mux_ruby/models/create_upload_request.rb +52 -18
- data/lib/mux_ruby/models/delivery_report.rb +106 -21
- data/lib/mux_ruby/models/dimension_value.rb +49 -15
- data/lib/mux_ruby/models/disable_live_stream_response.rb +48 -14
- data/lib/mux_ruby/models/enable_live_stream_response.rb +48 -14
- data/lib/mux_ruby/models/error.rb +63 -21
- data/lib/mux_ruby/models/export_date.rb +229 -0
- data/lib/mux_ruby/models/export_file.rb +236 -0
- data/lib/mux_ruby/models/filter_value.rb +49 -15
- data/lib/mux_ruby/models/get_asset_input_info_response.rb +48 -14
- data/lib/mux_ruby/models/get_asset_or_live_stream_id_response.rb +48 -14
- data/lib/mux_ruby/models/get_asset_or_live_stream_id_response_data.rb +50 -16
- data/lib/mux_ruby/models/get_asset_or_live_stream_id_response_data_object.rb +51 -17
- data/lib/mux_ruby/models/get_asset_playback_id_response.rb +48 -14
- data/lib/mux_ruby/models/get_metric_timeseries_data_response.rb +50 -16
- data/lib/mux_ruby/models/get_overall_values_response.rb +50 -16
- data/lib/mux_ruby/models/get_real_time_breakdown_response.rb +50 -16
- data/lib/mux_ruby/models/get_real_time_histogram_timeseries_response.rb +51 -17
- data/lib/mux_ruby/models/get_real_time_histogram_timeseries_response_meta.rb +48 -14
- data/lib/mux_ruby/models/get_real_time_timeseries_response.rb +50 -16
- data/lib/mux_ruby/models/incident.rb +68 -34
- data/lib/mux_ruby/models/incident_breakdown.rb +50 -16
- data/lib/mux_ruby/models/incident_notification.rb +50 -16
- data/lib/mux_ruby/models/incident_notification_rule.rb +52 -18
- data/lib/mux_ruby/models/incident_response.rb +49 -15
- data/lib/mux_ruby/models/input_file.rb +49 -15
- data/lib/mux_ruby/models/input_info.rb +49 -15
- data/lib/mux_ruby/models/input_settings.rb +64 -30
- data/lib/mux_ruby/models/input_settings_overlay_settings.rb +58 -24
- data/lib/mux_ruby/models/input_track.rb +56 -22
- data/lib/mux_ruby/models/insight.rb +53 -19
- data/lib/mux_ruby/models/list_all_metric_values_response.rb +50 -16
- data/lib/mux_ruby/models/list_assets_response.rb +48 -14
- data/lib/mux_ruby/models/list_breakdown_values_response.rb +50 -16
- data/lib/mux_ruby/models/list_delivery_usage_response.rb +51 -17
- data/lib/mux_ruby/models/list_dimension_values_response.rb +50 -16
- data/lib/mux_ruby/models/list_dimensions_response.rb +50 -16
- data/lib/mux_ruby/models/list_errors_response.rb +50 -16
- data/lib/mux_ruby/models/list_exports_response.rb +50 -16
- data/lib/mux_ruby/models/list_filter_values_response.rb +50 -16
- data/lib/mux_ruby/models/list_filters_response.rb +50 -16
- data/lib/mux_ruby/models/list_filters_response_data.rb +49 -15
- data/lib/mux_ruby/models/list_incidents_response.rb +50 -16
- data/lib/mux_ruby/models/list_insights_response.rb +50 -16
- data/lib/mux_ruby/models/list_live_streams_response.rb +48 -14
- data/lib/mux_ruby/models/list_real_time_dimensions_response.rb +50 -16
- data/lib/mux_ruby/models/list_real_time_dimensions_response_data.rb +49 -15
- data/lib/mux_ruby/models/list_real_time_metrics_response.rb +50 -16
- data/lib/mux_ruby/models/list_related_incidents_response.rb +50 -16
- data/lib/mux_ruby/models/list_signing_keys_response.rb +48 -14
- data/lib/mux_ruby/models/list_uploads_response.rb +48 -14
- data/lib/mux_ruby/models/list_video_view_exports_response.rb +240 -0
- data/lib/mux_ruby/models/list_video_views_response.rb +50 -16
- data/lib/mux_ruby/models/live_stream.rb +131 -29
- data/lib/mux_ruby/models/live_stream_response.rb +48 -14
- data/lib/mux_ruby/models/metric.rb +52 -18
- data/lib/mux_ruby/models/notification_rule.rb +50 -16
- data/lib/mux_ruby/models/overall_values.rb +51 -17
- data/lib/mux_ruby/models/playback_id.rb +49 -15
- data/lib/mux_ruby/models/playback_policy.rb +12 -6
- data/lib/mux_ruby/models/real_time_breakdown_value.rb +52 -18
- data/lib/mux_ruby/models/real_time_histogram_timeseries_bucket.rb +50 -16
- data/lib/mux_ruby/models/real_time_histogram_timeseries_bucket_values.rb +49 -15
- data/lib/mux_ruby/models/real_time_histogram_timeseries_datapoint.rb +54 -20
- data/lib/mux_ruby/models/real_time_timeseries_datapoint.rb +50 -16
- data/lib/mux_ruby/models/score.rb +53 -19
- data/lib/mux_ruby/models/signal_live_stream_complete_response.rb +48 -14
- data/lib/mux_ruby/models/signing_key.rb +53 -16
- data/lib/mux_ruby/models/signing_key_response.rb +48 -14
- data/lib/mux_ruby/models/simulcast_target.rb +54 -20
- data/lib/mux_ruby/models/simulcast_target_response.rb +48 -14
- data/lib/mux_ruby/models/track.rb +67 -33
- data/lib/mux_ruby/models/update_asset_master_access_request.rb +50 -16
- data/lib/mux_ruby/models/update_asset_mp4_support_request.rb +50 -16
- data/lib/mux_ruby/models/upload.rb +61 -25
- data/lib/mux_ruby/models/upload_error.rb +51 -15
- data/lib/mux_ruby/models/upload_response.rb +48 -14
- data/lib/mux_ruby/models/video_view.rb +242 -136
- data/lib/mux_ruby/models/video_view_event.rb +51 -17
- data/lib/mux_ruby/models/video_view_response.rb +49 -15
- data/lib/mux_ruby/version.rb +10 -3
- data/lib/mux_ruby.rb +12 -2
- data/mux_ruby.gemspec +15 -17
- data/spec/api_client_spec.rb +10 -3
- data/spec/configuration_spec.rb +9 -2
- data/spec/models/export_date_spec.rb +40 -0
- data/spec/models/export_file_spec.rb +46 -0
- data/spec/models/list_video_view_exports_response_spec.rb +46 -0
- data/spec/spec_helper.rb +9 -2
- metadata +149 -240
@@ -1,9 +1,17 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
3
|
-
|
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
|
+
|
4
11
|
=end
|
5
12
|
|
6
13
|
require 'date'
|
14
|
+
require 'time'
|
7
15
|
|
8
16
|
module MuxRuby
|
9
17
|
# An array of objects that each describe an input file to be used to create the asset. As a shortcut, `input` can also be a string URL for a file when only one input file is used. See `input[].url` for requirements.
|
@@ -13,10 +21,10 @@ module MuxRuby
|
|
13
21
|
|
14
22
|
attr_accessor :overlay_settings
|
15
23
|
|
16
|
-
# The time offset in seconds from the beginning of the video indicating the clip's starting marker. The default value is 0 when not included.
|
24
|
+
# The time offset in seconds from the beginning of the video indicating the clip's starting marker. The default value is 0 when not included. This parameter is only applicable for creating clips when `input.url` has `mux://assets/{asset_id}` format.
|
17
25
|
attr_accessor :start_time
|
18
26
|
|
19
|
-
# The time offset in seconds from the beginning of the video, indicating the clip's ending marker. The default value is the duration of the video when not included.
|
27
|
+
# The time offset in seconds from the beginning of the video, indicating the clip's ending marker. The default value is the duration of the video when not included. This parameter is only applicable for creating clips when `input.url` has `mux://assets/{asset_id}` format.
|
20
28
|
attr_accessor :end_time
|
21
29
|
|
22
30
|
# This parameter is required for the `text` track type.
|
@@ -75,6 +83,11 @@ module MuxRuby
|
|
75
83
|
}
|
76
84
|
end
|
77
85
|
|
86
|
+
# Returns all the JSON keys this model knows about
|
87
|
+
def self.acceptable_attributes
|
88
|
+
attribute_map.values
|
89
|
+
end
|
90
|
+
|
78
91
|
# Attribute type mapping.
|
79
92
|
def self.openapi_types
|
80
93
|
{
|
@@ -86,56 +99,69 @@ module MuxRuby
|
|
86
99
|
:'text_type' => :'String',
|
87
100
|
:'language_code' => :'String',
|
88
101
|
:'name' => :'String',
|
89
|
-
:'closed_captions' => :'
|
102
|
+
:'closed_captions' => :'Boolean',
|
90
103
|
:'passthrough' => :'String'
|
91
104
|
}
|
92
105
|
end
|
93
106
|
|
107
|
+
# List of attributes with nullable: true
|
108
|
+
def self.openapi_nullable
|
109
|
+
Set.new([
|
110
|
+
])
|
111
|
+
end
|
112
|
+
|
94
113
|
# Initializes the object
|
95
114
|
# @param [Hash] attributes Model attributes in the form of hash
|
96
115
|
def initialize(attributes = {})
|
97
|
-
|
116
|
+
if (!attributes.is_a?(Hash))
|
117
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::InputSettings` initialize method"
|
118
|
+
end
|
98
119
|
|
99
|
-
# convert string to symbol for hash key
|
100
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
120
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
121
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
122
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
123
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::InputSettings`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
124
|
+
end
|
125
|
+
h[k.to_sym] = v
|
126
|
+
}
|
101
127
|
|
102
|
-
if attributes.
|
128
|
+
if attributes.key?(:'url')
|
103
129
|
self.url = attributes[:'url']
|
104
130
|
end
|
105
131
|
|
106
|
-
if attributes.
|
132
|
+
if attributes.key?(:'overlay_settings')
|
107
133
|
self.overlay_settings = attributes[:'overlay_settings']
|
108
134
|
end
|
109
135
|
|
110
|
-
if attributes.
|
136
|
+
if attributes.key?(:'start_time')
|
111
137
|
self.start_time = attributes[:'start_time']
|
112
138
|
end
|
113
139
|
|
114
|
-
if attributes.
|
140
|
+
if attributes.key?(:'end_time')
|
115
141
|
self.end_time = attributes[:'end_time']
|
116
142
|
end
|
117
143
|
|
118
|
-
if attributes.
|
144
|
+
if attributes.key?(:'type')
|
119
145
|
self.type = attributes[:'type']
|
120
146
|
end
|
121
147
|
|
122
|
-
if attributes.
|
148
|
+
if attributes.key?(:'text_type')
|
123
149
|
self.text_type = attributes[:'text_type']
|
124
150
|
end
|
125
151
|
|
126
|
-
if attributes.
|
152
|
+
if attributes.key?(:'language_code')
|
127
153
|
self.language_code = attributes[:'language_code']
|
128
154
|
end
|
129
155
|
|
130
|
-
if attributes.
|
156
|
+
if attributes.key?(:'name')
|
131
157
|
self.name = attributes[:'name']
|
132
158
|
end
|
133
159
|
|
134
|
-
if attributes.
|
160
|
+
if attributes.key?(:'closed_captions')
|
135
161
|
self.closed_captions = attributes[:'closed_captions']
|
136
162
|
end
|
137
163
|
|
138
|
-
if attributes.
|
164
|
+
if attributes.key?(:'passthrough')
|
139
165
|
self.passthrough = attributes[:'passthrough']
|
140
166
|
end
|
141
167
|
end
|
@@ -150,9 +176,9 @@ module MuxRuby
|
|
150
176
|
# Check to see if the all the properties in the model are valid
|
151
177
|
# @return true if the model is valid
|
152
178
|
def valid?
|
153
|
-
type_validator = EnumAttributeValidator.new('String', [
|
179
|
+
type_validator = EnumAttributeValidator.new('String', ["video", "audio", "text"])
|
154
180
|
return false unless type_validator.valid?(@type)
|
155
|
-
text_type_validator = EnumAttributeValidator.new('String', [
|
181
|
+
text_type_validator = EnumAttributeValidator.new('String', ["subtitles"])
|
156
182
|
return false unless text_type_validator.valid?(@text_type)
|
157
183
|
true
|
158
184
|
end
|
@@ -160,7 +186,7 @@ module MuxRuby
|
|
160
186
|
# Custom attribute writer method checking allowed values (enum).
|
161
187
|
# @param [Object] type Object to be assigned
|
162
188
|
def type=(type)
|
163
|
-
validator = EnumAttributeValidator.new('String', [
|
189
|
+
validator = EnumAttributeValidator.new('String', ["video", "audio", "text"])
|
164
190
|
unless validator.valid?(type)
|
165
191
|
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
166
192
|
end
|
@@ -170,7 +196,7 @@ module MuxRuby
|
|
170
196
|
# Custom attribute writer method checking allowed values (enum).
|
171
197
|
# @param [Object] text_type Object to be assigned
|
172
198
|
def text_type=(text_type)
|
173
|
-
validator = EnumAttributeValidator.new('String', [
|
199
|
+
validator = EnumAttributeValidator.new('String', ["subtitles"])
|
174
200
|
unless validator.valid?(text_type)
|
175
201
|
fail ArgumentError, "invalid value for \"text_type\", must be one of #{validator.allowable_values}."
|
176
202
|
end
|
@@ -201,7 +227,7 @@ module MuxRuby
|
|
201
227
|
end
|
202
228
|
|
203
229
|
# Calculates hash code according to all attributes.
|
204
|
-
# @return [
|
230
|
+
# @return [Integer] Hash code
|
205
231
|
def hash
|
206
232
|
[url, overlay_settings, start_time, end_time, type, text_type, language_code, name, closed_captions, passthrough].hash
|
207
233
|
end
|
@@ -219,7 +245,9 @@ module MuxRuby
|
|
219
245
|
def build_from_hash(attributes)
|
220
246
|
return nil unless attributes.is_a?(Hash)
|
221
247
|
self.class.openapi_types.each_pair do |key, type|
|
222
|
-
if
|
248
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
249
|
+
self.send("#{key}=", nil)
|
250
|
+
elsif type =~ /\AArray<(.*)>/i
|
223
251
|
# check to ensure the input is an array given that the attribute
|
224
252
|
# is documented as an array but the input is not
|
225
253
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -227,7 +255,7 @@ module MuxRuby
|
|
227
255
|
end
|
228
256
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
229
257
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
230
|
-
end
|
258
|
+
end
|
231
259
|
end
|
232
260
|
|
233
261
|
self
|
@@ -239,8 +267,8 @@ module MuxRuby
|
|
239
267
|
# @return [Object] Deserialized data
|
240
268
|
def _deserialize(type, value)
|
241
269
|
case type.to_sym
|
242
|
-
when :
|
243
|
-
|
270
|
+
when :Time
|
271
|
+
Time.parse(value)
|
244
272
|
when :Date
|
245
273
|
Date.parse(value)
|
246
274
|
when :String
|
@@ -249,7 +277,7 @@ module MuxRuby
|
|
249
277
|
value.to_i
|
250
278
|
when :Float
|
251
279
|
value.to_f
|
252
|
-
when :
|
280
|
+
when :Boolean
|
253
281
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
254
282
|
true
|
255
283
|
else
|
@@ -270,7 +298,9 @@ module MuxRuby
|
|
270
298
|
end
|
271
299
|
end
|
272
300
|
else # model
|
273
|
-
|
301
|
+
# models (e.g. Pet) or oneOf
|
302
|
+
klass = MuxRuby.const_get(type)
|
303
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
274
304
|
end
|
275
305
|
end
|
276
306
|
|
@@ -292,7 +322,11 @@ module MuxRuby
|
|
292
322
|
hash = {}
|
293
323
|
self.class.attribute_map.each_pair do |attr, param|
|
294
324
|
value = self.send(attr)
|
295
|
-
|
325
|
+
if value.nil?
|
326
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
327
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
328
|
+
end
|
329
|
+
|
296
330
|
hash[param] = _to_hash(value)
|
297
331
|
end
|
298
332
|
hash
|
@@ -1,9 +1,17 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
3
|
-
|
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
|
+
|
4
11
|
=end
|
5
12
|
|
6
13
|
require 'date'
|
14
|
+
require 'time'
|
7
15
|
|
8
16
|
module MuxRuby
|
9
17
|
# An object that describes how the image file referenced in url should be placed over the video (i.e. watermarking).
|
@@ -64,6 +72,11 @@ module MuxRuby
|
|
64
72
|
}
|
65
73
|
end
|
66
74
|
|
75
|
+
# Returns all the JSON keys this model knows about
|
76
|
+
def self.acceptable_attributes
|
77
|
+
attribute_map.values
|
78
|
+
end
|
79
|
+
|
67
80
|
# Attribute type mapping.
|
68
81
|
def self.openapi_types
|
69
82
|
{
|
@@ -77,39 +90,52 @@ module MuxRuby
|
|
77
90
|
}
|
78
91
|
end
|
79
92
|
|
93
|
+
# List of attributes with nullable: true
|
94
|
+
def self.openapi_nullable
|
95
|
+
Set.new([
|
96
|
+
])
|
97
|
+
end
|
98
|
+
|
80
99
|
# Initializes the object
|
81
100
|
# @param [Hash] attributes Model attributes in the form of hash
|
82
101
|
def initialize(attributes = {})
|
83
|
-
|
102
|
+
if (!attributes.is_a?(Hash))
|
103
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::InputSettingsOverlaySettings` initialize method"
|
104
|
+
end
|
84
105
|
|
85
|
-
# convert string to symbol for hash key
|
86
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
106
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
107
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
108
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
109
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::InputSettingsOverlaySettings`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
110
|
+
end
|
111
|
+
h[k.to_sym] = v
|
112
|
+
}
|
87
113
|
|
88
|
-
if attributes.
|
114
|
+
if attributes.key?(:'vertical_align')
|
89
115
|
self.vertical_align = attributes[:'vertical_align']
|
90
116
|
end
|
91
117
|
|
92
|
-
if attributes.
|
118
|
+
if attributes.key?(:'vertical_margin')
|
93
119
|
self.vertical_margin = attributes[:'vertical_margin']
|
94
120
|
end
|
95
121
|
|
96
|
-
if attributes.
|
122
|
+
if attributes.key?(:'horizontal_align')
|
97
123
|
self.horizontal_align = attributes[:'horizontal_align']
|
98
124
|
end
|
99
125
|
|
100
|
-
if attributes.
|
126
|
+
if attributes.key?(:'horizontal_margin')
|
101
127
|
self.horizontal_margin = attributes[:'horizontal_margin']
|
102
128
|
end
|
103
129
|
|
104
|
-
if attributes.
|
130
|
+
if attributes.key?(:'width')
|
105
131
|
self.width = attributes[:'width']
|
106
132
|
end
|
107
133
|
|
108
|
-
if attributes.
|
134
|
+
if attributes.key?(:'height')
|
109
135
|
self.height = attributes[:'height']
|
110
136
|
end
|
111
137
|
|
112
|
-
if attributes.
|
138
|
+
if attributes.key?(:'opacity')
|
113
139
|
self.opacity = attributes[:'opacity']
|
114
140
|
end
|
115
141
|
end
|
@@ -124,9 +150,9 @@ module MuxRuby
|
|
124
150
|
# Check to see if the all the properties in the model are valid
|
125
151
|
# @return true if the model is valid
|
126
152
|
def valid?
|
127
|
-
vertical_align_validator = EnumAttributeValidator.new('String', [
|
153
|
+
vertical_align_validator = EnumAttributeValidator.new('String', ["top", "middle", "bottom"])
|
128
154
|
return false unless vertical_align_validator.valid?(@vertical_align)
|
129
|
-
horizontal_align_validator = EnumAttributeValidator.new('String', [
|
155
|
+
horizontal_align_validator = EnumAttributeValidator.new('String', ["left", "center", "right"])
|
130
156
|
return false unless horizontal_align_validator.valid?(@horizontal_align)
|
131
157
|
true
|
132
158
|
end
|
@@ -134,7 +160,7 @@ module MuxRuby
|
|
134
160
|
# Custom attribute writer method checking allowed values (enum).
|
135
161
|
# @param [Object] vertical_align Object to be assigned
|
136
162
|
def vertical_align=(vertical_align)
|
137
|
-
validator = EnumAttributeValidator.new('String', [
|
163
|
+
validator = EnumAttributeValidator.new('String', ["top", "middle", "bottom"])
|
138
164
|
unless validator.valid?(vertical_align)
|
139
165
|
fail ArgumentError, "invalid value for \"vertical_align\", must be one of #{validator.allowable_values}."
|
140
166
|
end
|
@@ -144,7 +170,7 @@ module MuxRuby
|
|
144
170
|
# Custom attribute writer method checking allowed values (enum).
|
145
171
|
# @param [Object] horizontal_align Object to be assigned
|
146
172
|
def horizontal_align=(horizontal_align)
|
147
|
-
validator = EnumAttributeValidator.new('String', [
|
173
|
+
validator = EnumAttributeValidator.new('String', ["left", "center", "right"])
|
148
174
|
unless validator.valid?(horizontal_align)
|
149
175
|
fail ArgumentError, "invalid value for \"horizontal_align\", must be one of #{validator.allowable_values}."
|
150
176
|
end
|
@@ -172,7 +198,7 @@ module MuxRuby
|
|
172
198
|
end
|
173
199
|
|
174
200
|
# Calculates hash code according to all attributes.
|
175
|
-
# @return [
|
201
|
+
# @return [Integer] Hash code
|
176
202
|
def hash
|
177
203
|
[vertical_align, vertical_margin, horizontal_align, horizontal_margin, width, height, opacity].hash
|
178
204
|
end
|
@@ -190,7 +216,9 @@ module MuxRuby
|
|
190
216
|
def build_from_hash(attributes)
|
191
217
|
return nil unless attributes.is_a?(Hash)
|
192
218
|
self.class.openapi_types.each_pair do |key, type|
|
193
|
-
if
|
219
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
220
|
+
self.send("#{key}=", nil)
|
221
|
+
elsif type =~ /\AArray<(.*)>/i
|
194
222
|
# check to ensure the input is an array given that the attribute
|
195
223
|
# is documented as an array but the input is not
|
196
224
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -198,7 +226,7 @@ module MuxRuby
|
|
198
226
|
end
|
199
227
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
200
228
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
201
|
-
end
|
229
|
+
end
|
202
230
|
end
|
203
231
|
|
204
232
|
self
|
@@ -210,8 +238,8 @@ module MuxRuby
|
|
210
238
|
# @return [Object] Deserialized data
|
211
239
|
def _deserialize(type, value)
|
212
240
|
case type.to_sym
|
213
|
-
when :
|
214
|
-
|
241
|
+
when :Time
|
242
|
+
Time.parse(value)
|
215
243
|
when :Date
|
216
244
|
Date.parse(value)
|
217
245
|
when :String
|
@@ -220,7 +248,7 @@ module MuxRuby
|
|
220
248
|
value.to_i
|
221
249
|
when :Float
|
222
250
|
value.to_f
|
223
|
-
when :
|
251
|
+
when :Boolean
|
224
252
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
225
253
|
true
|
226
254
|
else
|
@@ -241,7 +269,9 @@ module MuxRuby
|
|
241
269
|
end
|
242
270
|
end
|
243
271
|
else # model
|
244
|
-
|
272
|
+
# models (e.g. Pet) or oneOf
|
273
|
+
klass = MuxRuby.const_get(type)
|
274
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
245
275
|
end
|
246
276
|
end
|
247
277
|
|
@@ -263,7 +293,11 @@ module MuxRuby
|
|
263
293
|
hash = {}
|
264
294
|
self.class.attribute_map.each_pair do |attr, param|
|
265
295
|
value = self.send(attr)
|
266
|
-
|
296
|
+
if value.nil?
|
297
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
298
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
299
|
+
end
|
300
|
+
|
267
301
|
hash[param] = _to_hash(value)
|
268
302
|
end
|
269
303
|
hash
|
@@ -1,9 +1,17 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
3
|
-
|
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
|
+
|
4
11
|
=end
|
5
12
|
|
6
13
|
require 'date'
|
14
|
+
require 'time'
|
7
15
|
|
8
16
|
module MuxRuby
|
9
17
|
class InputTrack
|
@@ -40,6 +48,11 @@ module MuxRuby
|
|
40
48
|
}
|
41
49
|
end
|
42
50
|
|
51
|
+
# Returns all the JSON keys this model knows about
|
52
|
+
def self.acceptable_attributes
|
53
|
+
attribute_map.values
|
54
|
+
end
|
55
|
+
|
43
56
|
# Attribute type mapping.
|
44
57
|
def self.openapi_types
|
45
58
|
{
|
@@ -55,47 +68,60 @@ module MuxRuby
|
|
55
68
|
}
|
56
69
|
end
|
57
70
|
|
71
|
+
# List of attributes with nullable: true
|
72
|
+
def self.openapi_nullable
|
73
|
+
Set.new([
|
74
|
+
])
|
75
|
+
end
|
76
|
+
|
58
77
|
# Initializes the object
|
59
78
|
# @param [Hash] attributes Model attributes in the form of hash
|
60
79
|
def initialize(attributes = {})
|
61
|
-
|
80
|
+
if (!attributes.is_a?(Hash))
|
81
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::InputTrack` initialize method"
|
82
|
+
end
|
62
83
|
|
63
|
-
# convert string to symbol for hash key
|
64
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
85
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
86
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
87
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::InputTrack`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
88
|
+
end
|
89
|
+
h[k.to_sym] = v
|
90
|
+
}
|
65
91
|
|
66
|
-
if attributes.
|
92
|
+
if attributes.key?(:'type')
|
67
93
|
self.type = attributes[:'type']
|
68
94
|
end
|
69
95
|
|
70
|
-
if attributes.
|
96
|
+
if attributes.key?(:'duration')
|
71
97
|
self.duration = attributes[:'duration']
|
72
98
|
end
|
73
99
|
|
74
|
-
if attributes.
|
100
|
+
if attributes.key?(:'encoding')
|
75
101
|
self.encoding = attributes[:'encoding']
|
76
102
|
end
|
77
103
|
|
78
|
-
if attributes.
|
104
|
+
if attributes.key?(:'width')
|
79
105
|
self.width = attributes[:'width']
|
80
106
|
end
|
81
107
|
|
82
|
-
if attributes.
|
108
|
+
if attributes.key?(:'height')
|
83
109
|
self.height = attributes[:'height']
|
84
110
|
end
|
85
111
|
|
86
|
-
if attributes.
|
112
|
+
if attributes.key?(:'frame_rate')
|
87
113
|
self.frame_rate = attributes[:'frame_rate']
|
88
114
|
end
|
89
115
|
|
90
|
-
if attributes.
|
116
|
+
if attributes.key?(:'sample_rate')
|
91
117
|
self.sample_rate = attributes[:'sample_rate']
|
92
118
|
end
|
93
119
|
|
94
|
-
if attributes.
|
120
|
+
if attributes.key?(:'sample_size')
|
95
121
|
self.sample_size = attributes[:'sample_size']
|
96
122
|
end
|
97
123
|
|
98
|
-
if attributes.
|
124
|
+
if attributes.key?(:'channels')
|
99
125
|
self.channels = attributes[:'channels']
|
100
126
|
end
|
101
127
|
end
|
@@ -136,7 +162,7 @@ module MuxRuby
|
|
136
162
|
end
|
137
163
|
|
138
164
|
# Calculates hash code according to all attributes.
|
139
|
-
# @return [
|
165
|
+
# @return [Integer] Hash code
|
140
166
|
def hash
|
141
167
|
[type, duration, encoding, width, height, frame_rate, sample_rate, sample_size, channels].hash
|
142
168
|
end
|
@@ -154,7 +180,9 @@ module MuxRuby
|
|
154
180
|
def build_from_hash(attributes)
|
155
181
|
return nil unless attributes.is_a?(Hash)
|
156
182
|
self.class.openapi_types.each_pair do |key, type|
|
157
|
-
if
|
183
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
184
|
+
self.send("#{key}=", nil)
|
185
|
+
elsif type =~ /\AArray<(.*)>/i
|
158
186
|
# check to ensure the input is an array given that the attribute
|
159
187
|
# is documented as an array but the input is not
|
160
188
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -162,7 +190,7 @@ module MuxRuby
|
|
162
190
|
end
|
163
191
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
164
192
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
165
|
-
end
|
193
|
+
end
|
166
194
|
end
|
167
195
|
|
168
196
|
self
|
@@ -174,8 +202,8 @@ module MuxRuby
|
|
174
202
|
# @return [Object] Deserialized data
|
175
203
|
def _deserialize(type, value)
|
176
204
|
case type.to_sym
|
177
|
-
when :
|
178
|
-
|
205
|
+
when :Time
|
206
|
+
Time.parse(value)
|
179
207
|
when :Date
|
180
208
|
Date.parse(value)
|
181
209
|
when :String
|
@@ -184,7 +212,7 @@ module MuxRuby
|
|
184
212
|
value.to_i
|
185
213
|
when :Float
|
186
214
|
value.to_f
|
187
|
-
when :
|
215
|
+
when :Boolean
|
188
216
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
189
217
|
true
|
190
218
|
else
|
@@ -205,7 +233,9 @@ module MuxRuby
|
|
205
233
|
end
|
206
234
|
end
|
207
235
|
else # model
|
208
|
-
|
236
|
+
# models (e.g. Pet) or oneOf
|
237
|
+
klass = MuxRuby.const_get(type)
|
238
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
209
239
|
end
|
210
240
|
end
|
211
241
|
|
@@ -227,7 +257,11 @@ module MuxRuby
|
|
227
257
|
hash = {}
|
228
258
|
self.class.attribute_map.each_pair do |attr, param|
|
229
259
|
value = self.send(attr)
|
230
|
-
|
260
|
+
if value.nil?
|
261
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
262
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
263
|
+
end
|
264
|
+
|
231
265
|
hash[param] = _to_hash(value)
|
232
266
|
end
|
233
267
|
hash
|