telestream_cloud 1.1.0 → 2.0.0.1

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 (306) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/README.md +16 -354
  4. data/flip/.gitignore +39 -0
  5. data/flip/.rspec +2 -0
  6. data/flip/.swagger-codegen-ignore +23 -0
  7. data/flip/.swagger-codegen/VERSION +1 -0
  8. data/flip/Gemfile +7 -0
  9. data/flip/README.md +130 -0
  10. data/flip/Rakefile +8 -0
  11. data/flip/docs/CanceledResponse.md +8 -0
  12. data/flip/docs/CloudNotificationSettings.md +11 -0
  13. data/flip/docs/CloudNotificationSettingsEvents.md +11 -0
  14. data/flip/docs/CopyProfileBody.md +9 -0
  15. data/flip/docs/CountResponse.md +8 -0
  16. data/flip/docs/CreateEncodingBody.md +10 -0
  17. data/flip/docs/CreateVideoBody.md +12 -0
  18. data/flip/docs/DeletedResponse.md +8 -0
  19. data/flip/docs/Encoding.md +38 -0
  20. data/flip/docs/EncodingSignedUrl.md +8 -0
  21. data/flip/docs/EncodingSignedUrls.md +8 -0
  22. data/flip/docs/Error.md +9 -0
  23. data/flip/docs/ExtraFile.md +10 -0
  24. data/flip/docs/Factory.md +25 -0
  25. data/flip/docs/FactoryBody.md +23 -0
  26. data/flip/docs/FactoryBodyStorageCredentialAttributes.md +11 -0
  27. data/flip/docs/FactorySync.md +8 -0
  28. data/flip/docs/FactorySyncBody.md +8 -0
  29. data/flip/docs/FlipApi.md +2179 -0
  30. data/flip/docs/PaginatedEncodingsCollection.md +11 -0
  31. data/flip/docs/PaginatedFactoryCollection.md +11 -0
  32. data/flip/docs/PaginatedProfilesCollection.md +11 -0
  33. data/flip/docs/PaginatedVideoCollection.md +11 -0
  34. data/flip/docs/PaginatedWorkflowsCollection.md +11 -0
  35. data/flip/docs/Profile.md +135 -0
  36. data/flip/docs/ProfileBody.md +137 -0
  37. data/flip/docs/ResubmitVideoBody.md +8 -0
  38. data/flip/docs/RetriedResponse.md +8 -0
  39. data/flip/docs/SignedVideoUrl.md +8 -0
  40. data/flip/docs/UpdateEncodingBody.md +9 -0
  41. data/flip/docs/UploadSession.md +13 -0
  42. data/flip/docs/Video.md +31 -0
  43. data/flip/docs/VideoMetadata.md +7 -0
  44. data/flip/docs/VideoUploadBody.md +24 -0
  45. data/flip/git_push.sh +55 -0
  46. data/flip/lib/telestream_cloud_flip.rb +79 -0
  47. data/flip/lib/telestream_cloud_flip/api/flip_api.rb +2385 -0
  48. data/flip/lib/telestream_cloud_flip/api_client.rb +389 -0
  49. data/flip/lib/telestream_cloud_flip/api_error.rb +38 -0
  50. data/flip/lib/telestream_cloud_flip/configuration.rb +209 -0
  51. data/flip/lib/telestream_cloud_flip/models/canceled_response.rb +189 -0
  52. data/flip/lib/telestream_cloud_flip/models/cloud_notification_settings.rb +237 -0
  53. data/flip/lib/telestream_cloud_flip/models/cloud_notification_settings_events.rb +239 -0
  54. data/flip/lib/telestream_cloud_flip/models/copy_profile_body.rb +209 -0
  55. data/flip/lib/telestream_cloud_flip/models/count_response.rb +189 -0
  56. data/flip/lib/telestream_cloud_flip/models/create_encoding_body.rb +214 -0
  57. data/flip/lib/telestream_cloud_flip/models/create_video_body.rb +231 -0
  58. data/flip/lib/telestream_cloud_flip/models/deleted_response.rb +189 -0
  59. data/flip/lib/telestream_cloud_flip/models/encoding.rb +486 -0
  60. data/flip/lib/telestream_cloud_flip/models/encoding_signed_url.rb +189 -0
  61. data/flip/lib/telestream_cloud_flip/models/encoding_signed_urls.rb +191 -0
  62. data/flip/lib/telestream_cloud_flip/models/error.rb +199 -0
  63. data/flip/lib/telestream_cloud_flip/models/extra_file.rb +221 -0
  64. data/flip/lib/telestream_cloud_flip/models/factory.rb +388 -0
  65. data/flip/lib/telestream_cloud_flip/models/factory_body.rb +374 -0
  66. data/flip/lib/telestream_cloud_flip/models/factory_body_storage_credential_attributes.rb +215 -0
  67. data/flip/lib/telestream_cloud_flip/models/factory_sync.rb +222 -0
  68. data/flip/lib/telestream_cloud_flip/models/factory_sync_body.rb +227 -0
  69. data/flip/lib/telestream_cloud_flip/models/paginated_encodings_collection.rb +240 -0
  70. data/flip/lib/telestream_cloud_flip/models/paginated_factory_collection.rb +220 -0
  71. data/flip/lib/telestream_cloud_flip/models/paginated_profiles_collection.rb +220 -0
  72. data/flip/lib/telestream_cloud_flip/models/paginated_video_collection.rb +220 -0
  73. data/flip/lib/telestream_cloud_flip/models/paginated_workflows_collection.rb +220 -0
  74. data/flip/lib/telestream_cloud_flip/models/profile.rb +1777 -0
  75. data/flip/lib/telestream_cloud_flip/models/profile_body.rb +1762 -0
  76. data/flip/lib/telestream_cloud_flip/models/resubmit_video_body.rb +189 -0
  77. data/flip/lib/telestream_cloud_flip/models/retried_response.rb +189 -0
  78. data/flip/lib/telestream_cloud_flip/models/signed_video_url.rb +189 -0
  79. data/flip/lib/telestream_cloud_flip/models/update_encoding_body.rb +199 -0
  80. data/flip/lib/telestream_cloud_flip/models/upload_session.rb +249 -0
  81. data/flip/lib/telestream_cloud_flip/models/video.rb +418 -0
  82. data/flip/lib/telestream_cloud_flip/models/video_metadata.rb +179 -0
  83. data/flip/lib/telestream_cloud_flip/models/video_upload_body.rb +362 -0
  84. data/flip/lib/telestream_cloud_flip/uploader.rb +244 -0
  85. data/flip/lib/telestream_cloud_flip/version.rb +18 -0
  86. data/flip/spec/api/flip_api_spec.rb +550 -0
  87. data/flip/spec/api_client_spec.rb +226 -0
  88. data/flip/spec/configuration_spec.rb +42 -0
  89. data/flip/spec/models/canceled_response_spec.rb +42 -0
  90. data/flip/spec/models/cloud_notification_settings_events_spec.rb +60 -0
  91. data/flip/spec/models/cloud_notification_settings_spec.rb +60 -0
  92. data/flip/spec/models/copy_profile_body_spec.rb +48 -0
  93. data/flip/spec/models/count_response_spec.rb +42 -0
  94. data/flip/spec/models/create_encoding_body_spec.rb +54 -0
  95. data/flip/spec/models/create_video_body_spec.rb +66 -0
  96. data/flip/spec/models/deleted_response_spec.rb +42 -0
  97. data/flip/spec/models/encoding_signed_url_spec.rb +42 -0
  98. data/flip/spec/models/encoding_signed_urls_spec.rb +42 -0
  99. data/flip/spec/models/encoding_spec.rb +222 -0
  100. data/flip/spec/models/error_spec.rb +48 -0
  101. data/flip/spec/models/extra_file_spec.rb +54 -0
  102. data/flip/spec/models/factory_body_spec.rb +136 -0
  103. data/flip/spec/models/factory_body_storage_credential_attributes_spec.rb +60 -0
  104. data/flip/spec/models/factory_spec.rb +148 -0
  105. data/flip/spec/models/factory_sync_body_spec.rb +46 -0
  106. data/flip/spec/models/factory_sync_spec.rb +46 -0
  107. data/flip/spec/models/paginated_encodings_collection_spec.rb +60 -0
  108. data/flip/spec/models/paginated_factory_collection_spec.rb +60 -0
  109. data/flip/spec/models/paginated_profiles_collection_spec.rb +60 -0
  110. data/flip/spec/models/paginated_video_collection_spec.rb +60 -0
  111. data/flip/spec/models/paginated_workflows_collection_spec.rb +60 -0
  112. data/flip/spec/models/profile_body_spec.rb +916 -0
  113. data/flip/spec/models/profile_spec.rb +916 -0
  114. data/flip/spec/models/resubmit_video_body_spec.rb +42 -0
  115. data/flip/spec/models/retried_response_spec.rb +42 -0
  116. data/flip/spec/models/signed_video_url_spec.rb +42 -0
  117. data/flip/spec/models/update_encoding_body_spec.rb +48 -0
  118. data/flip/spec/models/upload_session_spec.rb +72 -0
  119. data/flip/spec/models/video_metadata_spec.rb +36 -0
  120. data/flip/spec/models/video_spec.rb +180 -0
  121. data/flip/spec/models/video_upload_body_spec.rb +138 -0
  122. data/flip/spec/spec_helper.rb +111 -0
  123. data/flip/telestream_cloud_flip.gemspec +47 -0
  124. data/lib/telestream_cloud.rb +0 -31
  125. data/lib/telestream_cloud/flip.rb +1 -9
  126. data/lib/telestream_cloud/qc.rb +1 -0
  127. data/lib/telestream_cloud/tts.rb +1 -0
  128. data/lib/telestream_cloud/version.rb +1 -1
  129. data/qc/.gitignore +39 -0
  130. data/qc/.rspec +2 -0
  131. data/qc/.swagger-codegen-ignore +23 -0
  132. data/qc/.swagger-codegen/VERSION +1 -0
  133. data/qc/Gemfile +7 -0
  134. data/qc/README.md +58 -0
  135. data/qc/Rakefile +8 -0
  136. data/qc/docs/Alert.md +13 -0
  137. data/qc/docs/AudioStream.md +13 -0
  138. data/qc/docs/Container.md +9 -0
  139. data/qc/docs/Data.md +10 -0
  140. data/qc/docs/Data1.md +9 -0
  141. data/qc/docs/ExtraFile.md +10 -0
  142. data/qc/docs/Job.md +12 -0
  143. data/qc/docs/JobData.md +9 -0
  144. data/qc/docs/JobDetails.md +9 -0
  145. data/qc/docs/JobDetailsResult.md +8 -0
  146. data/qc/docs/JobsCollection.md +12 -0
  147. data/qc/docs/Media.md +10 -0
  148. data/qc/docs/Options.md +7 -0
  149. data/qc/docs/Project.md +12 -0
  150. data/qc/docs/Proxy.md +12 -0
  151. data/qc/docs/QcApi.md +719 -0
  152. data/qc/docs/UploadSession.md +13 -0
  153. data/qc/docs/VideoStream.md +13 -0
  154. data/qc/docs/VideoUploadBody.md +12 -0
  155. data/qc/git_push.sh +55 -0
  156. data/qc/lib/telestream_cloud_qc.rb +64 -0
  157. data/qc/lib/telestream_cloud_qc/api/qc_api.rb +781 -0
  158. data/qc/lib/telestream_cloud_qc/api_client.rb +389 -0
  159. data/qc/lib/telestream_cloud_qc/api_error.rb +38 -0
  160. data/qc/lib/telestream_cloud_qc/configuration.rb +209 -0
  161. data/qc/lib/telestream_cloud_qc/models/alert.rb +236 -0
  162. data/qc/lib/telestream_cloud_qc/models/audio_stream.rb +238 -0
  163. data/qc/lib/telestream_cloud_qc/models/container.rb +198 -0
  164. data/qc/lib/telestream_cloud_qc/models/data.rb +208 -0
  165. data/qc/lib/telestream_cloud_qc/models/data_1.rb +197 -0
  166. data/qc/lib/telestream_cloud_qc/models/extra_file.rb +221 -0
  167. data/qc/lib/telestream_cloud_qc/models/job.rb +269 -0
  168. data/qc/lib/telestream_cloud_qc/models/job_data.rb +197 -0
  169. data/qc/lib/telestream_cloud_qc/models/job_details.rb +199 -0
  170. data/qc/lib/telestream_cloud_qc/models/job_details_result.rb +190 -0
  171. data/qc/lib/telestream_cloud_qc/models/jobs_collection.rb +230 -0
  172. data/qc/lib/telestream_cloud_qc/models/media.rb +210 -0
  173. data/qc/lib/telestream_cloud_qc/models/options.rb +179 -0
  174. data/qc/lib/telestream_cloud_qc/models/project.rb +262 -0
  175. data/qc/lib/telestream_cloud_qc/models/proxy.rb +224 -0
  176. data/qc/lib/telestream_cloud_qc/models/upload_session.rb +249 -0
  177. data/qc/lib/telestream_cloud_qc/models/video_stream.rb +235 -0
  178. data/qc/lib/telestream_cloud_qc/models/video_upload_body.rb +242 -0
  179. data/qc/lib/telestream_cloud_qc/uploader.rb +244 -0
  180. data/qc/lib/telestream_cloud_qc/version.rb +18 -0
  181. data/qc/spec/api/qc_api_spec.rb +202 -0
  182. data/qc/spec/api_client_spec.rb +226 -0
  183. data/qc/spec/configuration_spec.rb +42 -0
  184. data/qc/spec/models/alert_spec.rb +72 -0
  185. data/qc/spec/models/audio_stream_spec.rb +72 -0
  186. data/qc/spec/models/container_spec.rb +48 -0
  187. data/qc/spec/models/data_1_spec.rb +48 -0
  188. data/qc/spec/models/data_spec.rb +54 -0
  189. data/qc/spec/models/extra_file_spec.rb +54 -0
  190. data/qc/spec/models/job_data_spec.rb +48 -0
  191. data/qc/spec/models/job_details_result_spec.rb +42 -0
  192. data/qc/spec/models/job_details_spec.rb +48 -0
  193. data/qc/spec/models/job_spec.rb +74 -0
  194. data/qc/spec/models/jobs_collection_spec.rb +66 -0
  195. data/qc/spec/models/media_spec.rb +54 -0
  196. data/qc/spec/models/options_spec.rb +36 -0
  197. data/qc/spec/models/project_spec.rb +70 -0
  198. data/qc/spec/models/proxy_spec.rb +66 -0
  199. data/qc/spec/models/upload_session_spec.rb +72 -0
  200. data/qc/spec/models/video_stream_spec.rb +72 -0
  201. data/qc/spec/models/video_upload_body_spec.rb +66 -0
  202. data/qc/spec/spec_helper.rb +111 -0
  203. data/qc/telestream_cloud_qc.gemspec +47 -0
  204. data/telestream_cloud.gemspec +7 -12
  205. data/tts/.gitignore +39 -0
  206. data/tts/.rspec +2 -0
  207. data/tts/.swagger-codegen-ignore +23 -0
  208. data/tts/.swagger-codegen/VERSION +1 -0
  209. data/tts/Gemfile +7 -0
  210. data/tts/README.md +92 -0
  211. data/tts/Rakefile +8 -0
  212. data/tts/docs/CorporaCollection.md +8 -0
  213. data/tts/docs/Corpus.md +9 -0
  214. data/tts/docs/ErrorResponse.md +7 -0
  215. data/tts/docs/ExtraFile.md +10 -0
  216. data/tts/docs/Fragment.md +10 -0
  217. data/tts/docs/FragmentVariant.md +9 -0
  218. data/tts/docs/Job.md +23 -0
  219. data/tts/docs/JobResult.md +8 -0
  220. data/tts/docs/JobsCollection.md +12 -0
  221. data/tts/docs/Project.md +18 -0
  222. data/tts/docs/ProjectsCollection.md +12 -0
  223. data/tts/docs/Result.md +12 -0
  224. data/tts/docs/TtsApi.md +902 -0
  225. data/tts/docs/UploadSession.md +13 -0
  226. data/tts/docs/VideoUploadBody.md +12 -0
  227. data/tts/git_push.sh +55 -0
  228. data/tts/lib/telestream_cloud_tts.rb +60 -0
  229. data/tts/lib/telestream_cloud_tts/api/tts_api.rb +946 -0
  230. data/tts/lib/telestream_cloud_tts/api_client.rb +389 -0
  231. data/tts/lib/telestream_cloud_tts/api_error.rb +38 -0
  232. data/tts/lib/telestream_cloud_tts/configuration.rb +209 -0
  233. data/tts/lib/telestream_cloud_tts/models/corpora_collection.rb +191 -0
  234. data/tts/lib/telestream_cloud_tts/models/corpus.rb +199 -0
  235. data/tts/lib/telestream_cloud_tts/models/error_response.rb +179 -0
  236. data/tts/lib/telestream_cloud_tts/models/extra_file.rb +221 -0
  237. data/tts/lib/telestream_cloud_tts/models/fragment.rb +211 -0
  238. data/tts/lib/telestream_cloud_tts/models/fragment_variant.rb +199 -0
  239. data/tts/lib/telestream_cloud_tts/models/job.rb +372 -0
  240. data/tts/lib/telestream_cloud_tts/models/job_result.rb +191 -0
  241. data/tts/lib/telestream_cloud_tts/models/jobs_collection.rb +230 -0
  242. data/tts/lib/telestream_cloud_tts/models/project.rb +322 -0
  243. data/tts/lib/telestream_cloud_tts/models/projects_collection.rb +230 -0
  244. data/tts/lib/telestream_cloud_tts/models/result.rb +230 -0
  245. data/tts/lib/telestream_cloud_tts/models/upload_session.rb +249 -0
  246. data/tts/lib/telestream_cloud_tts/models/video_upload_body.rb +241 -0
  247. data/tts/lib/telestream_cloud_tts/uploader.rb +244 -0
  248. data/tts/lib/telestream_cloud_tts/version.rb +18 -0
  249. data/tts/spec/api/tts_api_spec.rb +236 -0
  250. data/tts/spec/api_client_spec.rb +226 -0
  251. data/tts/spec/configuration_spec.rb +42 -0
  252. data/tts/spec/models/corpora_collection_spec.rb +42 -0
  253. data/tts/spec/models/corpus_spec.rb +48 -0
  254. data/tts/spec/models/error_response_spec.rb +36 -0
  255. data/tts/spec/models/extra_file_spec.rb +54 -0
  256. data/tts/spec/models/fragment_spec.rb +54 -0
  257. data/tts/spec/models/fragment_variant_spec.rb +48 -0
  258. data/tts/spec/models/job_result_spec.rb +42 -0
  259. data/tts/spec/models/job_spec.rb +136 -0
  260. data/tts/spec/models/jobs_collection_spec.rb +66 -0
  261. data/tts/spec/models/project_spec.rb +106 -0
  262. data/tts/spec/models/projects_collection_spec.rb +66 -0
  263. data/tts/spec/models/result_spec.rb +66 -0
  264. data/tts/spec/models/upload_session_spec.rb +72 -0
  265. data/tts/spec/models/video_upload_body_spec.rb +66 -0
  266. data/tts/spec/spec_helper.rb +111 -0
  267. data/tts/telestream_cloud_tts.gemspec +47 -0
  268. metadata +281 -123
  269. data/Gemfile +0 -2
  270. data/lib/telestream_cloud/api_authentication.rb +0 -66
  271. data/lib/telestream_cloud/base.rb +0 -111
  272. data/lib/telestream_cloud/config.rb +0 -87
  273. data/lib/telestream_cloud/connection.rb +0 -101
  274. data/lib/telestream_cloud/errors.rb +0 -17
  275. data/lib/telestream_cloud/faraday.rb +0 -84
  276. data/lib/telestream_cloud/modules/associations.rb +0 -55
  277. data/lib/telestream_cloud/modules/builders.rb +0 -45
  278. data/lib/telestream_cloud/modules/destroyers.rb +0 -25
  279. data/lib/telestream_cloud/modules/factory_connection.rb +0 -7
  280. data/lib/telestream_cloud/modules/finders.rb +0 -68
  281. data/lib/telestream_cloud/modules/router.rb +0 -62
  282. data/lib/telestream_cloud/modules/updatable.rb +0 -31
  283. data/lib/telestream_cloud/modules/video_state.rb +0 -16
  284. data/lib/telestream_cloud/parallel_uploader.rb +0 -52
  285. data/lib/telestream_cloud/proxies/encoding_scope.rb +0 -56
  286. data/lib/telestream_cloud/proxies/profile_scope.rb +0 -7
  287. data/lib/telestream_cloud/proxies/proxy.rb +0 -27
  288. data/lib/telestream_cloud/proxies/scope.rb +0 -94
  289. data/lib/telestream_cloud/proxies/video_scope.rb +0 -28
  290. data/lib/telestream_cloud/resources/encoding.rb +0 -47
  291. data/lib/telestream_cloud/resources/factory.rb +0 -72
  292. data/lib/telestream_cloud/resources/profile.rb +0 -22
  293. data/lib/telestream_cloud/resources/resource.rb +0 -48
  294. data/lib/telestream_cloud/resources/video.rb +0 -39
  295. data/lib/telestream_cloud/telestream_cloud.rb +0 -69
  296. data/lib/telestream_cloud/upload_session.rb +0 -40
  297. data/lib/telestream_cloud/uploader.rb +0 -123
  298. data/lib/telestream_cloud/uploader/file_reader.rb +0 -27
  299. data/spec/cloud_spec.rb +0 -132
  300. data/spec/encoding_spec.rb +0 -260
  301. data/spec/heroku_spec.rb +0 -32
  302. data/spec/panda_spec.rb +0 -206
  303. data/spec/profile_spec.rb +0 -117
  304. data/spec/spec_helper.rb +0 -18
  305. data/spec/uploader_spec.rb +0 -143
  306. data/spec/video_spec.rb +0 -399
@@ -0,0 +1,189 @@
1
+ =begin
2
+ #Flip API
3
+
4
+ #Description
5
+
6
+ OpenAPI spec version: 3.1.0
7
+ Contact: cloudsupport@telestream.net
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module TelestreamCloud::Flip
16
+
17
+ class EncodingSignedUrl
18
+ # A signed URLs pointing to the encoding's output.
19
+ attr_accessor :signed_url
20
+
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'signed_url' => :'signed_url'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.swagger_types
31
+ {
32
+ :'signed_url' => :'String'
33
+ }
34
+ end
35
+
36
+ # Initializes the object
37
+ # @param [Hash] attributes Model attributes in the form of hash
38
+ def initialize(attributes = {})
39
+ return unless attributes.is_a?(Hash)
40
+
41
+ # convert string to symbol for hash key
42
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
43
+
44
+ if attributes.has_key?(:'signed_url')
45
+ self.signed_url = attributes[:'signed_url']
46
+ end
47
+
48
+ end
49
+
50
+ # Show invalid properties with the reasons. Usually used together with valid?
51
+ # @return Array for valid properties with the reasons
52
+ def list_invalid_properties
53
+ invalid_properties = Array.new
54
+ return invalid_properties
55
+ end
56
+
57
+ # Check to see if the all the properties in the model are valid
58
+ # @return true if the model is valid
59
+ def valid?
60
+ return true
61
+ end
62
+
63
+ # Checks equality by comparing each attribute.
64
+ # @param [Object] Object to be compared
65
+ def ==(o)
66
+ return true if self.equal?(o)
67
+ self.class == o.class &&
68
+ signed_url == o.signed_url
69
+ end
70
+
71
+ # @see the `==` method
72
+ # @param [Object] Object to be compared
73
+ def eql?(o)
74
+ self == o
75
+ end
76
+
77
+ # Calculates hash code according to all attributes.
78
+ # @return [Fixnum] Hash code
79
+ def hash
80
+ [signed_url].hash
81
+ end
82
+
83
+ # Builds the object from hash
84
+ # @param [Hash] attributes Model attributes in the form of hash
85
+ # @return [Object] Returns the model itself
86
+ def build_from_hash(attributes)
87
+ return nil unless attributes.is_a?(Hash)
88
+ self.class.swagger_types.each_pair do |key, type|
89
+ if type =~ /\AArray<(.*)>/i
90
+ # check to ensure the input is an array given that the the attribute
91
+ # is documented as an array but the input is not
92
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
93
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
94
+ end
95
+ elsif !attributes[self.class.attribute_map[key]].nil?
96
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
97
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
98
+ end
99
+
100
+ self
101
+ end
102
+
103
+ # Deserializes the data based on type
104
+ # @param string type Data type
105
+ # @param string value Value to be deserialized
106
+ # @return [Object] Deserialized data
107
+ def _deserialize(type, value)
108
+ case type.to_sym
109
+ when :DateTime
110
+ DateTime.parse(value)
111
+ when :Date
112
+ Date.parse(value)
113
+ when :String
114
+ value.to_s
115
+ when :Integer
116
+ value.to_i
117
+ when :Float
118
+ value.to_f
119
+ when :BOOLEAN
120
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
121
+ true
122
+ else
123
+ false
124
+ end
125
+ when :Object
126
+ # generic object (usually a Hash), return directly
127
+ value
128
+ when /\AArray<(?<inner_type>.+)>\z/
129
+ inner_type = Regexp.last_match[:inner_type]
130
+ value.map { |v| _deserialize(inner_type, v) }
131
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
132
+ k_type = Regexp.last_match[:k_type]
133
+ v_type = Regexp.last_match[:v_type]
134
+ {}.tap do |hash|
135
+ value.each do |k, v|
136
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
137
+ end
138
+ end
139
+ else # model
140
+ temp_model = TelestreamCloud::Flip.const_get(type).new
141
+ temp_model.build_from_hash(value)
142
+ end
143
+ end
144
+
145
+ # Returns the string representation of the object
146
+ # @return [String] String presentation of the object
147
+ def to_s
148
+ to_hash.to_s
149
+ end
150
+
151
+ # to_body is an alias to to_hash (backward compatibility)
152
+ # @return [Hash] Returns the object in the form of hash
153
+ def to_body
154
+ to_hash
155
+ end
156
+
157
+ # Returns the object in the form of hash
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_hash
160
+ hash = {}
161
+ self.class.attribute_map.each_pair do |attr, param|
162
+ value = self.send(attr)
163
+ next if value.nil?
164
+ hash[param] = _to_hash(value)
165
+ end
166
+ hash
167
+ end
168
+
169
+ # Outputs non-array value in the form of hash
170
+ # For object, use to_hash. Otherwise, just return the value
171
+ # @param [Object] value Any valid value
172
+ # @return [Hash] Returns the value in the form of hash
173
+ def _to_hash(value)
174
+ if value.is_a?(Array)
175
+ value.compact.map{ |v| _to_hash(v) }
176
+ elsif value.is_a?(Hash)
177
+ {}.tap do |hash|
178
+ value.each { |k, v| hash[k] = _to_hash(v) }
179
+ end
180
+ elsif value.respond_to? :to_hash
181
+ value.to_hash
182
+ else
183
+ value
184
+ end
185
+ end
186
+
187
+ end
188
+
189
+ end
@@ -0,0 +1,191 @@
1
+ =begin
2
+ #Flip API
3
+
4
+ #Description
5
+
6
+ OpenAPI spec version: 3.1.0
7
+ Contact: cloudsupport@telestream.net
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module TelestreamCloud::Flip
16
+
17
+ class EncodingSignedUrls
18
+ # A list of signed URLs pointing to the encoding's outputs.
19
+ attr_accessor :signed_urls
20
+
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'signed_urls' => :'signed_urls'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.swagger_types
31
+ {
32
+ :'signed_urls' => :'Array<String>'
33
+ }
34
+ end
35
+
36
+ # Initializes the object
37
+ # @param [Hash] attributes Model attributes in the form of hash
38
+ def initialize(attributes = {})
39
+ return unless attributes.is_a?(Hash)
40
+
41
+ # convert string to symbol for hash key
42
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
43
+
44
+ if attributes.has_key?(:'signed_urls')
45
+ if (value = attributes[:'signed_urls']).is_a?(Array)
46
+ self.signed_urls = value
47
+ end
48
+ end
49
+
50
+ end
51
+
52
+ # Show invalid properties with the reasons. Usually used together with valid?
53
+ # @return Array for valid properties with the reasons
54
+ def list_invalid_properties
55
+ invalid_properties = Array.new
56
+ return invalid_properties
57
+ end
58
+
59
+ # Check to see if the all the properties in the model are valid
60
+ # @return true if the model is valid
61
+ def valid?
62
+ return true
63
+ end
64
+
65
+ # Checks equality by comparing each attribute.
66
+ # @param [Object] Object to be compared
67
+ def ==(o)
68
+ return true if self.equal?(o)
69
+ self.class == o.class &&
70
+ signed_urls == o.signed_urls
71
+ end
72
+
73
+ # @see the `==` method
74
+ # @param [Object] Object to be compared
75
+ def eql?(o)
76
+ self == o
77
+ end
78
+
79
+ # Calculates hash code according to all attributes.
80
+ # @return [Fixnum] Hash code
81
+ def hash
82
+ [signed_urls].hash
83
+ end
84
+
85
+ # Builds the object from hash
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ # @return [Object] Returns the model itself
88
+ def build_from_hash(attributes)
89
+ return nil unless attributes.is_a?(Hash)
90
+ self.class.swagger_types.each_pair do |key, type|
91
+ if type =~ /\AArray<(.*)>/i
92
+ # check to ensure the input is an array given that the the attribute
93
+ # is documented as an array but the input is not
94
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
95
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
96
+ end
97
+ elsif !attributes[self.class.attribute_map[key]].nil?
98
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
99
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
100
+ end
101
+
102
+ self
103
+ end
104
+
105
+ # Deserializes the data based on type
106
+ # @param string type Data type
107
+ # @param string value Value to be deserialized
108
+ # @return [Object] Deserialized data
109
+ def _deserialize(type, value)
110
+ case type.to_sym
111
+ when :DateTime
112
+ DateTime.parse(value)
113
+ when :Date
114
+ Date.parse(value)
115
+ when :String
116
+ value.to_s
117
+ when :Integer
118
+ value.to_i
119
+ when :Float
120
+ value.to_f
121
+ when :BOOLEAN
122
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
123
+ true
124
+ else
125
+ false
126
+ end
127
+ when :Object
128
+ # generic object (usually a Hash), return directly
129
+ value
130
+ when /\AArray<(?<inner_type>.+)>\z/
131
+ inner_type = Regexp.last_match[:inner_type]
132
+ value.map { |v| _deserialize(inner_type, v) }
133
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
134
+ k_type = Regexp.last_match[:k_type]
135
+ v_type = Regexp.last_match[:v_type]
136
+ {}.tap do |hash|
137
+ value.each do |k, v|
138
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
139
+ end
140
+ end
141
+ else # model
142
+ temp_model = TelestreamCloud::Flip.const_get(type).new
143
+ temp_model.build_from_hash(value)
144
+ end
145
+ end
146
+
147
+ # Returns the string representation of the object
148
+ # @return [String] String presentation of the object
149
+ def to_s
150
+ to_hash.to_s
151
+ end
152
+
153
+ # to_body is an alias to to_hash (backward compatibility)
154
+ # @return [Hash] Returns the object in the form of hash
155
+ def to_body
156
+ to_hash
157
+ end
158
+
159
+ # Returns the object in the form of hash
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_hash
162
+ hash = {}
163
+ self.class.attribute_map.each_pair do |attr, param|
164
+ value = self.send(attr)
165
+ next if value.nil?
166
+ hash[param] = _to_hash(value)
167
+ end
168
+ hash
169
+ end
170
+
171
+ # Outputs non-array value in the form of hash
172
+ # For object, use to_hash. Otherwise, just return the value
173
+ # @param [Object] value Any valid value
174
+ # @return [Hash] Returns the value in the form of hash
175
+ def _to_hash(value)
176
+ if value.is_a?(Array)
177
+ value.compact.map{ |v| _to_hash(v) }
178
+ elsif value.is_a?(Hash)
179
+ {}.tap do |hash|
180
+ value.each { |k, v| hash[k] = _to_hash(v) }
181
+ end
182
+ elsif value.respond_to? :to_hash
183
+ value.to_hash
184
+ else
185
+ value
186
+ end
187
+ end
188
+
189
+ end
190
+
191
+ end
@@ -0,0 +1,199 @@
1
+ =begin
2
+ #Flip API
3
+
4
+ #Description
5
+
6
+ OpenAPI spec version: 3.1.0
7
+ Contact: cloudsupport@telestream.net
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module TelestreamCloud::Flip
16
+
17
+ class Error
18
+ # Error type
19
+ attr_accessor :error
20
+
21
+ # Explanation why the error has been raised.
22
+ attr_accessor :message
23
+
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'error' => :'error',
29
+ :'message' => :'message'
30
+ }
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.swagger_types
35
+ {
36
+ :'error' => :'String',
37
+ :'message' => :'String'
38
+ }
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
48
+
49
+ if attributes.has_key?(:'error')
50
+ self.error = attributes[:'error']
51
+ end
52
+
53
+ if attributes.has_key?(:'message')
54
+ self.message = attributes[:'message']
55
+ end
56
+
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ return invalid_properties
64
+ end
65
+
66
+ # Check to see if the all the properties in the model are valid
67
+ # @return true if the model is valid
68
+ def valid?
69
+ return true
70
+ end
71
+
72
+ # Checks equality by comparing each attribute.
73
+ # @param [Object] Object to be compared
74
+ def ==(o)
75
+ return true if self.equal?(o)
76
+ self.class == o.class &&
77
+ error == o.error &&
78
+ message == o.message
79
+ end
80
+
81
+ # @see the `==` method
82
+ # @param [Object] Object to be compared
83
+ def eql?(o)
84
+ self == o
85
+ end
86
+
87
+ # Calculates hash code according to all attributes.
88
+ # @return [Fixnum] Hash code
89
+ def hash
90
+ [error, message].hash
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def build_from_hash(attributes)
97
+ return nil unless attributes.is_a?(Hash)
98
+ self.class.swagger_types.each_pair do |key, type|
99
+ if type =~ /\AArray<(.*)>/i
100
+ # check to ensure the input is an array given that the the attribute
101
+ # is documented as an array but the input is not
102
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
103
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
104
+ end
105
+ elsif !attributes[self.class.attribute_map[key]].nil?
106
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
107
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
108
+ end
109
+
110
+ self
111
+ end
112
+
113
+ # Deserializes the data based on type
114
+ # @param string type Data type
115
+ # @param string value Value to be deserialized
116
+ # @return [Object] Deserialized data
117
+ def _deserialize(type, value)
118
+ case type.to_sym
119
+ when :DateTime
120
+ DateTime.parse(value)
121
+ when :Date
122
+ Date.parse(value)
123
+ when :String
124
+ value.to_s
125
+ when :Integer
126
+ value.to_i
127
+ when :Float
128
+ value.to_f
129
+ when :BOOLEAN
130
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
131
+ true
132
+ else
133
+ false
134
+ end
135
+ when :Object
136
+ # generic object (usually a Hash), return directly
137
+ value
138
+ when /\AArray<(?<inner_type>.+)>\z/
139
+ inner_type = Regexp.last_match[:inner_type]
140
+ value.map { |v| _deserialize(inner_type, v) }
141
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
142
+ k_type = Regexp.last_match[:k_type]
143
+ v_type = Regexp.last_match[:v_type]
144
+ {}.tap do |hash|
145
+ value.each do |k, v|
146
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
147
+ end
148
+ end
149
+ else # model
150
+ temp_model = TelestreamCloud::Flip.const_get(type).new
151
+ temp_model.build_from_hash(value)
152
+ end
153
+ end
154
+
155
+ # Returns the string representation of the object
156
+ # @return [String] String presentation of the object
157
+ def to_s
158
+ to_hash.to_s
159
+ end
160
+
161
+ # to_body is an alias to to_hash (backward compatibility)
162
+ # @return [Hash] Returns the object in the form of hash
163
+ def to_body
164
+ to_hash
165
+ end
166
+
167
+ # Returns the object in the form of hash
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_hash
170
+ hash = {}
171
+ self.class.attribute_map.each_pair do |attr, param|
172
+ value = self.send(attr)
173
+ next if value.nil?
174
+ hash[param] = _to_hash(value)
175
+ end
176
+ hash
177
+ end
178
+
179
+ # Outputs non-array value in the form of hash
180
+ # For object, use to_hash. Otherwise, just return the value
181
+ # @param [Object] value Any valid value
182
+ # @return [Hash] Returns the value in the form of hash
183
+ def _to_hash(value)
184
+ if value.is_a?(Array)
185
+ value.compact.map{ |v| _to_hash(v) }
186
+ elsif value.is_a?(Hash)
187
+ {}.tap do |hash|
188
+ value.each { |k, v| hash[k] = _to_hash(v) }
189
+ end
190
+ elsif value.respond_to? :to_hash
191
+ value.to_hash
192
+ else
193
+ value
194
+ end
195
+ end
196
+
197
+ end
198
+
199
+ end