fastpixapi 1.1.2 → 1.1.3

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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/lib/crystalline/metadata_fields.rb +56 -48
  3. data/lib/crystalline/types.rb +3 -3
  4. data/lib/crystalline.rb +4 -5
  5. data/lib/fastpix_client/dimensions.rb +51 -58
  6. data/lib/fastpix_client/drm_configurations.rb +49 -56
  7. data/lib/fastpix_client/errors.rb +35 -24
  8. data/lib/fastpix_client/fastpixapi.rb +2 -4
  9. data/lib/fastpix_client/in_video_ai_features.rb +100 -160
  10. data/lib/fastpix_client/input_video.rb +66 -74
  11. data/lib/fastpix_client/live_playback.rb +82 -99
  12. data/lib/fastpix_client/manage_live_stream.rb +136 -252
  13. data/lib/fastpix_client/manage_videos.rb +228 -543
  14. data/lib/fastpix_client/metrics.rb +76 -120
  15. data/lib/fastpix_client/models/components/createlivestreamresponsedto.rb +10 -18
  16. data/lib/fastpix_client/models/components/createmediarequest.rb +9 -18
  17. data/lib/fastpix_client/models/components/getallmediaresponse.rb +13 -29
  18. data/lib/fastpix_client/models/components/getcreatelivestreamresponsedto.rb +9 -20
  19. data/lib/fastpix_client/models/components/getmediaresponse.rb +13 -29
  20. data/lib/fastpix_client/models/components/live_media_clips.rb +9 -21
  21. data/lib/fastpix_client/models/components/media.rb +11 -26
  22. data/lib/fastpix_client/models/components/patchresponsedata.rb +9 -18
  23. data/lib/fastpix_client/models/components/sourceaccessmedia.rb +11 -26
  24. data/lib/fastpix_client/models/components/update_media.rb +11 -26
  25. data/lib/fastpix_client/models/components/views.rb +51 -124
  26. data/lib/fastpix_client/models/errors/empty_response_error.rb +15 -0
  27. data/lib/fastpix_client/models/errors.rb +1 -0
  28. data/lib/fastpix_client/models/operations/push_media_settings.rb +9 -20
  29. data/lib/fastpix_client/playback.rb +122 -213
  30. data/lib/fastpix_client/playlist.rb +150 -296
  31. data/lib/fastpix_client/sdk_hooks/registration.rb +2 -2
  32. data/lib/fastpix_client/sdk_hooks/types.rb +4 -0
  33. data/lib/fastpix_client/sdkconfiguration.rb +3 -3
  34. data/lib/fastpix_client/signing_keys.rb +76 -120
  35. data/lib/fastpix_client/simulcast_stream.rb +97 -141
  36. data/lib/fastpix_client/start_live_stream.rb +51 -33
  37. data/lib/fastpix_client/utils/forms.rb +97 -101
  38. data/lib/fastpix_client/utils/headers.rb +44 -34
  39. data/lib/fastpix_client/utils/query_params.rb +39 -29
  40. data/lib/fastpix_client/utils/request_bodies.rb +4 -8
  41. data/lib/fastpix_client/utils/security.rb +30 -18
  42. data/lib/fastpix_client/utils/url.rb +83 -60
  43. data/lib/fastpix_client/utils/utils.rb +19 -37
  44. data/lib/fastpix_client/views.rb +66 -90
  45. data/lib/fastpixapi.rb +10 -10
  46. data/lib/openssl_patch.rb +24 -24
  47. metadata +3 -2
@@ -14,6 +14,42 @@ module FastpixClient
14
14
  extend T::Sig
15
15
  class Metrics
16
16
  extend T::Sig
17
+
18
+ API_ERROR_OCCURRED = 'API error occurred'
19
+ CONTENT_TYPE_HEADER = 'Content-Type'
20
+ CONTENT_TYPE_JSON = 'application/json'
21
+ DEFAULT_CONTENT_TYPE = 'application/octet-stream'
22
+ UNKNOWN_CONTENT_TYPE_ERROR = 'Unknown content type received'
23
+ USER_AGENT_HEADER = 'user-agent'
24
+
25
+ # Applies the SDK after-request hooks and ensures a usable response is present.
26
+ sig { params(http_response: T.nilable(Faraday::Response), error: T.nilable(StandardError), hook_ctx: SDKHooks::HookContext).returns(Faraday::Response) }
27
+ def apply_after_request_hooks(http_response, error, hook_ctx)
28
+ if http_response.nil? || Utils.error_status?(http_response.status)
29
+ http_response = @sdk_configuration.hooks.after_error(
30
+ error: error,
31
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
32
+ hook_ctx: hook_ctx
33
+ ),
34
+ response: http_response
35
+ )
36
+ else
37
+ http_response = @sdk_configuration.hooks.after_success(
38
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
39
+ hook_ctx: hook_ctx
40
+ ),
41
+ response: http_response
42
+ )
43
+ end
44
+
45
+ if http_response.nil?
46
+ raise error unless error.nil?
47
+ raise ::FastpixClient::Models::Errors::EmptyResponseError, 'no response'
48
+ end
49
+
50
+ http_response
51
+ end
52
+ private :apply_after_request_hooks
17
53
 
18
54
  # Operations involving metrics
19
55
 
@@ -85,8 +121,8 @@ module FastpixClient
85
121
  headers = {}
86
122
  headers = T.cast(headers, T::Hash[String, String])
87
123
  query_params = Utils.get_query_params(Models::Operations::ListBreakdownValuesRequest, request, nil)
88
- headers['Accept'] = 'application/json'
89
- headers['user-agent'] = @sdk_configuration.user_agent
124
+ headers['Accept'] = CONTENT_TYPE_JSON
125
+ headers[USER_AGENT_HEADER] = @sdk_configuration.user_agent
90
126
 
91
127
  security = @sdk_configuration.security_source&.call
92
128
 
@@ -125,32 +161,12 @@ module FastpixClient
125
161
  rescue StandardError => e
126
162
  error = e
127
163
  ensure
128
- if http_response.nil? || Utils.error_status?(http_response.status)
129
- http_response = @sdk_configuration.hooks.after_error(
130
- error: error,
131
- hook_ctx: SDKHooks::AfterErrorHookContext.new(
132
- hook_ctx: hook_ctx
133
- ),
134
- response: http_response
135
- )
136
- else
137
- http_response = @sdk_configuration.hooks.after_success(
138
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
139
- hook_ctx: hook_ctx
140
- ),
141
- response: http_response
142
- )
143
- end
144
-
145
- if http_response.nil?
146
- raise error if !error.nil?
147
- raise 'no response'
148
- end
164
+ http_response = apply_after_request_hooks(http_response, error, hook_ctx)
149
165
  end
150
166
 
151
- content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
167
+ content_type = http_response.headers.fetch(CONTENT_TYPE_HEADER, DEFAULT_CONTENT_TYPE)
152
168
  if Utils.match_status_code(http_response.status, ['200'])
153
- if Utils.match_content_type(content_type, 'application/json')
169
+ if Utils.match_content_type(content_type, CONTENT_TYPE_JSON)
154
170
  http_response = @sdk_configuration.hooks.after_success(
155
171
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
156
172
  hook_ctx: hook_ctx
@@ -168,14 +184,14 @@ module FastpixClient
168
184
 
169
185
  return response
170
186
  else
171
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
187
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), UNKNOWN_CONTENT_TYPE_ERROR
172
188
  end
173
189
  elsif Utils.match_status_code(http_response.status, ['4XX'])
174
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
190
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), API_ERROR_OCCURRED
175
191
  elsif Utils.match_status_code(http_response.status, ['5XX'])
176
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
192
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), API_ERROR_OCCURRED
177
193
  else
178
- if Utils.match_content_type(content_type, 'application/json')
194
+ if Utils.match_content_type(content_type, CONTENT_TYPE_JSON)
179
195
  http_response = @sdk_configuration.hooks.after_success(
180
196
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
181
197
  hook_ctx: hook_ctx
@@ -193,7 +209,7 @@ module FastpixClient
193
209
 
194
210
  return response
195
211
  else
196
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
212
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), UNKNOWN_CONTENT_TYPE_ERROR
197
213
  end
198
214
  end
199
215
  end
@@ -247,8 +263,8 @@ module FastpixClient
247
263
  headers = {}
248
264
  headers = T.cast(headers, T::Hash[String, String])
249
265
  query_params = Utils.get_query_params(Models::Operations::ListOverallValuesRequest, request, nil)
250
- headers['Accept'] = 'application/json'
251
- headers['user-agent'] = @sdk_configuration.user_agent
266
+ headers['Accept'] = CONTENT_TYPE_JSON
267
+ headers[USER_AGENT_HEADER] = @sdk_configuration.user_agent
252
268
 
253
269
  security = @sdk_configuration.security_source&.call
254
270
 
@@ -287,32 +303,12 @@ module FastpixClient
287
303
  rescue StandardError => e
288
304
  error = e
289
305
  ensure
290
- if http_response.nil? || Utils.error_status?(http_response.status)
291
- http_response = @sdk_configuration.hooks.after_error(
292
- error: error,
293
- hook_ctx: SDKHooks::AfterErrorHookContext.new(
294
- hook_ctx: hook_ctx
295
- ),
296
- response: http_response
297
- )
298
- else
299
- http_response = @sdk_configuration.hooks.after_success(
300
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
301
- hook_ctx: hook_ctx
302
- ),
303
- response: http_response
304
- )
305
- end
306
-
307
- if http_response.nil?
308
- raise error if !error.nil?
309
- raise 'no response'
310
- end
306
+ http_response = apply_after_request_hooks(http_response, error, hook_ctx)
311
307
  end
312
308
 
313
- content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
309
+ content_type = http_response.headers.fetch(CONTENT_TYPE_HEADER, DEFAULT_CONTENT_TYPE)
314
310
  if Utils.match_status_code(http_response.status, ['200'])
315
- if Utils.match_content_type(content_type, 'application/json')
311
+ if Utils.match_content_type(content_type, CONTENT_TYPE_JSON)
316
312
  http_response = @sdk_configuration.hooks.after_success(
317
313
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
318
314
  hook_ctx: hook_ctx
@@ -330,14 +326,14 @@ module FastpixClient
330
326
 
331
327
  return response
332
328
  else
333
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
329
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), UNKNOWN_CONTENT_TYPE_ERROR
334
330
  end
335
331
  elsif Utils.match_status_code(http_response.status, ['4XX'])
336
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
332
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), API_ERROR_OCCURRED
337
333
  elsif Utils.match_status_code(http_response.status, ['5XX'])
338
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
334
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), API_ERROR_OCCURRED
339
335
  else
340
- if Utils.match_content_type(content_type, 'application/json')
336
+ if Utils.match_content_type(content_type, CONTENT_TYPE_JSON)
341
337
  http_response = @sdk_configuration.hooks.after_success(
342
338
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
343
339
  hook_ctx: hook_ctx
@@ -355,7 +351,7 @@ module FastpixClient
355
351
 
356
352
  return response
357
353
  else
358
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
354
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), UNKNOWN_CONTENT_TYPE_ERROR
359
355
  end
360
356
  end
361
357
  end
@@ -383,8 +379,8 @@ module FastpixClient
383
379
  headers = {}
384
380
  headers = T.cast(headers, T::Hash[String, String])
385
381
  query_params = Utils.get_query_params(Models::Operations::GetTimeseriesDataRequest, request, nil)
386
- headers['Accept'] = 'application/json'
387
- headers['user-agent'] = @sdk_configuration.user_agent
382
+ headers['Accept'] = CONTENT_TYPE_JSON
383
+ headers[USER_AGENT_HEADER] = @sdk_configuration.user_agent
388
384
 
389
385
  security = @sdk_configuration.security_source&.call
390
386
 
@@ -423,32 +419,12 @@ module FastpixClient
423
419
  rescue StandardError => e
424
420
  error = e
425
421
  ensure
426
- if http_response.nil? || Utils.error_status?(http_response.status)
427
- http_response = @sdk_configuration.hooks.after_error(
428
- error: error,
429
- hook_ctx: SDKHooks::AfterErrorHookContext.new(
430
- hook_ctx: hook_ctx
431
- ),
432
- response: http_response
433
- )
434
- else
435
- http_response = @sdk_configuration.hooks.after_success(
436
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
437
- hook_ctx: hook_ctx
438
- ),
439
- response: http_response
440
- )
441
- end
442
-
443
- if http_response.nil?
444
- raise error if !error.nil?
445
- raise 'no response'
446
- end
422
+ http_response = apply_after_request_hooks(http_response, error, hook_ctx)
447
423
  end
448
424
 
449
- content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
425
+ content_type = http_response.headers.fetch(CONTENT_TYPE_HEADER, DEFAULT_CONTENT_TYPE)
450
426
  if Utils.match_status_code(http_response.status, ['200'])
451
- if Utils.match_content_type(content_type, 'application/json')
427
+ if Utils.match_content_type(content_type, CONTENT_TYPE_JSON)
452
428
  http_response = @sdk_configuration.hooks.after_success(
453
429
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
454
430
  hook_ctx: hook_ctx
@@ -466,14 +442,14 @@ module FastpixClient
466
442
 
467
443
  return response
468
444
  else
469
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
445
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), UNKNOWN_CONTENT_TYPE_ERROR
470
446
  end
471
447
  elsif Utils.match_status_code(http_response.status, ['4XX'])
472
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
448
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), API_ERROR_OCCURRED
473
449
  elsif Utils.match_status_code(http_response.status, ['5XX'])
474
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
450
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), API_ERROR_OCCURRED
475
451
  else
476
- if Utils.match_content_type(content_type, 'application/json')
452
+ if Utils.match_content_type(content_type, CONTENT_TYPE_JSON)
477
453
  http_response = @sdk_configuration.hooks.after_success(
478
454
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
479
455
  hook_ctx: hook_ctx
@@ -491,7 +467,7 @@ module FastpixClient
491
467
 
492
468
  return response
493
469
  else
494
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
470
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), UNKNOWN_CONTENT_TYPE_ERROR
495
471
  end
496
472
  end
497
473
  end
@@ -534,8 +510,8 @@ module FastpixClient
534
510
  headers = {}
535
511
  headers = T.cast(headers, T::Hash[String, String])
536
512
  query_params = Utils.get_query_params(Models::Operations::ListComparisonValuesRequest, request, nil)
537
- headers['Accept'] = 'application/json'
538
- headers['user-agent'] = @sdk_configuration.user_agent
513
+ headers['Accept'] = CONTENT_TYPE_JSON
514
+ headers[USER_AGENT_HEADER] = @sdk_configuration.user_agent
539
515
 
540
516
  security = @sdk_configuration.security_source&.call
541
517
 
@@ -574,32 +550,12 @@ module FastpixClient
574
550
  rescue StandardError => e
575
551
  error = e
576
552
  ensure
577
- if http_response.nil? || Utils.error_status?(http_response.status)
578
- http_response = @sdk_configuration.hooks.after_error(
579
- error: error,
580
- hook_ctx: SDKHooks::AfterErrorHookContext.new(
581
- hook_ctx: hook_ctx
582
- ),
583
- response: http_response
584
- )
585
- else
586
- http_response = @sdk_configuration.hooks.after_success(
587
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
588
- hook_ctx: hook_ctx
589
- ),
590
- response: http_response
591
- )
592
- end
593
-
594
- if http_response.nil?
595
- raise error if !error.nil?
596
- raise 'no response'
597
- end
553
+ http_response = apply_after_request_hooks(http_response, error, hook_ctx)
598
554
  end
599
555
 
600
- content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
556
+ content_type = http_response.headers.fetch(CONTENT_TYPE_HEADER, DEFAULT_CONTENT_TYPE)
601
557
  if Utils.match_status_code(http_response.status, ['200'])
602
- if Utils.match_content_type(content_type, 'application/json')
558
+ if Utils.match_content_type(content_type, CONTENT_TYPE_JSON)
603
559
  http_response = @sdk_configuration.hooks.after_success(
604
560
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
605
561
  hook_ctx: hook_ctx
@@ -617,14 +573,14 @@ module FastpixClient
617
573
 
618
574
  return response
619
575
  else
620
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
576
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), UNKNOWN_CONTENT_TYPE_ERROR
621
577
  end
622
578
  elsif Utils.match_status_code(http_response.status, ['4XX'])
623
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
579
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), API_ERROR_OCCURRED
624
580
  elsif Utils.match_status_code(http_response.status, ['5XX'])
625
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
581
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), API_ERROR_OCCURRED
626
582
  else
627
- if Utils.match_content_type(content_type, 'application/json')
583
+ if Utils.match_content_type(content_type, CONTENT_TYPE_JSON)
628
584
  http_response = @sdk_configuration.hooks.after_success(
629
585
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
630
586
  hook_ctx: hook_ctx
@@ -642,7 +598,7 @@ module FastpixClient
642
598
 
643
599
  return response
644
600
  else
645
- raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
601
+ raise ::FastpixClient::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), UNKNOWN_CONTENT_TYPE_ERROR
646
602
  end
647
603
  end
648
604
  end
@@ -71,24 +71,16 @@ module FastpixClient
71
71
  sig { params(other: T.untyped).returns(T::Boolean) }
72
72
  def ==(other)
73
73
  return false unless other.is_a? self.class
74
- return false unless @stream_id == other.stream_id
75
- return false unless @stream_key == other.stream_key
76
- return false unless @srt_secret == other.srt_secret
77
- return false unless @trial == other.trial
78
- return false unless @status == other.status
79
- return false unless @max_resolution == other.max_resolution
80
- return false unless @max_duration == other.max_duration
81
- return false unless @created_at == other.created_at
82
- return false unless @enable_recording == other.enable_recording
83
- return false unless @enable_dvr_mode == other.enable_dvr_mode
84
- return false unless @media_policy == other.media_policy
85
- return false unless @metadata == other.metadata
86
- return false unless @low_latency == other.low_latency
87
- return false unless @closed_captions == other.closed_captions
88
- return false unless @playback_ids == other.playback_ids
89
- return false unless @srt_playback_response == other.srt_playback_response
90
- return false unless @reconnect_window == other.reconnect_window
91
- true
74
+
75
+ [@stream_id, @stream_key, @srt_secret, @trial, @status, @max_resolution,
76
+ @max_duration, @created_at, @enable_recording, @enable_dvr_mode, @media_policy,
77
+ @metadata, @low_latency, @closed_captions, @playback_ids, @srt_playback_response,
78
+ @reconnect_window] ==
79
+ [other.stream_id, other.stream_key, other.srt_secret, other.trial, other.status,
80
+ other.max_resolution, other.max_duration, other.created_at, other.enable_recording,
81
+ other.enable_dvr_mode, other.media_policy, other.metadata, other.low_latency,
82
+ other.closed_captions, other.playback_ids, other.srt_playback_response,
83
+ other.reconnect_window]
92
84
  end
93
85
  end
94
86
  end
@@ -81,24 +81,15 @@ module FastpixClient
81
81
  sig { params(other: T.untyped).returns(T::Boolean) }
82
82
  def ==(other)
83
83
  return false unless other.is_a? self.class
84
- return false unless @inputs == other.inputs
85
- return false unless @metadata == other.metadata
86
- return false unless @drm_configuration_id == other.drm_configuration_id
87
- return false unless @title == other.title
88
- return false unless @creator_id == other.creator_id
89
- return false unless @subtitles == other.subtitles
90
- return false unless @mp4_support == other.mp4_support
91
- return false unless @source_access == other.source_access
92
- return false unless @optimize_audio == other.optimize_audio
93
- return false unless @summary == other.summary
94
- return false unless @chapters == other.chapters
95
- return false unless @named_entities == other.named_entities
96
- return false unless @moderation == other.moderation
97
- return false unless @access_restrictions == other.access_restrictions
98
- return false unless @access_policy == other.access_policy
99
- return false unless @max_resolution == other.max_resolution
100
- return false unless @media_quality == other.media_quality
101
- true
84
+
85
+ [@inputs, @metadata, @drm_configuration_id, @title, @creator_id,
86
+ @subtitles, @mp4_support, @source_access, @optimize_audio, @summary,
87
+ @chapters, @named_entities, @moderation, @access_restrictions, @access_policy,
88
+ @max_resolution, @media_quality] ==
89
+ [other.inputs, other.metadata, other.drm_configuration_id, other.title, other.creator_id,
90
+ other.subtitles, other.mp4_support, other.source_access, other.optimize_audio, other.summary,
91
+ other.chapters, other.named_entities, other.moderation, other.access_restrictions, other.access_policy,
92
+ other.max_resolution, other.media_quality]
102
93
  end
103
94
  end
104
95
  end
@@ -110,35 +110,19 @@ module FastpixClient
110
110
  sig { params(other: T.untyped).returns(T::Boolean) }
111
111
  def ==(other)
112
112
  return false unless other.is_a? self.class
113
- return false unless @id == other.id
114
- return false unless @source_media_id == other.source_media_id
115
- return false unless @workspace_id == other.workspace_id
116
- return false unless @stream_id == other.stream_id
117
- return false unless @media_quality == other.media_quality
118
- return false unless @creator_id == other.creator_id
119
- return false unless @status == other.status
120
- return false unless @mp4_support == other.mp4_support
121
- return false unless @playback_ids == other.playback_ids
122
- return false unless @tracks == other.tracks
123
- return false unless @summary == other.summary
124
- return false unless @chapters == other.chapters
125
- return false unless @named_entities == other.named_entities
126
- return false unless @moderation == other.moderation
127
- return false unless @duration == other.duration
128
- return false unless @frame_rate == other.frame_rate
129
- return false unless @created_at == other.created_at
130
- return false unless @updated_at == other.updated_at
131
- return false unless @thumbnail == other.thumbnail
132
- return false unless @metadata == other.metadata
133
- return false unless @title == other.title
134
- return false unless @max_resolution == other.max_resolution
135
- return false unless @source_resolution == other.source_resolution
136
- return false unless @source_access == other.source_access
137
- return false unless @generated_subtitles == other.generated_subtitles
138
- return false unless @is_audio_only == other.is_audio_only
139
- return false unless @subtitle_available == other.subtitle_available
140
- return false unless @aspect_ratio == other.aspect_ratio
141
- true
113
+
114
+ [@id, @source_media_id, @workspace_id, @stream_id, @media_quality,
115
+ @creator_id, @status, @mp4_support, @playback_ids, @tracks,
116
+ @summary, @chapters, @named_entities, @moderation, @duration,
117
+ @frame_rate, @created_at, @updated_at, @thumbnail, @metadata,
118
+ @title, @max_resolution, @source_resolution, @source_access, @generated_subtitles,
119
+ @is_audio_only, @subtitle_available, @aspect_ratio] ==
120
+ [other.id, other.source_media_id, other.workspace_id, other.stream_id, other.media_quality,
121
+ other.creator_id, other.status, other.mp4_support, other.playback_ids, other.tracks,
122
+ other.summary, other.chapters, other.named_entities, other.moderation, other.duration,
123
+ other.frame_rate, other.created_at, other.updated_at, other.thumbnail, other.metadata,
124
+ other.title, other.max_resolution, other.source_resolution, other.source_access, other.generated_subtitles,
125
+ other.is_audio_only, other.subtitle_available, other.aspect_ratio]
142
126
  end
143
127
  end
144
128
  end
@@ -77,26 +77,15 @@ module FastpixClient
77
77
  sig { params(other: T.untyped).returns(T::Boolean) }
78
78
  def ==(other)
79
79
  return false unless other.is_a? self.class
80
- return false unless @stream_id == other.stream_id
81
- return false unless @stream_key == other.stream_key
82
- return false unless @srt_secret == other.srt_secret
83
- return false unless @trial == other.trial
84
- return false unless @status == other.status
85
- return false unless @max_resolution == other.max_resolution
86
- return false unless @max_duration == other.max_duration
87
- return false unless @created_at == other.created_at
88
- return false unless @enable_recording == other.enable_recording
89
- return false unless @enable_dvr_mode == other.enable_dvr_mode
90
- return false unless @media_policy == other.media_policy
91
- return false unless @metadata == other.metadata
92
- return false unless @low_latency == other.low_latency
93
- return false unless @closed_captions == other.closed_captions
94
- return false unless @playback_ids == other.playback_ids
95
- return false unless @simulcast_responses == other.simulcast_responses
96
- return false unless @media_ids == other.media_ids
97
- return false unless @srt_playback_response == other.srt_playback_response
98
- return false unless @reconnect_window == other.reconnect_window
99
- true
80
+
81
+ [@stream_id, @stream_key, @srt_secret, @trial, @status,
82
+ @max_resolution, @max_duration, @created_at, @enable_recording, @enable_dvr_mode,
83
+ @media_policy, @metadata, @low_latency, @closed_captions, @playback_ids,
84
+ @simulcast_responses, @media_ids, @srt_playback_response, @reconnect_window] ==
85
+ [other.stream_id, other.stream_key, other.srt_secret, other.trial, other.status,
86
+ other.max_resolution, other.max_duration, other.created_at, other.enable_recording, other.enable_dvr_mode,
87
+ other.media_policy, other.metadata, other.low_latency, other.closed_captions, other.playback_ids,
88
+ other.simulcast_responses, other.media_ids, other.srt_playback_response, other.reconnect_window]
100
89
  end
101
90
  end
102
91
  end
@@ -110,35 +110,19 @@ module FastpixClient
110
110
  sig { params(other: T.untyped).returns(T::Boolean) }
111
111
  def ==(other)
112
112
  return false unless other.is_a? self.class
113
- return false unless @id == other.id
114
- return false unless @source_media_id == other.source_media_id
115
- return false unless @workspace_id == other.workspace_id
116
- return false unless @stream_id == other.stream_id
117
- return false unless @media_quality == other.media_quality
118
- return false unless @creator_id == other.creator_id
119
- return false unless @status == other.status
120
- return false unless @mp4_support == other.mp4_support
121
- return false unless @playback_ids == other.playback_ids
122
- return false unless @tracks == other.tracks
123
- return false unless @summary == other.summary
124
- return false unless @chapters == other.chapters
125
- return false unless @named_entities == other.named_entities
126
- return false unless @moderation == other.moderation
127
- return false unless @duration == other.duration
128
- return false unless @frame_rate == other.frame_rate
129
- return false unless @created_at == other.created_at
130
- return false unless @updated_at == other.updated_at
131
- return false unless @thumbnail == other.thumbnail
132
- return false unless @metadata == other.metadata
133
- return false unless @title == other.title
134
- return false unless @max_resolution == other.max_resolution
135
- return false unless @source_resolution == other.source_resolution
136
- return false unless @source_access == other.source_access
137
- return false unless @generated_subtitles == other.generated_subtitles
138
- return false unless @is_audio_only == other.is_audio_only
139
- return false unless @subtitle_available == other.subtitle_available
140
- return false unless @aspect_ratio == other.aspect_ratio
141
- true
113
+
114
+ [@id, @source_media_id, @workspace_id, @stream_id, @media_quality,
115
+ @creator_id, @status, @mp4_support, @playback_ids, @tracks,
116
+ @summary, @chapters, @named_entities, @moderation, @duration,
117
+ @frame_rate, @created_at, @updated_at, @thumbnail, @metadata,
118
+ @title, @max_resolution, @source_resolution, @source_access, @generated_subtitles,
119
+ @is_audio_only, @subtitle_available, @aspect_ratio] ==
120
+ [other.id, other.source_media_id, other.workspace_id, other.stream_id, other.media_quality,
121
+ other.creator_id, other.status, other.mp4_support, other.playback_ids, other.tracks,
122
+ other.summary, other.chapters, other.named_entities, other.moderation, other.duration,
123
+ other.frame_rate, other.created_at, other.updated_at, other.thumbnail, other.metadata,
124
+ other.title, other.max_resolution, other.source_resolution, other.source_access, other.generated_subtitles,
125
+ other.is_audio_only, other.subtitle_available, other.aspect_ratio]
142
126
  end
143
127
  end
144
128
  end
@@ -85,27 +85,15 @@ module FastpixClient
85
85
  sig { params(other: T.untyped).returns(T::Boolean) }
86
86
  def ==(other)
87
87
  return false unless other.is_a? self.class
88
- return false unless @id == other.id
89
- return false unless @workspace_id == other.workspace_id
90
- return false unless @stream_id == other.stream_id
91
- return false unless @creator_id == other.creator_id
92
- return false unless @status == other.status
93
- return false unless @source_access == other.source_access
94
- return false unless @playback_ids == other.playback_ids
95
- return false unless @tracks == other.tracks
96
- return false unless @mp4_support == other.mp4_support
97
- return false unless @duration == other.duration
98
- return false unless @created_at == other.created_at
99
- return false unless @updated_at == other.updated_at
100
- return false unless @thumbnail == other.thumbnail
101
- return false unless @title == other.title
102
- return false unless @max_resolution == other.max_resolution
103
- return false unless @source_resolution == other.source_resolution
104
- return false unless @generated_subtitles == other.generated_subtitles
105
- return false unless @is_audio_only == other.is_audio_only
106
- return false unless @subtitle_available == other.subtitle_available
107
- return false unless @aspect_ratio == other.aspect_ratio
108
- true
88
+
89
+ [@id, @workspace_id, @stream_id, @creator_id, @status,
90
+ @source_access, @playback_ids, @tracks, @mp4_support, @duration,
91
+ @created_at, @updated_at, @thumbnail, @title, @max_resolution,
92
+ @source_resolution, @generated_subtitles, @is_audio_only, @subtitle_available, @aspect_ratio] ==
93
+ [other.id, other.workspace_id, other.stream_id, other.creator_id, other.status,
94
+ other.source_access, other.playback_ids, other.tracks, other.mp4_support, other.duration,
95
+ other.created_at, other.updated_at, other.thumbnail, other.title, other.max_resolution,
96
+ other.source_resolution, other.generated_subtitles, other.is_audio_only, other.subtitle_available, other.aspect_ratio]
109
97
  end
110
98
  end
111
99
  end
@@ -101,32 +101,17 @@ module FastpixClient
101
101
  sig { params(other: T.untyped).returns(T::Boolean) }
102
102
  def ==(other)
103
103
  return false unless other.is_a? self.class
104
- return false unless @id == other.id
105
- return false unless @workspace_id == other.workspace_id
106
- return false unless @media_quality == other.media_quality
107
- return false unless @creator_id == other.creator_id
108
- return false unless @status == other.status
109
- return false unless @mp4_support == other.mp4_support
110
- return false unless @playback_ids == other.playback_ids
111
- return false unless @tracks == other.tracks
112
- return false unless @summary == other.summary
113
- return false unless @chapters == other.chapters
114
- return false unless @named_entities == other.named_entities
115
- return false unless @moderation == other.moderation
116
- return false unless @duration == other.duration
117
- return false unless @created_at == other.created_at
118
- return false unless @updated_at == other.updated_at
119
- return false unless @thumbnail == other.thumbnail
120
- return false unless @metadata == other.metadata
121
- return false unless @title == other.title
122
- return false unless @max_resolution == other.max_resolution
123
- return false unless @source_resolution == other.source_resolution
124
- return false unless @source_access == other.source_access
125
- return false unless @generated_subtitles == other.generated_subtitles
126
- return false unless @is_audio_only == other.is_audio_only
127
- return false unless @subtitle_available == other.subtitle_available
128
- return false unless @aspect_ratio == other.aspect_ratio
129
- true
104
+
105
+ [@id, @workspace_id, @media_quality, @creator_id, @status,
106
+ @mp4_support, @playback_ids, @tracks, @summary, @chapters,
107
+ @named_entities, @moderation, @duration, @created_at, @updated_at,
108
+ @thumbnail, @metadata, @title, @max_resolution, @source_resolution,
109
+ @source_access, @generated_subtitles, @is_audio_only, @subtitle_available, @aspect_ratio] ==
110
+ [other.id, other.workspace_id, other.media_quality, other.creator_id, other.status,
111
+ other.mp4_support, other.playback_ids, other.tracks, other.summary, other.chapters,
112
+ other.named_entities, other.moderation, other.duration, other.created_at, other.updated_at,
113
+ other.thumbnail, other.metadata, other.title, other.max_resolution, other.source_resolution,
114
+ other.source_access, other.generated_subtitles, other.is_audio_only, other.subtitle_available, other.aspect_ratio]
130
115
  end
131
116
  end
132
117
  end