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