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,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 UpdateEncodingBody
18
+ # Id of a Profile that will be used for encoding.
19
+ attr_accessor :profile_id
20
+
21
+ # A name of a Profile that will be used for encoding.
22
+ attr_accessor :profile_name
23
+
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'profile_id' => :'profile_id',
29
+ :'profile_name' => :'profile_name'
30
+ }
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.swagger_types
35
+ {
36
+ :'profile_id' => :'String',
37
+ :'profile_name' => :'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?(:'profile_id')
50
+ self.profile_id = attributes[:'profile_id']
51
+ end
52
+
53
+ if attributes.has_key?(:'profile_name')
54
+ self.profile_name = attributes[:'profile_name']
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
+ profile_id == o.profile_id &&
78
+ profile_name == o.profile_name
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
+ [profile_id, profile_name].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
@@ -0,0 +1,249 @@
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 UploadSession
18
+ # An unique identifier of the UploadSession.
19
+ attr_accessor :id
20
+
21
+ # An URL to which chunks of the uploaded file should be sent
22
+ attr_accessor :location
23
+
24
+ # A number of chunks that are expected by the upstream.
25
+ attr_accessor :parts
26
+
27
+ # An expected size of uploaded chunks.
28
+ attr_accessor :part_size
29
+
30
+ # A maximum number of concurrent connections.
31
+ attr_accessor :max_connections
32
+
33
+ # An object containing additional files uploaded using the session.
34
+ attr_accessor :extra_files
35
+
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'id' => :'id',
41
+ :'location' => :'location',
42
+ :'parts' => :'parts',
43
+ :'part_size' => :'part_size',
44
+ :'max_connections' => :'max_connections',
45
+ :'extra_files' => :'extra_files'
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.swagger_types
51
+ {
52
+ :'id' => :'String',
53
+ :'location' => :'String',
54
+ :'parts' => :'Integer',
55
+ :'part_size' => :'Integer',
56
+ :'max_connections' => :'Integer',
57
+ :'extra_files' => :'Object'
58
+ }
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ return unless attributes.is_a?(Hash)
65
+
66
+ # convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
68
+
69
+ if attributes.has_key?(:'id')
70
+ self.id = attributes[:'id']
71
+ end
72
+
73
+ if attributes.has_key?(:'location')
74
+ self.location = attributes[:'location']
75
+ end
76
+
77
+ if attributes.has_key?(:'parts')
78
+ self.parts = attributes[:'parts']
79
+ end
80
+
81
+ if attributes.has_key?(:'part_size')
82
+ self.part_size = attributes[:'part_size']
83
+ end
84
+
85
+ if attributes.has_key?(:'max_connections')
86
+ self.max_connections = attributes[:'max_connections']
87
+ end
88
+
89
+ if attributes.has_key?(:'extra_files')
90
+ self.extra_files = attributes[:'extra_files']
91
+ end
92
+
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ invalid_properties = Array.new
99
+ if @id.nil?
100
+ invalid_properties.push("invalid value for 'id', id cannot be nil.")
101
+ end
102
+
103
+ if @location.nil?
104
+ invalid_properties.push("invalid value for 'location', location cannot be nil.")
105
+ end
106
+
107
+ return invalid_properties
108
+ end
109
+
110
+ # Check to see if the all the properties in the model are valid
111
+ # @return true if the model is valid
112
+ def valid?
113
+ return false if @id.nil?
114
+ return false if @location.nil?
115
+ return true
116
+ end
117
+
118
+ # Checks equality by comparing each attribute.
119
+ # @param [Object] Object to be compared
120
+ def ==(o)
121
+ return true if self.equal?(o)
122
+ self.class == o.class &&
123
+ id == o.id &&
124
+ location == o.location &&
125
+ parts == o.parts &&
126
+ part_size == o.part_size &&
127
+ max_connections == o.max_connections &&
128
+ extra_files == o.extra_files
129
+ end
130
+
131
+ # @see the `==` method
132
+ # @param [Object] Object to be compared
133
+ def eql?(o)
134
+ self == o
135
+ end
136
+
137
+ # Calculates hash code according to all attributes.
138
+ # @return [Fixnum] Hash code
139
+ def hash
140
+ [id, location, parts, part_size, max_connections, extra_files].hash
141
+ end
142
+
143
+ # Builds the object from hash
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ # @return [Object] Returns the model itself
146
+ def build_from_hash(attributes)
147
+ return nil unless attributes.is_a?(Hash)
148
+ self.class.swagger_types.each_pair do |key, type|
149
+ if type =~ /\AArray<(.*)>/i
150
+ # check to ensure the input is an array given that the the attribute
151
+ # is documented as an array but the input is not
152
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
153
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
154
+ end
155
+ elsif !attributes[self.class.attribute_map[key]].nil?
156
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
157
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
158
+ end
159
+
160
+ self
161
+ end
162
+
163
+ # Deserializes the data based on type
164
+ # @param string type Data type
165
+ # @param string value Value to be deserialized
166
+ # @return [Object] Deserialized data
167
+ def _deserialize(type, value)
168
+ case type.to_sym
169
+ when :DateTime
170
+ DateTime.parse(value)
171
+ when :Date
172
+ Date.parse(value)
173
+ when :String
174
+ value.to_s
175
+ when :Integer
176
+ value.to_i
177
+ when :Float
178
+ value.to_f
179
+ when :BOOLEAN
180
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
181
+ true
182
+ else
183
+ false
184
+ end
185
+ when :Object
186
+ # generic object (usually a Hash), return directly
187
+ value
188
+ when /\AArray<(?<inner_type>.+)>\z/
189
+ inner_type = Regexp.last_match[:inner_type]
190
+ value.map { |v| _deserialize(inner_type, v) }
191
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
192
+ k_type = Regexp.last_match[:k_type]
193
+ v_type = Regexp.last_match[:v_type]
194
+ {}.tap do |hash|
195
+ value.each do |k, v|
196
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
197
+ end
198
+ end
199
+ else # model
200
+ temp_model = TelestreamCloud::Flip.const_get(type).new
201
+ temp_model.build_from_hash(value)
202
+ end
203
+ end
204
+
205
+ # Returns the string representation of the object
206
+ # @return [String] String presentation of the object
207
+ def to_s
208
+ to_hash.to_s
209
+ end
210
+
211
+ # to_body is an alias to to_hash (backward compatibility)
212
+ # @return [Hash] Returns the object in the form of hash
213
+ def to_body
214
+ to_hash
215
+ end
216
+
217
+ # Returns the object in the form of hash
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_hash
220
+ hash = {}
221
+ self.class.attribute_map.each_pair do |attr, param|
222
+ value = self.send(attr)
223
+ next if value.nil?
224
+ hash[param] = _to_hash(value)
225
+ end
226
+ hash
227
+ end
228
+
229
+ # Outputs non-array value in the form of hash
230
+ # For object, use to_hash. Otherwise, just return the value
231
+ # @param [Object] value Any valid value
232
+ # @return [Hash] Returns the value in the form of hash
233
+ def _to_hash(value)
234
+ if value.is_a?(Array)
235
+ value.compact.map{ |v| _to_hash(v) }
236
+ elsif value.is_a?(Hash)
237
+ {}.tap do |hash|
238
+ value.each { |k, v| hash[k] = _to_hash(v) }
239
+ end
240
+ elsif value.respond_to? :to_hash
241
+ value.to_hash
242
+ else
243
+ value
244
+ end
245
+ end
246
+
247
+ end
248
+
249
+ end