telestream_cloud_flip 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +130 -0
  4. data/Rakefile +8 -0
  5. data/docs/CanceledResponse.md +8 -0
  6. data/docs/CloudNotificationSettings.md +11 -0
  7. data/docs/CloudNotificationSettingsEvents.md +11 -0
  8. data/docs/CopyProfileBody.md +9 -0
  9. data/docs/CountResponse.md +8 -0
  10. data/docs/CreateEncodingBody.md +10 -0
  11. data/docs/CreateVideoBody.md +12 -0
  12. data/docs/DeletedResponse.md +8 -0
  13. data/docs/Encoding.md +38 -0
  14. data/docs/EncodingSignedUrl.md +8 -0
  15. data/docs/EncodingSignedUrls.md +8 -0
  16. data/docs/Error.md +9 -0
  17. data/docs/ExtraFile.md +10 -0
  18. data/docs/Factory.md +25 -0
  19. data/docs/FactoryBody.md +23 -0
  20. data/docs/FactoryBodyStorageCredentialAttributes.md +11 -0
  21. data/docs/FactorySync.md +8 -0
  22. data/docs/FactorySyncBody.md +8 -0
  23. data/docs/FlipApi.md +2179 -0
  24. data/docs/PaginatedEncodingsCollection.md +11 -0
  25. data/docs/PaginatedFactoryCollection.md +11 -0
  26. data/docs/PaginatedProfilesCollection.md +11 -0
  27. data/docs/PaginatedVideoCollection.md +11 -0
  28. data/docs/PaginatedWorkflowsCollection.md +11 -0
  29. data/docs/Profile.md +135 -0
  30. data/docs/ProfileBody.md +137 -0
  31. data/docs/ResubmitVideoBody.md +8 -0
  32. data/docs/RetriedResponse.md +8 -0
  33. data/docs/SignedVideoUrl.md +8 -0
  34. data/docs/UpdateEncodingBody.md +9 -0
  35. data/docs/UploadSession.md +13 -0
  36. data/docs/Video.md +31 -0
  37. data/docs/VideoMetadata.md +7 -0
  38. data/docs/VideoUploadBody.md +24 -0
  39. data/git_push.sh +55 -0
  40. data/lib/telestream_cloud_flip/api/flip_api.rb +2385 -0
  41. data/lib/telestream_cloud_flip/api_client.rb +389 -0
  42. data/lib/telestream_cloud_flip/api_error.rb +38 -0
  43. data/lib/telestream_cloud_flip/configuration.rb +209 -0
  44. data/lib/telestream_cloud_flip/models/canceled_response.rb +189 -0
  45. data/lib/telestream_cloud_flip/models/cloud_notification_settings.rb +237 -0
  46. data/lib/telestream_cloud_flip/models/cloud_notification_settings_events.rb +239 -0
  47. data/lib/telestream_cloud_flip/models/copy_profile_body.rb +209 -0
  48. data/lib/telestream_cloud_flip/models/count_response.rb +189 -0
  49. data/lib/telestream_cloud_flip/models/create_encoding_body.rb +214 -0
  50. data/lib/telestream_cloud_flip/models/create_video_body.rb +231 -0
  51. data/lib/telestream_cloud_flip/models/deleted_response.rb +189 -0
  52. data/lib/telestream_cloud_flip/models/encoding.rb +486 -0
  53. data/lib/telestream_cloud_flip/models/encoding_signed_url.rb +189 -0
  54. data/lib/telestream_cloud_flip/models/encoding_signed_urls.rb +191 -0
  55. data/lib/telestream_cloud_flip/models/error.rb +199 -0
  56. data/lib/telestream_cloud_flip/models/extra_file.rb +221 -0
  57. data/lib/telestream_cloud_flip/models/factory.rb +388 -0
  58. data/lib/telestream_cloud_flip/models/factory_body.rb +374 -0
  59. data/lib/telestream_cloud_flip/models/factory_body_storage_credential_attributes.rb +215 -0
  60. data/lib/telestream_cloud_flip/models/factory_sync.rb +222 -0
  61. data/lib/telestream_cloud_flip/models/factory_sync_body.rb +227 -0
  62. data/lib/telestream_cloud_flip/models/paginated_encodings_collection.rb +240 -0
  63. data/lib/telestream_cloud_flip/models/paginated_factory_collection.rb +220 -0
  64. data/lib/telestream_cloud_flip/models/paginated_profiles_collection.rb +220 -0
  65. data/lib/telestream_cloud_flip/models/paginated_video_collection.rb +220 -0
  66. data/lib/telestream_cloud_flip/models/paginated_workflows_collection.rb +220 -0
  67. data/lib/telestream_cloud_flip/models/profile.rb +1777 -0
  68. data/lib/telestream_cloud_flip/models/profile_body.rb +1762 -0
  69. data/lib/telestream_cloud_flip/models/resubmit_video_body.rb +189 -0
  70. data/lib/telestream_cloud_flip/models/retried_response.rb +189 -0
  71. data/lib/telestream_cloud_flip/models/signed_video_url.rb +189 -0
  72. data/lib/telestream_cloud_flip/models/update_encoding_body.rb +199 -0
  73. data/lib/telestream_cloud_flip/models/upload_session.rb +249 -0
  74. data/lib/telestream_cloud_flip/models/video.rb +418 -0
  75. data/lib/telestream_cloud_flip/models/video_metadata.rb +179 -0
  76. data/lib/telestream_cloud_flip/models/video_upload_body.rb +362 -0
  77. data/lib/telestream_cloud_flip/uploader.rb +244 -0
  78. data/lib/telestream_cloud_flip/version.rb +18 -0
  79. data/lib/telestream_cloud_flip.rb +79 -0
  80. data/spec/api/flip_api_spec.rb +550 -0
  81. data/spec/api_client_spec.rb +226 -0
  82. data/spec/configuration_spec.rb +42 -0
  83. data/spec/models/canceled_response_spec.rb +42 -0
  84. data/spec/models/cloud_notification_settings_events_spec.rb +60 -0
  85. data/spec/models/cloud_notification_settings_spec.rb +60 -0
  86. data/spec/models/copy_profile_body_spec.rb +48 -0
  87. data/spec/models/count_response_spec.rb +42 -0
  88. data/spec/models/create_encoding_body_spec.rb +54 -0
  89. data/spec/models/create_video_body_spec.rb +66 -0
  90. data/spec/models/deleted_response_spec.rb +42 -0
  91. data/spec/models/encoding_signed_url_spec.rb +42 -0
  92. data/spec/models/encoding_signed_urls_spec.rb +42 -0
  93. data/spec/models/encoding_spec.rb +222 -0
  94. data/spec/models/error_spec.rb +48 -0
  95. data/spec/models/extra_file_spec.rb +54 -0
  96. data/spec/models/factory_body_spec.rb +136 -0
  97. data/spec/models/factory_body_storage_credential_attributes_spec.rb +60 -0
  98. data/spec/models/factory_spec.rb +148 -0
  99. data/spec/models/factory_sync_body_spec.rb +46 -0
  100. data/spec/models/factory_sync_spec.rb +46 -0
  101. data/spec/models/paginated_encodings_collection_spec.rb +60 -0
  102. data/spec/models/paginated_factory_collection_spec.rb +60 -0
  103. data/spec/models/paginated_profiles_collection_spec.rb +60 -0
  104. data/spec/models/paginated_video_collection_spec.rb +60 -0
  105. data/spec/models/paginated_workflows_collection_spec.rb +60 -0
  106. data/spec/models/profile_body_spec.rb +916 -0
  107. data/spec/models/profile_spec.rb +916 -0
  108. data/spec/models/resubmit_video_body_spec.rb +42 -0
  109. data/spec/models/retried_response_spec.rb +42 -0
  110. data/spec/models/signed_video_url_spec.rb +42 -0
  111. data/spec/models/update_encoding_body_spec.rb +48 -0
  112. data/spec/models/upload_session_spec.rb +72 -0
  113. data/spec/models/video_metadata_spec.rb +36 -0
  114. data/spec/models/video_spec.rb +180 -0
  115. data/spec/models/video_upload_body_spec.rb +138 -0
  116. data/spec/spec_helper.rb +111 -0
  117. data/telestream_cloud_flip.gemspec +47 -0
  118. metadata +396 -0
@@ -0,0 +1,388 @@
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 Factory
18
+ # A unique identifier of a Factory.
19
+ attr_accessor :id
20
+
21
+ # Human-readable identifier of a Factory.
22
+ attr_accessor :name
23
+
24
+ # A region where the factory is located.
25
+ attr_accessor :factory_region
26
+
27
+ # A bucket where processed files will be stored.
28
+ attr_accessor :output_bucket_name
29
+
30
+ # Specify if your files are public or private (private files need authorization url to access). By default this is not set.
31
+ attr_accessor :acl
32
+
33
+ # A date and time when a Factory has been created.
34
+ attr_accessor :created_at
35
+
36
+ # A date and time when a Factory has been updated last time.
37
+ attr_accessor :updated_at
38
+
39
+ # An URL pointing to the output_bucket_name.
40
+ attr_accessor :url
41
+
42
+ # Specify if you want to use multi-factor server-side 256-bit AES-256 data encryption with Amazon S3-managed encryption keys (SSE-S3). Each object is encrypted using a unique key which as an additional safeguard is encrypted itself with a master key that S3 regularly rotates. By default this is not set.
43
+ attr_accessor :server_side_encryption
44
+
45
+ # A name of an input bucket.
46
+ attr_accessor :input_bucket_name
47
+
48
+ # Determines whether the Factory should be notified about new files added to the input bucket.
49
+ attr_accessor :input_bucket_watch
50
+
51
+ attr_accessor :input_bucket_files_map
52
+
53
+ # Determines how often the input bucket is synchronised.
54
+ attr_accessor :input_bucket_sync_every_n_min
55
+
56
+ attr_accessor :input_bucket_recursive
57
+
58
+ # A pattern that will be used to locate files in the input bucket. Valid wildcards might be used.
59
+ attr_accessor :input_bucket_file_pattern
60
+
61
+ attr_accessor :outputs_path_format
62
+
63
+ # Specifies which storage provider the factory should use. Available options: S3: 0, Google Cloud Storage: 1, FTP storage: 2, Google Cloud Interoperability Storage: 5, Flip storage: 7, FASP storage: 8, Azure Blob Storage: 9
64
+ attr_accessor :storage_provider
65
+
66
+ attr_accessor :provider_specific_settings
67
+
68
+ class EnumAttributeValidator
69
+ attr_reader :datatype
70
+ attr_reader :allowable_values
71
+
72
+ def initialize(datatype, allowable_values)
73
+ @allowable_values = allowable_values.map do |value|
74
+ case datatype.to_s
75
+ when /Integer/i
76
+ value.to_i
77
+ when /Float/i
78
+ value.to_f
79
+ else
80
+ value
81
+ end
82
+ end
83
+ end
84
+
85
+ def valid?(value)
86
+ !value || allowable_values.include?(value)
87
+ end
88
+ end
89
+
90
+ # Attribute mapping from ruby-style variable name to JSON key.
91
+ def self.attribute_map
92
+ {
93
+ :'id' => :'id',
94
+ :'name' => :'name',
95
+ :'factory_region' => :'factory_region',
96
+ :'output_bucket_name' => :'output_bucket_name',
97
+ :'acl' => :'acl',
98
+ :'created_at' => :'created_at',
99
+ :'updated_at' => :'updated_at',
100
+ :'url' => :'url',
101
+ :'server_side_encryption' => :'server_side_encryption',
102
+ :'input_bucket_name' => :'input_bucket_name',
103
+ :'input_bucket_watch' => :'input_bucket_watch',
104
+ :'input_bucket_files_map' => :'input_bucket_files_map',
105
+ :'input_bucket_sync_every_n_min' => :'input_bucket_sync_every_n_min',
106
+ :'input_bucket_recursive' => :'input_bucket_recursive',
107
+ :'input_bucket_file_pattern' => :'input_bucket_file_pattern',
108
+ :'outputs_path_format' => :'outputs_path_format',
109
+ :'storage_provider' => :'storage_provider',
110
+ :'provider_specific_settings' => :'provider_specific_settings'
111
+ }
112
+ end
113
+
114
+ # Attribute type mapping.
115
+ def self.swagger_types
116
+ {
117
+ :'id' => :'String',
118
+ :'name' => :'String',
119
+ :'factory_region' => :'String',
120
+ :'output_bucket_name' => :'String',
121
+ :'acl' => :'String',
122
+ :'created_at' => :'String',
123
+ :'updated_at' => :'String',
124
+ :'url' => :'String',
125
+ :'server_side_encryption' => :'BOOLEAN',
126
+ :'input_bucket_name' => :'String',
127
+ :'input_bucket_watch' => :'BOOLEAN',
128
+ :'input_bucket_files_map' => :'String',
129
+ :'input_bucket_sync_every_n_min' => :'String',
130
+ :'input_bucket_recursive' => :'String',
131
+ :'input_bucket_file_pattern' => :'String',
132
+ :'outputs_path_format' => :'String',
133
+ :'storage_provider' => :'Integer',
134
+ :'provider_specific_settings' => :'Object'
135
+ }
136
+ end
137
+
138
+ # Initializes the object
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ def initialize(attributes = {})
141
+ return unless attributes.is_a?(Hash)
142
+
143
+ # convert string to symbol for hash key
144
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
145
+
146
+ if attributes.has_key?(:'id')
147
+ self.id = attributes[:'id']
148
+ end
149
+
150
+ if attributes.has_key?(:'name')
151
+ self.name = attributes[:'name']
152
+ end
153
+
154
+ if attributes.has_key?(:'factory_region')
155
+ self.factory_region = attributes[:'factory_region']
156
+ end
157
+
158
+ if attributes.has_key?(:'output_bucket_name')
159
+ self.output_bucket_name = attributes[:'output_bucket_name']
160
+ end
161
+
162
+ if attributes.has_key?(:'acl')
163
+ self.acl = attributes[:'acl']
164
+ end
165
+
166
+ if attributes.has_key?(:'created_at')
167
+ self.created_at = attributes[:'created_at']
168
+ end
169
+
170
+ if attributes.has_key?(:'updated_at')
171
+ self.updated_at = attributes[:'updated_at']
172
+ end
173
+
174
+ if attributes.has_key?(:'url')
175
+ self.url = attributes[:'url']
176
+ end
177
+
178
+ if attributes.has_key?(:'server_side_encryption')
179
+ self.server_side_encryption = attributes[:'server_side_encryption']
180
+ end
181
+
182
+ if attributes.has_key?(:'input_bucket_name')
183
+ self.input_bucket_name = attributes[:'input_bucket_name']
184
+ end
185
+
186
+ if attributes.has_key?(:'input_bucket_watch')
187
+ self.input_bucket_watch = attributes[:'input_bucket_watch']
188
+ end
189
+
190
+ if attributes.has_key?(:'input_bucket_files_map')
191
+ self.input_bucket_files_map = attributes[:'input_bucket_files_map']
192
+ end
193
+
194
+ if attributes.has_key?(:'input_bucket_sync_every_n_min')
195
+ self.input_bucket_sync_every_n_min = attributes[:'input_bucket_sync_every_n_min']
196
+ end
197
+
198
+ if attributes.has_key?(:'input_bucket_recursive')
199
+ self.input_bucket_recursive = attributes[:'input_bucket_recursive']
200
+ end
201
+
202
+ if attributes.has_key?(:'input_bucket_file_pattern')
203
+ self.input_bucket_file_pattern = attributes[:'input_bucket_file_pattern']
204
+ end
205
+
206
+ if attributes.has_key?(:'outputs_path_format')
207
+ self.outputs_path_format = attributes[:'outputs_path_format']
208
+ end
209
+
210
+ if attributes.has_key?(:'storage_provider')
211
+ self.storage_provider = attributes[:'storage_provider']
212
+ end
213
+
214
+ if attributes.has_key?(:'provider_specific_settings')
215
+ self.provider_specific_settings = attributes[:'provider_specific_settings']
216
+ end
217
+
218
+ end
219
+
220
+ # Show invalid properties with the reasons. Usually used together with valid?
221
+ # @return Array for valid properties with the reasons
222
+ def list_invalid_properties
223
+ invalid_properties = Array.new
224
+ return invalid_properties
225
+ end
226
+
227
+ # Check to see if the all the properties in the model are valid
228
+ # @return true if the model is valid
229
+ def valid?
230
+ acl_validator = EnumAttributeValidator.new('String', ["public", "private"])
231
+ return false unless acl_validator.valid?(@acl)
232
+ return true
233
+ end
234
+
235
+ # Custom attribute writer method checking allowed values (enum).
236
+ # @param [Object] acl Object to be assigned
237
+ def acl=(acl)
238
+ validator = EnumAttributeValidator.new('String', ["public", "private"])
239
+ unless validator.valid?(acl)
240
+ fail ArgumentError, "invalid value for 'acl', must be one of #{validator.allowable_values}."
241
+ end
242
+ @acl = acl
243
+ end
244
+
245
+ # Checks equality by comparing each attribute.
246
+ # @param [Object] Object to be compared
247
+ def ==(o)
248
+ return true if self.equal?(o)
249
+ self.class == o.class &&
250
+ id == o.id &&
251
+ name == o.name &&
252
+ factory_region == o.factory_region &&
253
+ output_bucket_name == o.output_bucket_name &&
254
+ acl == o.acl &&
255
+ created_at == o.created_at &&
256
+ updated_at == o.updated_at &&
257
+ url == o.url &&
258
+ server_side_encryption == o.server_side_encryption &&
259
+ input_bucket_name == o.input_bucket_name &&
260
+ input_bucket_watch == o.input_bucket_watch &&
261
+ input_bucket_files_map == o.input_bucket_files_map &&
262
+ input_bucket_sync_every_n_min == o.input_bucket_sync_every_n_min &&
263
+ input_bucket_recursive == o.input_bucket_recursive &&
264
+ input_bucket_file_pattern == o.input_bucket_file_pattern &&
265
+ outputs_path_format == o.outputs_path_format &&
266
+ storage_provider == o.storage_provider &&
267
+ provider_specific_settings == o.provider_specific_settings
268
+ end
269
+
270
+ # @see the `==` method
271
+ # @param [Object] Object to be compared
272
+ def eql?(o)
273
+ self == o
274
+ end
275
+
276
+ # Calculates hash code according to all attributes.
277
+ # @return [Fixnum] Hash code
278
+ def hash
279
+ [id, name, factory_region, output_bucket_name, acl, created_at, updated_at, url, server_side_encryption, input_bucket_name, input_bucket_watch, input_bucket_files_map, input_bucket_sync_every_n_min, input_bucket_recursive, input_bucket_file_pattern, outputs_path_format, storage_provider, provider_specific_settings].hash
280
+ end
281
+
282
+ # Builds the object from hash
283
+ # @param [Hash] attributes Model attributes in the form of hash
284
+ # @return [Object] Returns the model itself
285
+ def build_from_hash(attributes)
286
+ return nil unless attributes.is_a?(Hash)
287
+ self.class.swagger_types.each_pair do |key, type|
288
+ if type =~ /\AArray<(.*)>/i
289
+ # check to ensure the input is an array given that the the attribute
290
+ # is documented as an array but the input is not
291
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
292
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
293
+ end
294
+ elsif !attributes[self.class.attribute_map[key]].nil?
295
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
296
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
297
+ end
298
+
299
+ self
300
+ end
301
+
302
+ # Deserializes the data based on type
303
+ # @param string type Data type
304
+ # @param string value Value to be deserialized
305
+ # @return [Object] Deserialized data
306
+ def _deserialize(type, value)
307
+ case type.to_sym
308
+ when :DateTime
309
+ DateTime.parse(value)
310
+ when :Date
311
+ Date.parse(value)
312
+ when :String
313
+ value.to_s
314
+ when :Integer
315
+ value.to_i
316
+ when :Float
317
+ value.to_f
318
+ when :BOOLEAN
319
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
320
+ true
321
+ else
322
+ false
323
+ end
324
+ when :Object
325
+ # generic object (usually a Hash), return directly
326
+ value
327
+ when /\AArray<(?<inner_type>.+)>\z/
328
+ inner_type = Regexp.last_match[:inner_type]
329
+ value.map { |v| _deserialize(inner_type, v) }
330
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
331
+ k_type = Regexp.last_match[:k_type]
332
+ v_type = Regexp.last_match[:v_type]
333
+ {}.tap do |hash|
334
+ value.each do |k, v|
335
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
336
+ end
337
+ end
338
+ else # model
339
+ temp_model = TelestreamCloud::Flip.const_get(type).new
340
+ temp_model.build_from_hash(value)
341
+ end
342
+ end
343
+
344
+ # Returns the string representation of the object
345
+ # @return [String] String presentation of the object
346
+ def to_s
347
+ to_hash.to_s
348
+ end
349
+
350
+ # to_body is an alias to to_hash (backward compatibility)
351
+ # @return [Hash] Returns the object in the form of hash
352
+ def to_body
353
+ to_hash
354
+ end
355
+
356
+ # Returns the object in the form of hash
357
+ # @return [Hash] Returns the object in the form of hash
358
+ def to_hash
359
+ hash = {}
360
+ self.class.attribute_map.each_pair do |attr, param|
361
+ value = self.send(attr)
362
+ next if value.nil?
363
+ hash[param] = _to_hash(value)
364
+ end
365
+ hash
366
+ end
367
+
368
+ # Outputs non-array value in the form of hash
369
+ # For object, use to_hash. Otherwise, just return the value
370
+ # @param [Object] value Any valid value
371
+ # @return [Hash] Returns the value in the form of hash
372
+ def _to_hash(value)
373
+ if value.is_a?(Array)
374
+ value.compact.map{ |v| _to_hash(v) }
375
+ elsif value.is_a?(Hash)
376
+ {}.tap do |hash|
377
+ value.each { |k, v| hash[k] = _to_hash(v) }
378
+ end
379
+ elsif value.respond_to? :to_hash
380
+ value.to_hash
381
+ else
382
+ value
383
+ end
384
+ end
385
+
386
+ end
387
+
388
+ end