mux_ruby 3.3.0 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +13 -7
  4. data/docs/Asset.md +1 -1
  5. data/docs/AssetNonStandardInputReasons.md +2 -2
  6. data/docs/AssetResponse.md +1 -1
  7. data/docs/AssetsApi.md +8 -0
  8. data/docs/Broadcast.md +30 -0
  9. data/docs/BroadcastLayout.md +15 -0
  10. data/docs/BroadcastResolution.md +15 -0
  11. data/docs/BroadcastResponse.md +18 -0
  12. data/docs/BroadcastStatus.md +15 -0
  13. data/docs/CreateBroadcastRequest.md +26 -0
  14. data/docs/CreateLiveStreamRequest.md +3 -1
  15. data/docs/CreatePlaybackIDResponse.md +1 -1
  16. data/docs/CreatePlaybackRestrictionRequest.md +1 -1
  17. data/docs/CreateSimulcastTargetRequest.md +1 -1
  18. data/docs/CreateSpaceRequest.md +22 -0
  19. data/docs/CreateTrackResponse.md +1 -1
  20. data/docs/DirectUploadsApi.md +6 -0
  21. data/docs/GetAssetPlaybackIDResponse.md +1 -1
  22. data/docs/GetLiveStreamPlaybackIDResponse.md +1 -1
  23. data/docs/IncidentResponse.md +1 -1
  24. data/docs/InputSettings.md +3 -3
  25. data/docs/ListPlaybackRestrictionsResponse.md +18 -0
  26. data/docs/ListSpacesResponse.md +18 -0
  27. data/docs/LiveStream.md +3 -1
  28. data/docs/LiveStreamResponse.md +1 -1
  29. data/docs/LiveStreamsApi.md +16 -4
  30. data/docs/MetricsApi.md +3 -3
  31. data/docs/PlaybackRestrictionResponse.md +4 -1
  32. data/docs/PlaybackRestrictionsApi.md +21 -21
  33. data/docs/SigningKeyResponse.md +1 -1
  34. data/docs/SimulcastTargetResponse.md +1 -1
  35. data/docs/Space.md +30 -0
  36. data/docs/SpaceResponse.md +18 -0
  37. data/docs/SpaceStatus.md +15 -0
  38. data/docs/SpaceType.md +15 -0
  39. data/docs/SpacesApi.md +658 -0
  40. data/docs/StartSpaceBroadcastResponse.md +18 -0
  41. data/docs/StopSpaceBroadcastResponse.md +18 -0
  42. data/docs/Track.md +9 -7
  43. data/docs/UpdateLiveStreamRequest.md +3 -1
  44. data/docs/UpdateReferrerDomainRestrictionRequest.md +37 -5
  45. data/docs/UploadResponse.md +1 -1
  46. data/docs/VideoViewResponse.md +1 -1
  47. data/gen/generator-config.json +1 -1
  48. data/gen/templates/README.mustache +9 -3
  49. data/lib/mux_ruby/api/assets_api.rb +8 -0
  50. data/lib/mux_ruby/api/direct_uploads_api.rb +6 -0
  51. data/lib/mux_ruby/api/live_streams_api.rb +14 -2
  52. data/lib/mux_ruby/api/metrics_api.rb +5 -5
  53. data/lib/mux_ruby/api/playback_restrictions_api.rb +23 -23
  54. data/lib/mux_ruby/api/spaces_api.rb +619 -0
  55. data/lib/mux_ruby/models/abridged_video_view.rb +7 -0
  56. data/lib/mux_ruby/models/asset.rb +1 -1
  57. data/lib/mux_ruby/models/asset_non_standard_input_reasons.rb +2 -2
  58. data/lib/mux_ruby/models/broadcast.rb +305 -0
  59. data/lib/mux_ruby/models/broadcast_layout.rb +37 -0
  60. data/lib/mux_ruby/models/broadcast_resolution.rb +41 -0
  61. data/lib/mux_ruby/models/broadcast_response.rb +223 -0
  62. data/lib/mux_ruby/models/broadcast_status.rb +37 -0
  63. data/lib/mux_ruby/models/create_broadcast_request.rb +266 -0
  64. data/lib/mux_ruby/models/create_live_stream_request.rb +40 -4
  65. data/lib/mux_ruby/models/create_simulcast_target_request.rb +1 -1
  66. data/lib/mux_ruby/models/create_space_request.rb +242 -0
  67. data/lib/mux_ruby/models/input_settings.rb +3 -3
  68. data/lib/mux_ruby/models/list_playback_restrictions_response.rb +220 -0
  69. data/lib/mux_ruby/models/list_spaces_response.rb +225 -0
  70. data/lib/mux_ruby/models/live_stream.rb +40 -4
  71. data/lib/mux_ruby/models/playback_restriction_response.rb +11 -2
  72. data/lib/mux_ruby/models/space.rb +301 -0
  73. data/lib/mux_ruby/models/space_response.rb +223 -0
  74. data/lib/mux_ruby/models/space_status.rb +37 -0
  75. data/lib/mux_ruby/models/space_type.rb +36 -0
  76. data/lib/mux_ruby/models/start_space_broadcast_response.rb +218 -0
  77. data/lib/mux_ruby/models/stop_space_broadcast_response.rb +218 -0
  78. data/lib/mux_ruby/models/track.rb +32 -10
  79. data/lib/mux_ruby/models/update_live_stream_request.rb +40 -4
  80. data/lib/mux_ruby/models/update_referrer_domain_restriction_request.rb +74 -179
  81. data/lib/mux_ruby/models/video_view.rb +103 -0
  82. data/lib/mux_ruby/version.rb +1 -1
  83. data/lib/mux_ruby.rb +16 -0
  84. data/spec/api/spaces_api_spec.rb +149 -0
  85. data/spec/models/broadcast_layout_spec.rb +28 -0
  86. data/spec/models/broadcast_resolution_spec.rb +28 -0
  87. data/spec/models/broadcast_response_spec.rb +34 -0
  88. data/spec/models/broadcast_spec.rb +70 -0
  89. data/spec/models/broadcast_status_spec.rb +28 -0
  90. data/spec/models/create_broadcast_request_spec.rb +58 -0
  91. data/spec/models/create_space_request_spec.rb +46 -0
  92. data/spec/models/list_playback_restrictions_response_spec.rb +34 -0
  93. data/spec/models/list_spaces_response_spec.rb +34 -0
  94. data/spec/models/space_response_spec.rb +34 -0
  95. data/spec/models/space_spec.rb +70 -0
  96. data/spec/models/space_status_spec.rb +28 -0
  97. data/spec/models/space_type_spec.rb +28 -0
  98. data/spec/models/start_space_broadcast_response_spec.rb +34 -0
  99. data/spec/models/stop_space_broadcast_response_spec.rb +34 -0
  100. metadata +169 -105
@@ -0,0 +1,220 @@
1
+ =begin
2
+ #Mux API
3
+
4
+ #Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: devex@mux.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MuxRuby
17
+ class ListPlaybackRestrictionsResponse
18
+ attr_accessor :data
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'data' => :'data'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'data' => :'Array<PlaybackRestriction>'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::ListPlaybackRestrictionsResponse` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::ListPlaybackRestrictionsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'data')
61
+ if (value = attributes[:'data']).is_a?(Array)
62
+ self.data = value
63
+ end
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ invalid_properties
72
+ end
73
+
74
+ # Check to see if the all the properties in the model are valid
75
+ # @return true if the model is valid
76
+ def valid?
77
+ true
78
+ end
79
+
80
+ # Checks equality by comparing each attribute.
81
+ # @param [Object] Object to be compared
82
+ def ==(o)
83
+ return true if self.equal?(o)
84
+ self.class == o.class &&
85
+ data == o.data
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 [Integer] Hash code
96
+ def hash
97
+ [data].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 self.build_from_hash(attributes)
104
+ new.build_from_hash(attributes)
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ self.class.openapi_types.each_pair do |key, type|
113
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
+ self.send("#{key}=", nil)
115
+ elsif type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :Time
136
+ Time.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :Boolean
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ # models (e.g. Pet) or oneOf
167
+ klass = MuxRuby.const_get(type)
168
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
+ end
170
+ end
171
+
172
+ # Returns the string representation of the object
173
+ # @return [String] String presentation of the object
174
+ def to_s
175
+ to_hash.to_s
176
+ end
177
+
178
+ # to_body is an alias to to_hash (backward compatibility)
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_body
181
+ to_hash
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
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
@@ -0,0 +1,225 @@
1
+ =begin
2
+ #Mux API
3
+
4
+ #Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: devex@mux.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MuxRuby
17
+ class ListSpacesResponse
18
+ attr_accessor :data
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'data' => :'data'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'data' => :'Array<Space>'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::ListSpacesResponse` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::ListSpacesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'data')
61
+ if (value = attributes[:'data']).is_a?(Array)
62
+ self.data = value
63
+ end
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ if @data.nil?
72
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
73
+ end
74
+
75
+ invalid_properties
76
+ end
77
+
78
+ # Check to see if the all the properties in the model are valid
79
+ # @return true if the model is valid
80
+ def valid?
81
+ return false if @data.nil?
82
+ true
83
+ end
84
+
85
+ # Checks equality by comparing each attribute.
86
+ # @param [Object] Object to be compared
87
+ def ==(o)
88
+ return true if self.equal?(o)
89
+ self.class == o.class &&
90
+ data == o.data
91
+ end
92
+
93
+ # @see the `==` method
94
+ # @param [Object] Object to be compared
95
+ def eql?(o)
96
+ self == o
97
+ end
98
+
99
+ # Calculates hash code according to all attributes.
100
+ # @return [Integer] Hash code
101
+ def hash
102
+ [data].hash
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def self.build_from_hash(attributes)
109
+ new.build_from_hash(attributes)
110
+ end
111
+
112
+ # Builds the object from hash
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ # @return [Object] Returns the model itself
115
+ def build_from_hash(attributes)
116
+ return nil unless attributes.is_a?(Hash)
117
+ self.class.openapi_types.each_pair do |key, type|
118
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
119
+ self.send("#{key}=", nil)
120
+ elsif type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that 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
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 :Time
141
+ Time.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
+ # models (e.g. Pet) or oneOf
172
+ klass = MuxRuby.const_get(type)
173
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
174
+ end
175
+ end
176
+
177
+ # Returns the string representation of the object
178
+ # @return [String] String presentation of the object
179
+ def to_s
180
+ to_hash.to_s
181
+ end
182
+
183
+ # to_body is an alias to to_hash (backward compatibility)
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_body
186
+ to_hash
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ if value.nil?
196
+ is_nullable = self.class.openapi_nullable.include?(attr)
197
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
198
+ end
199
+
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ # Outputs non-array value in the form of hash
206
+ # For object, use to_hash. Otherwise, just return the value
207
+ # @param [Object] value Any valid value
208
+ # @return [Hash] Returns the value in the form of hash
209
+ def _to_hash(value)
210
+ if value.is_a?(Array)
211
+ value.compact.map { |v| _to_hash(v) }
212
+ elsif value.is_a?(Hash)
213
+ {}.tap do |hash|
214
+ value.each { |k, v| hash[k] = _to_hash(v) }
215
+ end
216
+ elsif value.respond_to? :to_hash
217
+ value.to_hash
218
+ else
219
+ value
220
+ end
221
+ end
222
+
223
+ end
224
+
225
+ end
@@ -64,6 +64,9 @@ module MuxRuby
64
64
  # True means this live stream is a test live stream. Test live streams can be used to help evaluate the Mux Video APIs for free. There is no limit on the number of test live streams, but they are watermarked with the Mux logo, and limited to 5 minutes. The test live stream is disabled after the stream is active for 5 mins and the recorded asset also deleted after 24 hours.
65
65
  attr_accessor :test
66
66
 
67
+ # The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours.
68
+ attr_accessor :max_continuous_duration
69
+
67
70
  class EnumAttributeValidator
68
71
  attr_reader :datatype
69
72
  attr_reader :allowable_values
@@ -105,7 +108,8 @@ module MuxRuby
105
108
  :'low_latency' => :'low_latency',
106
109
  :'simulcast_targets' => :'simulcast_targets',
107
110
  :'latency_mode' => :'latency_mode',
108
- :'test' => :'test'
111
+ :'test' => :'test',
112
+ :'max_continuous_duration' => :'max_continuous_duration'
109
113
  }
110
114
  end
111
115
 
@@ -133,7 +137,8 @@ module MuxRuby
133
137
  :'low_latency' => :'Boolean',
134
138
  :'simulcast_targets' => :'Array<SimulcastTarget>',
135
139
  :'latency_mode' => :'String',
136
- :'test' => :'Boolean'
140
+ :'test' => :'Boolean',
141
+ :'max_continuous_duration' => :'Integer'
137
142
  }
138
143
  end
139
144
 
@@ -235,12 +240,26 @@ module MuxRuby
235
240
  if attributes.key?(:'test')
236
241
  self.test = attributes[:'test']
237
242
  end
243
+
244
+ if attributes.key?(:'max_continuous_duration')
245
+ self.max_continuous_duration = attributes[:'max_continuous_duration']
246
+ else
247
+ self.max_continuous_duration = 43200
248
+ end
238
249
  end
239
250
 
240
251
  # Show invalid properties with the reasons. Usually used together with valid?
241
252
  # @return Array for valid properties with the reasons
242
253
  def list_invalid_properties
243
254
  invalid_properties = Array.new
255
+ if !@max_continuous_duration.nil? && @max_continuous_duration > 43200
256
+ invalid_properties.push('invalid value for "max_continuous_duration", must be smaller than or equal to 43200.')
257
+ end
258
+
259
+ if !@max_continuous_duration.nil? && @max_continuous_duration < 60
260
+ invalid_properties.push('invalid value for "max_continuous_duration", must be greater than or equal to 60.')
261
+ end
262
+
244
263
  invalid_properties
245
264
  end
246
265
 
@@ -249,6 +268,8 @@ module MuxRuby
249
268
  def valid?
250
269
  latency_mode_validator = EnumAttributeValidator.new('String', ["low", "reduced", "standard"])
251
270
  return false unless latency_mode_validator.valid?(@latency_mode)
271
+ return false if !@max_continuous_duration.nil? && @max_continuous_duration > 43200
272
+ return false if !@max_continuous_duration.nil? && @max_continuous_duration < 60
252
273
  true
253
274
  end
254
275
 
@@ -262,6 +283,20 @@ module MuxRuby
262
283
  @latency_mode = latency_mode
263
284
  end
264
285
 
286
+ # Custom attribute writer method with validation
287
+ # @param [Object] max_continuous_duration Value to be assigned
288
+ def max_continuous_duration=(max_continuous_duration)
289
+ if !max_continuous_duration.nil? && max_continuous_duration > 43200
290
+ fail ArgumentError, 'invalid value for "max_continuous_duration", must be smaller than or equal to 43200.'
291
+ end
292
+
293
+ if !max_continuous_duration.nil? && max_continuous_duration < 60
294
+ fail ArgumentError, 'invalid value for "max_continuous_duration", must be greater than or equal to 60.'
295
+ end
296
+
297
+ @max_continuous_duration = max_continuous_duration
298
+ end
299
+
265
300
  # Checks equality by comparing each attribute.
266
301
  # @param [Object] Object to be compared
267
302
  def ==(o)
@@ -283,7 +318,8 @@ module MuxRuby
283
318
  low_latency == o.low_latency &&
284
319
  simulcast_targets == o.simulcast_targets &&
285
320
  latency_mode == o.latency_mode &&
286
- test == o.test
321
+ test == o.test &&
322
+ max_continuous_duration == o.max_continuous_duration
287
323
  end
288
324
 
289
325
  # @see the `==` method
@@ -295,7 +331,7 @@ module MuxRuby
295
331
  # Calculates hash code according to all attributes.
296
332
  # @return [Integer] Hash code
297
333
  def hash
298
- [id, created_at, stream_key, active_asset_id, recent_asset_ids, status, playback_ids, new_asset_settings, passthrough, audio_only, embedded_subtitles, reconnect_window, reduced_latency, low_latency, simulcast_targets, latency_mode, test].hash
334
+ [id, created_at, stream_key, active_asset_id, recent_asset_ids, status, playback_ids, new_asset_settings, passthrough, audio_only, embedded_subtitles, reconnect_window, reduced_latency, low_latency, simulcast_targets, latency_mode, test, max_continuous_duration].hash
299
335
  end
300
336
 
301
337
  # Builds the object from hash
@@ -15,9 +15,12 @@ require 'time'
15
15
 
16
16
  module MuxRuby
17
17
  class PlaybackRestrictionResponse
18
+ attr_accessor :data
19
+
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
19
21
  def self.attribute_map
20
22
  {
23
+ :'data' => :'data'
21
24
  }
22
25
  end
23
26
 
@@ -29,6 +32,7 @@ module MuxRuby
29
32
  # Attribute type mapping.
30
33
  def self.openapi_types
31
34
  {
35
+ :'data' => :'PlaybackRestriction'
32
36
  }
33
37
  end
34
38
 
@@ -52,6 +56,10 @@ module MuxRuby
52
56
  end
53
57
  h[k.to_sym] = v
54
58
  }
59
+
60
+ if attributes.key?(:'data')
61
+ self.data = attributes[:'data']
62
+ end
55
63
  end
56
64
 
57
65
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -71,7 +79,8 @@ module MuxRuby
71
79
  # @param [Object] Object to be compared
72
80
  def ==(o)
73
81
  return true if self.equal?(o)
74
- self.class == o.class
82
+ self.class == o.class &&
83
+ data == o.data
75
84
  end
76
85
 
77
86
  # @see the `==` method
@@ -83,7 +92,7 @@ module MuxRuby
83
92
  # Calculates hash code according to all attributes.
84
93
  # @return [Integer] Hash code
85
94
  def hash
86
- [].hash
95
+ [data].hash
87
96
  end
88
97
 
89
98
  # Builds the object from hash