Class: Aimastering::Mastering
- Inherits:
-
Object
- Object
- Aimastering::Mastering
- Defined in:
- lib/aimastering/models/mastering.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#bass_preservation ⇒ Object
Returns the value of attribute bass_preservation.
-
#bit_depth ⇒ Object
Returns the value of attribute bit_depth.
-
#ceiling ⇒ Object
Returns the value of attribute ceiling.
-
#ceiling_mode ⇒ Object
Returns the value of attribute ceiling_mode.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#expire_at ⇒ Object
Returns the value of attribute expire_at.
-
#failure_reason ⇒ Object
Returns the value of attribute failure_reason.
-
#high_cut_freq ⇒ Object
Returns the value of attribute high_cut_freq.
-
#id ⇒ Object
Returns the value of attribute id.
-
#input_audio_id ⇒ Object
Returns the value of attribute input_audio_id.
-
#limiting_error ⇒ Object
Returns the value of attribute limiting_error.
-
#low_cut_freq ⇒ Object
Returns the value of attribute low_cut_freq.
-
#mastering ⇒ Object
Returns the value of attribute mastering.
-
#mastering_algorithm ⇒ Object
Returns the value of attribute mastering_algorithm.
-
#mastering_matching_level ⇒ Object
Returns the value of attribute mastering_matching_level.
-
#mastering_reverb ⇒ Object
Returns the value of attribute mastering_reverb.
-
#mastering_reverb_gain ⇒ Object
Returns the value of attribute mastering_reverb_gain.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#output_audio_id ⇒ Object
Returns the value of attribute output_audio_id.
-
#output_format ⇒ Object
Returns the value of attribute output_format.
-
#output_video_id ⇒ Object
Returns the value of attribute output_video_id.
-
#oversample ⇒ Object
Returns the value of attribute oversample.
-
#preserved ⇒ Object
Returns the value of attribute preserved.
-
#preset ⇒ Object
Returns the value of attribute preset.
-
#progression ⇒ Object
Returns the value of attribute progression.
-
#reference_audio_id ⇒ Object
Returns the value of attribute reference_audio_id.
-
#retry_count ⇒ Object
Returns the value of attribute retry_count.
-
#review_comment ⇒ Object
Returns the value of attribute review_comment.
-
#review_score ⇒ Object
Returns the value of attribute review_score.
-
#sample_rate ⇒ Object
Returns the value of attribute sample_rate.
-
#status ⇒ Object
Returns the value of attribute status.
-
#target_loudness ⇒ Object
Returns the value of attribute target_loudness.
-
#target_loudness_mode ⇒ Object
Returns the value of attribute target_loudness_mode.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
-
#video_status ⇒ Object
Returns the value of attribute video_status.
-
#video_title ⇒ Object
Returns the value of attribute video_title.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Mastering
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Mastering
Initializes the object
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'lib/aimastering/models/mastering.rb', line 202 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} if attributes.has_key?(:'id') self.id = attributes[:'id'] end if attributes.has_key?(:'user_id') self.user_id = attributes[:'user_id'] end if attributes.has_key?(:'input_audio_id') self.input_audio_id = attributes[:'input_audio_id'] end if attributes.has_key?(:'output_audio_id') self.output_audio_id = attributes[:'output_audio_id'] end if attributes.has_key?(:'output_video_id') self.output_video_id = attributes[:'output_video_id'] end if attributes.has_key?(:'reference_audio_id') self.reference_audio_id = attributes[:'reference_audio_id'] end if attributes.has_key?(:'mode') self.mode = attributes[:'mode'] end if attributes.has_key?(:'status') self.status = attributes[:'status'] end if attributes.has_key?(:'failure_reason') self.failure_reason = attributes[:'failure_reason'] end if attributes.has_key?(:'target_loudness_mode') self.target_loudness_mode = attributes[:'target_loudness_mode'] end if attributes.has_key?(:'target_loudness') self.target_loudness = attributes[:'target_loudness'] end if attributes.has_key?(:'output_format') self.output_format = attributes[:'output_format'] end if attributes.has_key?(:'preset') self.preset = attributes[:'preset'] end if attributes.has_key?(:'bit_depth') self.bit_depth = attributes[:'bit_depth'] end if attributes.has_key?(:'sample_rate') self.sample_rate = attributes[:'sample_rate'] end if attributes.has_key?(:'review_comment') self.review_comment = attributes[:'review_comment'] end if attributes.has_key?(:'review_score') self.review_score = attributes[:'review_score'] end if attributes.has_key?(:'mastering_matching_level') self.mastering_matching_level = attributes[:'mastering_matching_level'] end if attributes.has_key?(:'progression') self.progression = attributes[:'progression'] end if attributes.has_key?(:'bass_preservation') self.bass_preservation = attributes[:'bass_preservation'] end if attributes.has_key?(:'mastering') self.mastering = attributes[:'mastering'] end if attributes.has_key?(:'mastering_algorithm') self.mastering_algorithm = attributes[:'mastering_algorithm'] end if attributes.has_key?(:'preserved') self.preserved = attributes[:'preserved'] end if attributes.has_key?(:'retry_count') self.retry_count = attributes[:'retry_count'] end if attributes.has_key?(:'mastering_reverb') self.mastering_reverb = attributes[:'mastering_reverb'] end if attributes.has_key?(:'mastering_reverb_gain') self.mastering_reverb_gain = attributes[:'mastering_reverb_gain'] end if attributes.has_key?(:'low_cut_freq') self.low_cut_freq = attributes[:'low_cut_freq'] end if attributes.has_key?(:'high_cut_freq') self.high_cut_freq = attributes[:'high_cut_freq'] end if attributes.has_key?(:'ceiling') self.ceiling = attributes[:'ceiling'] end if attributes.has_key?(:'ceiling_mode') self.ceiling_mode = attributes[:'ceiling_mode'] end if attributes.has_key?(:'oversample') self.oversample = attributes[:'oversample'] end if attributes.has_key?(:'limiting_error') self.limiting_error = attributes[:'limiting_error'] end if attributes.has_key?(:'video_title') self.video_title = attributes[:'video_title'] end if attributes.has_key?(:'video_status') self.video_status = attributes[:'video_status'] end if attributes.has_key?(:'expire_at') self.expire_at = attributes[:'expire_at'] end if attributes.has_key?(:'created_at') self.created_at = attributes[:'created_at'] end if attributes.has_key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end end |
Instance Attribute Details
#bass_preservation ⇒ Object
Returns the value of attribute bass_preservation.
56 57 58 |
# File 'lib/aimastering/models/mastering.rb', line 56 def bass_preservation @bass_preservation end |
#bit_depth ⇒ Object
Returns the value of attribute bit_depth.
44 45 46 |
# File 'lib/aimastering/models/mastering.rb', line 44 def bit_depth @bit_depth end |
#ceiling ⇒ Object
Returns the value of attribute ceiling.
74 75 76 |
# File 'lib/aimastering/models/mastering.rb', line 74 def ceiling @ceiling end |
#ceiling_mode ⇒ Object
Returns the value of attribute ceiling_mode.
76 77 78 |
# File 'lib/aimastering/models/mastering.rb', line 76 def ceiling_mode @ceiling_mode end |
#created_at ⇒ Object
Returns the value of attribute created_at.
88 89 90 |
# File 'lib/aimastering/models/mastering.rb', line 88 def created_at @created_at end |
#expire_at ⇒ Object
Returns the value of attribute expire_at.
86 87 88 |
# File 'lib/aimastering/models/mastering.rb', line 86 def expire_at @expire_at end |
#failure_reason ⇒ Object
Returns the value of attribute failure_reason.
34 35 36 |
# File 'lib/aimastering/models/mastering.rb', line 34 def failure_reason @failure_reason end |
#high_cut_freq ⇒ Object
Returns the value of attribute high_cut_freq.
72 73 74 |
# File 'lib/aimastering/models/mastering.rb', line 72 def high_cut_freq @high_cut_freq end |
#id ⇒ Object
Returns the value of attribute id.
18 19 20 |
# File 'lib/aimastering/models/mastering.rb', line 18 def id @id end |
#input_audio_id ⇒ Object
Returns the value of attribute input_audio_id.
22 23 24 |
# File 'lib/aimastering/models/mastering.rb', line 22 def input_audio_id @input_audio_id end |
#limiting_error ⇒ Object
Returns the value of attribute limiting_error.
80 81 82 |
# File 'lib/aimastering/models/mastering.rb', line 80 def limiting_error @limiting_error end |
#low_cut_freq ⇒ Object
Returns the value of attribute low_cut_freq.
70 71 72 |
# File 'lib/aimastering/models/mastering.rb', line 70 def low_cut_freq @low_cut_freq end |
#mastering ⇒ Object
Returns the value of attribute mastering.
58 59 60 |
# File 'lib/aimastering/models/mastering.rb', line 58 def mastering @mastering end |
#mastering_algorithm ⇒ Object
Returns the value of attribute mastering_algorithm.
60 61 62 |
# File 'lib/aimastering/models/mastering.rb', line 60 def mastering_algorithm @mastering_algorithm end |
#mastering_matching_level ⇒ Object
Returns the value of attribute mastering_matching_level.
52 53 54 |
# File 'lib/aimastering/models/mastering.rb', line 52 def mastering_matching_level @mastering_matching_level end |
#mastering_reverb ⇒ Object
Returns the value of attribute mastering_reverb.
66 67 68 |
# File 'lib/aimastering/models/mastering.rb', line 66 def mastering_reverb @mastering_reverb end |
#mastering_reverb_gain ⇒ Object
Returns the value of attribute mastering_reverb_gain.
68 69 70 |
# File 'lib/aimastering/models/mastering.rb', line 68 def mastering_reverb_gain @mastering_reverb_gain end |
#mode ⇒ Object
Returns the value of attribute mode.
30 31 32 |
# File 'lib/aimastering/models/mastering.rb', line 30 def mode @mode end |
#output_audio_id ⇒ Object
Returns the value of attribute output_audio_id.
24 25 26 |
# File 'lib/aimastering/models/mastering.rb', line 24 def output_audio_id @output_audio_id end |
#output_format ⇒ Object
Returns the value of attribute output_format.
40 41 42 |
# File 'lib/aimastering/models/mastering.rb', line 40 def output_format @output_format end |
#output_video_id ⇒ Object
Returns the value of attribute output_video_id.
26 27 28 |
# File 'lib/aimastering/models/mastering.rb', line 26 def output_video_id @output_video_id end |
#oversample ⇒ Object
Returns the value of attribute oversample.
78 79 80 |
# File 'lib/aimastering/models/mastering.rb', line 78 def oversample @oversample end |
#preserved ⇒ Object
Returns the value of attribute preserved.
62 63 64 |
# File 'lib/aimastering/models/mastering.rb', line 62 def preserved @preserved end |
#preset ⇒ Object
Returns the value of attribute preset.
42 43 44 |
# File 'lib/aimastering/models/mastering.rb', line 42 def preset @preset end |
#progression ⇒ Object
Returns the value of attribute progression.
54 55 56 |
# File 'lib/aimastering/models/mastering.rb', line 54 def progression @progression end |
#reference_audio_id ⇒ Object
Returns the value of attribute reference_audio_id.
28 29 30 |
# File 'lib/aimastering/models/mastering.rb', line 28 def reference_audio_id @reference_audio_id end |
#retry_count ⇒ Object
Returns the value of attribute retry_count.
64 65 66 |
# File 'lib/aimastering/models/mastering.rb', line 64 def retry_count @retry_count end |
#review_comment ⇒ Object
Returns the value of attribute review_comment.
48 49 50 |
# File 'lib/aimastering/models/mastering.rb', line 48 def review_comment @review_comment end |
#review_score ⇒ Object
Returns the value of attribute review_score.
50 51 52 |
# File 'lib/aimastering/models/mastering.rb', line 50 def review_score @review_score end |
#sample_rate ⇒ Object
Returns the value of attribute sample_rate.
46 47 48 |
# File 'lib/aimastering/models/mastering.rb', line 46 def sample_rate @sample_rate end |
#status ⇒ Object
Returns the value of attribute status.
32 33 34 |
# File 'lib/aimastering/models/mastering.rb', line 32 def status @status end |
#target_loudness ⇒ Object
Returns the value of attribute target_loudness.
38 39 40 |
# File 'lib/aimastering/models/mastering.rb', line 38 def target_loudness @target_loudness end |
#target_loudness_mode ⇒ Object
Returns the value of attribute target_loudness_mode.
36 37 38 |
# File 'lib/aimastering/models/mastering.rb', line 36 def target_loudness_mode @target_loudness_mode end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
90 91 92 |
# File 'lib/aimastering/models/mastering.rb', line 90 def updated_at @updated_at end |
#user_id ⇒ Object
Returns the value of attribute user_id.
20 21 22 |
# File 'lib/aimastering/models/mastering.rb', line 20 def user_id @user_id end |
#video_status ⇒ Object
Returns the value of attribute video_status.
84 85 86 |
# File 'lib/aimastering/models/mastering.rb', line 84 def video_status @video_status end |
#video_title ⇒ Object
Returns the value of attribute video_title.
82 83 84 |
# File 'lib/aimastering/models/mastering.rb', line 82 def video_title @video_title end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/aimastering/models/mastering.rb', line 115 def self.attribute_map { :'id' => :'id', :'user_id' => :'user_id', :'input_audio_id' => :'input_audio_id', :'output_audio_id' => :'output_audio_id', :'output_video_id' => :'output_video_id', :'reference_audio_id' => :'reference_audio_id', :'mode' => :'mode', :'status' => :'status', :'failure_reason' => :'failure_reason', :'target_loudness_mode' => :'target_loudness_mode', :'target_loudness' => :'target_loudness', :'output_format' => :'output_format', :'preset' => :'preset', :'bit_depth' => :'bit_depth', :'sample_rate' => :'sample_rate', :'review_comment' => :'review_comment', :'review_score' => :'review_score', :'mastering_matching_level' => :'mastering_matching_level', :'progression' => :'progression', :'bass_preservation' => :'bass_preservation', :'mastering' => :'mastering', :'mastering_algorithm' => :'mastering_algorithm', :'preserved' => :'preserved', :'retry_count' => :'retry_count', :'mastering_reverb' => :'mastering_reverb', :'mastering_reverb_gain' => :'mastering_reverb_gain', :'low_cut_freq' => :'low_cut_freq', :'high_cut_freq' => :'high_cut_freq', :'ceiling' => :'ceiling', :'ceiling_mode' => :'ceiling_mode', :'oversample' => :'oversample', :'limiting_error' => :'limiting_error', :'video_title' => :'video_title', :'video_status' => :'video_status', :'expire_at' => :'expire_at', :'created_at' => :'created_at', :'updated_at' => :'updated_at' } end |
.swagger_types ⇒ Object
Attribute type mapping.
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/aimastering/models/mastering.rb', line 158 def self.swagger_types { :'id' => :'Integer', :'user_id' => :'Integer', :'input_audio_id' => :'Integer', :'output_audio_id' => :'Integer', :'output_video_id' => :'Integer', :'reference_audio_id' => :'Integer', :'mode' => :'String', :'status' => :'String', :'failure_reason' => :'String', :'target_loudness_mode' => :'String', :'target_loudness' => :'Float', :'output_format' => :'String', :'preset' => :'String', :'bit_depth' => :'Integer', :'sample_rate' => :'Integer', :'review_comment' => :'String', :'review_score' => :'Float', :'mastering_matching_level' => :'Float', :'progression' => :'Float', :'bass_preservation' => :'BOOLEAN', :'mastering' => :'BOOLEAN', :'mastering_algorithm' => :'String', :'preserved' => :'BOOLEAN', :'retry_count' => :'Integer', :'mastering_reverb' => :'BOOLEAN', :'mastering_reverb_gain' => :'Float', :'low_cut_freq' => :'Float', :'high_cut_freq' => :'Float', :'ceiling' => :'Float', :'ceiling_mode' => :'String', :'oversample' => :'Integer', :'limiting_error' => :'Float', :'video_title' => :'String', :'video_status' => :'String', :'expire_at' => :'DateTime', :'created_at' => :'DateTime', :'updated_at' => :'DateTime' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 |
# File 'lib/aimastering/models/mastering.rb', line 544 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && user_id == o.user_id && input_audio_id == o.input_audio_id && output_audio_id == o.output_audio_id && output_video_id == o.output_video_id && reference_audio_id == o.reference_audio_id && mode == o.mode && status == o.status && failure_reason == o.failure_reason && target_loudness_mode == o.target_loudness_mode && target_loudness == o.target_loudness && output_format == o.output_format && preset == o.preset && bit_depth == o.bit_depth && sample_rate == o.sample_rate && review_comment == o.review_comment && review_score == o.review_score && mastering_matching_level == o.mastering_matching_level && progression == o.progression && bass_preservation == o.bass_preservation && mastering == o.mastering && mastering_algorithm == o.mastering_algorithm && preserved == o.preserved && retry_count == o.retry_count && mastering_reverb == o.mastering_reverb && mastering_reverb_gain == o.mastering_reverb_gain && low_cut_freq == o.low_cut_freq && high_cut_freq == o.high_cut_freq && ceiling == o.ceiling && ceiling_mode == o.ceiling_mode && oversample == o.oversample && limiting_error == o.limiting_error && video_title == o.video_title && video_status == o.video_status && expire_at == o.expire_at && created_at == o.created_at && updated_at == o.updated_at end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 |
# File 'lib/aimastering/models/mastering.rb', line 622 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = Aimastering.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
688 689 690 691 692 693 694 695 696 697 698 699 700 |
# File 'lib/aimastering/models/mastering.rb', line 688 def _to_hash(value) if value.is_a?(Array) value.compact.map{ |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 |
# File 'lib/aimastering/models/mastering.rb', line 601 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
588 589 590 |
# File 'lib/aimastering/models/mastering.rb', line 588 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
594 595 596 |
# File 'lib/aimastering/models/mastering.rb', line 594 def hash [id, user_id, input_audio_id, output_audio_id, output_video_id, reference_audio_id, mode, status, failure_reason, target_loudness_mode, target_loudness, output_format, preset, bit_depth, sample_rate, review_comment, review_score, mastering_matching_level, progression, bass_preservation, mastering, mastering_algorithm, preserved, retry_count, mastering_reverb, mastering_reverb_gain, low_cut_freq, high_cut_freq, ceiling, ceiling_mode, oversample, limiting_error, video_title, video_status, expire_at, created_at, updated_at].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 |
# File 'lib/aimastering/models/mastering.rb', line 360 def list_invalid_properties invalid_properties = Array.new if !@review_score.nil? && @review_score > 1 invalid_properties.push("invalid value for 'review_score', must be smaller than or equal to 1.") end if !@review_score.nil? && @review_score < 0 invalid_properties.push("invalid value for 'review_score', must be greater than or equal to 0.") end if !@mastering_matching_level.nil? && @mastering_matching_level > 1 invalid_properties.push("invalid value for 'mastering_matching_level', must be smaller than or equal to 1.") end if !@mastering_matching_level.nil? && @mastering_matching_level < 0 invalid_properties.push("invalid value for 'mastering_matching_level', must be greater than or equal to 0.") end if !@progression.nil? && @progression > 1 invalid_properties.push("invalid value for 'progression', must be smaller than or equal to 1.") end if !@progression.nil? && @progression < 0 invalid_properties.push("invalid value for 'progression', must be greater than or equal to 0.") end return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
668 669 670 |
# File 'lib/aimastering/models/mastering.rb', line 668 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
674 675 676 677 678 679 680 681 682 |
# File 'lib/aimastering/models/mastering.rb', line 674 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
662 663 664 |
# File 'lib/aimastering/models/mastering.rb', line 662 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 |
# File 'lib/aimastering/models/mastering.rb', line 391 def valid? mode_validator = EnumAttributeValidator.new('String', ["default", "custom"]) return false unless mode_validator.valid?(@mode) status_validator = EnumAttributeValidator.new('String', ["waiting", "processing", "canceled", "failed", "succeeded"]) return false unless status_validator.valid?(@status) failure_reason_validator = EnumAttributeValidator.new('String', ["unknown", "expired", "failed_to_prepare"]) return false unless failure_reason_validator.valid?(@failure_reason) target_loudness_mode_validator = EnumAttributeValidator.new('String', ["loudness", "rms", "peak", "youtube_loudness"]) return false unless target_loudness_mode_validator.valid?(@target_loudness_mode) output_format_validator = EnumAttributeValidator.new('String', ["wav", "mp3"]) return false unless output_format_validator.valid?(@output_format) preset_validator = EnumAttributeValidator.new('String', ["general", "pop", "jazz", "classical"]) return false unless preset_validator.valid?(@preset) return false if !@review_score.nil? && @review_score > 1 return false if !@review_score.nil? && @review_score < 0 return false if !@mastering_matching_level.nil? && @mastering_matching_level > 1 return false if !@mastering_matching_level.nil? && @mastering_matching_level < 0 return false if !@progression.nil? && @progression > 1 return false if !@progression.nil? && @progression < 0 mastering_algorithm_validator = EnumAttributeValidator.new('String', ["v1", "v2"]) return false unless mastering_algorithm_validator.valid?(@mastering_algorithm) video_status_validator = EnumAttributeValidator.new('String', ["waiting", "failed", "succeeded"]) return false unless video_status_validator.valid?(@video_status) return true end |