telestream_cloud_qc 2.0.0 → 2.0.4

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +48 -1
  3. data/docs/Alert.md +2 -2
  4. data/docs/Container.md +1 -1
  5. data/docs/InlineResponse200.md +9 -0
  6. data/docs/InlineResponse422.md +8 -0
  7. data/docs/Job.md +10 -0
  8. data/docs/JobData.md +1 -0
  9. data/docs/JobDetails.md +2 -0
  10. data/docs/JobDetailsResult.md +1 -0
  11. data/docs/Project.md +1 -1
  12. data/docs/QcApi.md +129 -26
  13. data/docs/Summary.md +13 -0
  14. data/docs/SynchronizationEvent.md +10 -0
  15. data/docs/Template.md +12 -0
  16. data/docs/VideoStream.md +1 -1
  17. data/lib/telestream_cloud_qc.rb +7 -2
  18. data/lib/telestream_cloud_qc/api/qc_api.rb +119 -15
  19. data/lib/telestream_cloud_qc/api_client.rb +2 -2
  20. data/lib/telestream_cloud_qc/api_error.rb +2 -2
  21. data/lib/telestream_cloud_qc/configuration.rb +3 -3
  22. data/lib/telestream_cloud_qc/models/alert.rb +4 -4
  23. data/lib/telestream_cloud_qc/models/audio_stream.rb +2 -2
  24. data/lib/telestream_cloud_qc/models/container.rb +3 -3
  25. data/lib/telestream_cloud_qc/models/data.rb +2 -2
  26. data/lib/telestream_cloud_qc/models/data_1.rb +2 -2
  27. data/lib/telestream_cloud_qc/models/extra_file.rb +2 -2
  28. data/lib/telestream_cloud_qc/models/inline_response_200.rb +197 -0
  29. data/lib/telestream_cloud_qc/models/inline_response_422.rb +188 -0
  30. data/lib/telestream_cloud_qc/models/job.rb +95 -5
  31. data/lib/telestream_cloud_qc/models/job_data.rb +16 -6
  32. data/lib/telestream_cloud_qc/models/job_details.rb +26 -6
  33. data/lib/telestream_cloud_qc/models/job_details_result.rb +17 -6
  34. data/lib/telestream_cloud_qc/models/jobs_collection.rb +2 -2
  35. data/lib/telestream_cloud_qc/models/media.rb +2 -2
  36. data/lib/telestream_cloud_qc/models/options.rb +2 -2
  37. data/lib/telestream_cloud_qc/models/project.rb +6 -4
  38. data/lib/telestream_cloud_qc/models/proxy.rb +2 -2
  39. data/lib/telestream_cloud_qc/models/summary.rb +236 -0
  40. data/lib/telestream_cloud_qc/models/synchronization_event.rb +206 -0
  41. data/lib/telestream_cloud_qc/models/template.rb +228 -0
  42. data/lib/telestream_cloud_qc/models/upload_session.rb +2 -2
  43. data/lib/telestream_cloud_qc/models/video_stream.rb +3 -3
  44. data/lib/telestream_cloud_qc/models/video_upload_body.rb +2 -2
  45. data/lib/telestream_cloud_qc/uploader.rb +12 -0
  46. data/lib/telestream_cloud_qc/version.rb +3 -3
  47. data/spec/api/qc_api_spec.rb +26 -2
  48. data/spec/api_client_spec.rb +2 -2
  49. data/spec/configuration_spec.rb +2 -2
  50. data/spec/models/alert_spec.rb +2 -2
  51. data/spec/models/audio_stream_spec.rb +2 -2
  52. data/spec/models/container_spec.rb +2 -2
  53. data/spec/models/data_1_spec.rb +2 -2
  54. data/spec/models/data_spec.rb +2 -2
  55. data/spec/models/extra_file_spec.rb +2 -2
  56. data/spec/models/inline_response_200_spec.rb +48 -0
  57. data/spec/models/inline_response_422_spec.rb +42 -0
  58. data/spec/models/job_data_spec.rb +8 -2
  59. data/spec/models/job_details_result_spec.rb +8 -2
  60. data/spec/models/job_details_spec.rb +14 -2
  61. data/spec/models/job_spec.rb +63 -3
  62. data/spec/models/jobs_collection_spec.rb +2 -2
  63. data/spec/models/media_spec.rb +2 -2
  64. data/spec/models/options_spec.rb +2 -2
  65. data/spec/models/project_spec.rb +2 -2
  66. data/spec/models/proxy_spec.rb +2 -2
  67. data/spec/models/summary_spec.rb +72 -0
  68. data/spec/models/synchronization_event_spec.rb +54 -0
  69. data/spec/models/template_spec.rb +66 -0
  70. data/spec/models/upload_session_spec.rb +2 -2
  71. data/spec/models/video_stream_spec.rb +2 -2
  72. data/spec/models/video_upload_body_spec.rb +2 -2
  73. data/spec/spec_helper.rb +2 -2
  74. data/telestream_cloud_qc.gemspec +2 -2
  75. metadata +35 -15
@@ -0,0 +1,206 @@
1
+ =begin
2
+ #Qc API
3
+
4
+ #QC API
5
+
6
+ OpenAPI spec version: 2.0.3
7
+ Contact: cloudsupport@telestream.net
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module TelestreamCloud::Qc
16
+
17
+ class SynchronizationEvent
18
+ attr_accessor :timestamp
19
+
20
+ attr_accessor :skew
21
+
22
+ attr_accessor :result
23
+
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'timestamp' => :'timestamp',
29
+ :'skew' => :'skew',
30
+ :'result' => :'result'
31
+ }
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.swagger_types
36
+ {
37
+ :'timestamp' => :'String',
38
+ :'skew' => :'Integer',
39
+ :'result' => :'String'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ return unless attributes.is_a?(Hash)
47
+
48
+ # convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
50
+
51
+ if attributes.has_key?(:'timestamp')
52
+ self.timestamp = attributes[:'timestamp']
53
+ end
54
+
55
+ if attributes.has_key?(:'skew')
56
+ self.skew = attributes[:'skew']
57
+ end
58
+
59
+ if attributes.has_key?(:'result')
60
+ self.result = attributes[:'result']
61
+ end
62
+
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ return invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ return true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ timestamp == o.timestamp &&
84
+ skew == o.skew &&
85
+ result == o.result
86
+ end
87
+
88
+ # @see the `==` method
89
+ # @param [Object] Object to be compared
90
+ def eql?(o)
91
+ self == o
92
+ end
93
+
94
+ # Calculates hash code according to all attributes.
95
+ # @return [Fixnum] Hash code
96
+ def hash
97
+ [timestamp, skew, result].hash
98
+ end
99
+
100
+ # Builds the object from hash
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ # @return [Object] Returns the model itself
103
+ def build_from_hash(attributes)
104
+ return nil unless attributes.is_a?(Hash)
105
+ self.class.swagger_types.each_pair do |key, type|
106
+ if type =~ /\AArray<(.*)>/i
107
+ # check to ensure the input is an array given that the the attribute
108
+ # is documented as an array but the input is not
109
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
110
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
111
+ end
112
+ elsif !attributes[self.class.attribute_map[key]].nil?
113
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
115
+ end
116
+
117
+ self
118
+ end
119
+
120
+ # Deserializes the data based on type
121
+ # @param string type Data type
122
+ # @param string value Value to be deserialized
123
+ # @return [Object] Deserialized data
124
+ def _deserialize(type, value)
125
+ case type.to_sym
126
+ when :DateTime
127
+ DateTime.parse(value)
128
+ when :Date
129
+ Date.parse(value)
130
+ when :String
131
+ value.to_s
132
+ when :Integer
133
+ value.to_i
134
+ when :Float
135
+ value.to_f
136
+ when :BOOLEAN
137
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
138
+ true
139
+ else
140
+ false
141
+ end
142
+ when :Object
143
+ # generic object (usually a Hash), return directly
144
+ value
145
+ when /\AArray<(?<inner_type>.+)>\z/
146
+ inner_type = Regexp.last_match[:inner_type]
147
+ value.map { |v| _deserialize(inner_type, v) }
148
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
149
+ k_type = Regexp.last_match[:k_type]
150
+ v_type = Regexp.last_match[:v_type]
151
+ {}.tap do |hash|
152
+ value.each do |k, v|
153
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
154
+ end
155
+ end
156
+ else # model
157
+ temp_model = TelestreamCloud::Qc.const_get(type).new
158
+ temp_model.build_from_hash(value)
159
+ end
160
+ end
161
+
162
+ # Returns the string representation of the object
163
+ # @return [String] String presentation of the object
164
+ def to_s
165
+ to_hash.to_s
166
+ end
167
+
168
+ # to_body is an alias to to_hash (backward compatibility)
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_body
171
+ to_hash
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ next if value.nil?
181
+ hash[param] = _to_hash(value)
182
+ end
183
+ hash
184
+ end
185
+
186
+ # Outputs non-array value in the form of hash
187
+ # For object, use to_hash. Otherwise, just return the value
188
+ # @param [Object] value Any valid value
189
+ # @return [Hash] Returns the value in the form of hash
190
+ def _to_hash(value)
191
+ if value.is_a?(Array)
192
+ value.compact.map{ |v| _to_hash(v) }
193
+ elsif value.is_a?(Hash)
194
+ {}.tap do |hash|
195
+ value.each { |k, v| hash[k] = _to_hash(v) }
196
+ end
197
+ elsif value.respond_to? :to_hash
198
+ value.to_hash
199
+ else
200
+ value
201
+ end
202
+ end
203
+
204
+ end
205
+
206
+ end
@@ -0,0 +1,228 @@
1
+ =begin
2
+ #Qc API
3
+
4
+ #QC API
5
+
6
+ OpenAPI spec version: 2.0.3
7
+ Contact: cloudsupport@telestream.net
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module TelestreamCloud::Qc
16
+
17
+ class Template
18
+ attr_accessor :name
19
+
20
+ attr_accessor :type
21
+
22
+ attr_accessor :description
23
+
24
+ attr_accessor :produces
25
+
26
+ attr_accessor :takes
27
+
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'name' => :'name',
33
+ :'type' => :'type',
34
+ :'description' => :'description',
35
+ :'produces' => :'produces',
36
+ :'takes' => :'takes'
37
+ }
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.swagger_types
42
+ {
43
+ :'name' => :'String',
44
+ :'type' => :'String',
45
+ :'description' => :'String',
46
+ :'produces' => :'Hash<String, String>',
47
+ :'takes' => :'Hash<String, String>'
48
+ }
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ return unless attributes.is_a?(Hash)
55
+
56
+ # convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
58
+
59
+ if attributes.has_key?(:'name')
60
+ self.name = attributes[:'name']
61
+ end
62
+
63
+ if attributes.has_key?(:'type')
64
+ self.type = attributes[:'type']
65
+ end
66
+
67
+ if attributes.has_key?(:'description')
68
+ self.description = attributes[:'description']
69
+ end
70
+
71
+ if attributes.has_key?(:'produces')
72
+ if (value = attributes[:'produces']).is_a?(Hash)
73
+ self.produces = value
74
+ end
75
+ end
76
+
77
+ if attributes.has_key?(:'takes')
78
+ if (value = attributes[:'takes']).is_a?(Hash)
79
+ self.takes = value
80
+ end
81
+ end
82
+
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ invalid_properties = Array.new
89
+ return invalid_properties
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ def valid?
95
+ return true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ name == o.name &&
104
+ type == o.type &&
105
+ description == o.description &&
106
+ produces == o.produces &&
107
+ takes == o.takes
108
+ end
109
+
110
+ # @see the `==` method
111
+ # @param [Object] Object to be compared
112
+ def eql?(o)
113
+ self == o
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Fixnum] Hash code
118
+ def hash
119
+ [name, type, description, produces, takes].hash
120
+ end
121
+
122
+ # Builds the object from hash
123
+ # @param [Hash] attributes Model attributes in the form of hash
124
+ # @return [Object] Returns the model itself
125
+ def build_from_hash(attributes)
126
+ return nil unless attributes.is_a?(Hash)
127
+ self.class.swagger_types.each_pair do |key, type|
128
+ if type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
132
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
133
+ end
134
+ elsif !attributes[self.class.attribute_map[key]].nil?
135
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
136
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
137
+ end
138
+
139
+ self
140
+ end
141
+
142
+ # Deserializes the data based on type
143
+ # @param string type Data type
144
+ # @param string value Value to be deserialized
145
+ # @return [Object] Deserialized data
146
+ def _deserialize(type, value)
147
+ case type.to_sym
148
+ when :DateTime
149
+ DateTime.parse(value)
150
+ when :Date
151
+ Date.parse(value)
152
+ when :String
153
+ value.to_s
154
+ when :Integer
155
+ value.to_i
156
+ when :Float
157
+ value.to_f
158
+ when :BOOLEAN
159
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
160
+ true
161
+ else
162
+ false
163
+ end
164
+ when :Object
165
+ # generic object (usually a Hash), return directly
166
+ value
167
+ when /\AArray<(?<inner_type>.+)>\z/
168
+ inner_type = Regexp.last_match[:inner_type]
169
+ value.map { |v| _deserialize(inner_type, v) }
170
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
171
+ k_type = Regexp.last_match[:k_type]
172
+ v_type = Regexp.last_match[:v_type]
173
+ {}.tap do |hash|
174
+ value.each do |k, v|
175
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
176
+ end
177
+ end
178
+ else # model
179
+ temp_model = TelestreamCloud::Qc.const_get(type).new
180
+ temp_model.build_from_hash(value)
181
+ end
182
+ end
183
+
184
+ # Returns the string representation of the object
185
+ # @return [String] String presentation of the object
186
+ def to_s
187
+ to_hash.to_s
188
+ end
189
+
190
+ # to_body is an alias to to_hash (backward compatibility)
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_body
193
+ to_hash
194
+ end
195
+
196
+ # Returns the object in the form of hash
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_hash
199
+ hash = {}
200
+ self.class.attribute_map.each_pair do |attr, param|
201
+ value = self.send(attr)
202
+ next if value.nil?
203
+ hash[param] = _to_hash(value)
204
+ end
205
+ hash
206
+ end
207
+
208
+ # Outputs non-array value in the form of hash
209
+ # For object, use to_hash. Otherwise, just return the value
210
+ # @param [Object] value Any valid value
211
+ # @return [Hash] Returns the value in the form of hash
212
+ def _to_hash(value)
213
+ if value.is_a?(Array)
214
+ value.compact.map{ |v| _to_hash(v) }
215
+ elsif value.is_a?(Hash)
216
+ {}.tap do |hash|
217
+ value.each { |k, v| hash[k] = _to_hash(v) }
218
+ end
219
+ elsif value.respond_to? :to_hash
220
+ value.to_hash
221
+ else
222
+ value
223
+ end
224
+ end
225
+
226
+ end
227
+
228
+ end
@@ -3,10 +3,10 @@
3
3
 
4
4
  #QC API
5
5
 
6
- OpenAPI spec version: 2.0.0
6
+ OpenAPI spec version: 2.0.3
7
7
  Contact: cloudsupport@telestream.net
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.0
9
+ Swagger Codegen version: 2.3.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #QC API
5
5
 
6
- OpenAPI spec version: 2.0.0
6
+ OpenAPI spec version: 2.0.3
7
7
  Contact: cloudsupport@telestream.net
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.0
9
+ Swagger Codegen version: 2.3.1
10
10
 
11
11
  =end
12
12
 
@@ -45,7 +45,7 @@ module TelestreamCloud::Qc
45
45
  # Attribute type mapping.
46
46
  def self.swagger_types
47
47
  {
48
- :'duration' => :'Integer',
48
+ :'duration' => :'Float',
49
49
  :'codec' => :'String',
50
50
  :'width' => :'Integer',
51
51
  :'height' => :'Integer',