system_config_f_fmpeg_dto.dart 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. //
  2. // AUTO-GENERATED FILE, DO NOT MODIFY!
  3. //
  4. // @dart=2.12
  5. // ignore_for_file: unused_element, unused_import
  6. // ignore_for_file: always_put_required_named_parameters_first
  7. // ignore_for_file: constant_identifier_names
  8. // ignore_for_file: lines_longer_than_80_chars
  9. part of openapi.api;
  10. class SystemConfigFFmpegDto {
  11. /// Returns a new [SystemConfigFFmpegDto] instance.
  12. SystemConfigFFmpegDto({
  13. required this.accel,
  14. required this.bframes,
  15. required this.cqMode,
  16. required this.crf,
  17. required this.gopSize,
  18. required this.maxBitrate,
  19. required this.npl,
  20. required this.preset,
  21. required this.refs,
  22. required this.targetAudioCodec,
  23. required this.targetResolution,
  24. required this.targetVideoCodec,
  25. required this.temporalAQ,
  26. required this.threads,
  27. required this.tonemap,
  28. required this.transcode,
  29. required this.twoPass,
  30. });
  31. TranscodeHWAccel accel;
  32. int bframes;
  33. CQMode cqMode;
  34. int crf;
  35. int gopSize;
  36. String maxBitrate;
  37. int npl;
  38. String preset;
  39. int refs;
  40. AudioCodec targetAudioCodec;
  41. String targetResolution;
  42. VideoCodec targetVideoCodec;
  43. bool temporalAQ;
  44. int threads;
  45. ToneMapping tonemap;
  46. TranscodePolicy transcode;
  47. bool twoPass;
  48. @override
  49. bool operator ==(Object other) => identical(this, other) || other is SystemConfigFFmpegDto &&
  50. other.accel == accel &&
  51. other.bframes == bframes &&
  52. other.cqMode == cqMode &&
  53. other.crf == crf &&
  54. other.gopSize == gopSize &&
  55. other.maxBitrate == maxBitrate &&
  56. other.npl == npl &&
  57. other.preset == preset &&
  58. other.refs == refs &&
  59. other.targetAudioCodec == targetAudioCodec &&
  60. other.targetResolution == targetResolution &&
  61. other.targetVideoCodec == targetVideoCodec &&
  62. other.temporalAQ == temporalAQ &&
  63. other.threads == threads &&
  64. other.tonemap == tonemap &&
  65. other.transcode == transcode &&
  66. other.twoPass == twoPass;
  67. @override
  68. int get hashCode =>
  69. // ignore: unnecessary_parenthesis
  70. (accel.hashCode) +
  71. (bframes.hashCode) +
  72. (cqMode.hashCode) +
  73. (crf.hashCode) +
  74. (gopSize.hashCode) +
  75. (maxBitrate.hashCode) +
  76. (npl.hashCode) +
  77. (preset.hashCode) +
  78. (refs.hashCode) +
  79. (targetAudioCodec.hashCode) +
  80. (targetResolution.hashCode) +
  81. (targetVideoCodec.hashCode) +
  82. (temporalAQ.hashCode) +
  83. (threads.hashCode) +
  84. (tonemap.hashCode) +
  85. (transcode.hashCode) +
  86. (twoPass.hashCode);
  87. @override
  88. String toString() => 'SystemConfigFFmpegDto[accel=$accel, bframes=$bframes, cqMode=$cqMode, crf=$crf, gopSize=$gopSize, maxBitrate=$maxBitrate, npl=$npl, preset=$preset, refs=$refs, targetAudioCodec=$targetAudioCodec, targetResolution=$targetResolution, targetVideoCodec=$targetVideoCodec, temporalAQ=$temporalAQ, threads=$threads, tonemap=$tonemap, transcode=$transcode, twoPass=$twoPass]';
  89. Map<String, dynamic> toJson() {
  90. final json = <String, dynamic>{};
  91. json[r'accel'] = this.accel;
  92. json[r'bframes'] = this.bframes;
  93. json[r'cqMode'] = this.cqMode;
  94. json[r'crf'] = this.crf;
  95. json[r'gopSize'] = this.gopSize;
  96. json[r'maxBitrate'] = this.maxBitrate;
  97. json[r'npl'] = this.npl;
  98. json[r'preset'] = this.preset;
  99. json[r'refs'] = this.refs;
  100. json[r'targetAudioCodec'] = this.targetAudioCodec;
  101. json[r'targetResolution'] = this.targetResolution;
  102. json[r'targetVideoCodec'] = this.targetVideoCodec;
  103. json[r'temporalAQ'] = this.temporalAQ;
  104. json[r'threads'] = this.threads;
  105. json[r'tonemap'] = this.tonemap;
  106. json[r'transcode'] = this.transcode;
  107. json[r'twoPass'] = this.twoPass;
  108. return json;
  109. }
  110. /// Returns a new [SystemConfigFFmpegDto] instance and imports its values from
  111. /// [value] if it's a [Map], null otherwise.
  112. // ignore: prefer_constructors_over_static_methods
  113. static SystemConfigFFmpegDto? fromJson(dynamic value) {
  114. if (value is Map) {
  115. final json = value.cast<String, dynamic>();
  116. return SystemConfigFFmpegDto(
  117. accel: TranscodeHWAccel.fromJson(json[r'accel'])!,
  118. bframes: mapValueOfType<int>(json, r'bframes')!,
  119. cqMode: CQMode.fromJson(json[r'cqMode'])!,
  120. crf: mapValueOfType<int>(json, r'crf')!,
  121. gopSize: mapValueOfType<int>(json, r'gopSize')!,
  122. maxBitrate: mapValueOfType<String>(json, r'maxBitrate')!,
  123. npl: mapValueOfType<int>(json, r'npl')!,
  124. preset: mapValueOfType<String>(json, r'preset')!,
  125. refs: mapValueOfType<int>(json, r'refs')!,
  126. targetAudioCodec: AudioCodec.fromJson(json[r'targetAudioCodec'])!,
  127. targetResolution: mapValueOfType<String>(json, r'targetResolution')!,
  128. targetVideoCodec: VideoCodec.fromJson(json[r'targetVideoCodec'])!,
  129. temporalAQ: mapValueOfType<bool>(json, r'temporalAQ')!,
  130. threads: mapValueOfType<int>(json, r'threads')!,
  131. tonemap: ToneMapping.fromJson(json[r'tonemap'])!,
  132. transcode: TranscodePolicy.fromJson(json[r'transcode'])!,
  133. twoPass: mapValueOfType<bool>(json, r'twoPass')!,
  134. );
  135. }
  136. return null;
  137. }
  138. static List<SystemConfigFFmpegDto> listFromJson(dynamic json, {bool growable = false,}) {
  139. final result = <SystemConfigFFmpegDto>[];
  140. if (json is List && json.isNotEmpty) {
  141. for (final row in json) {
  142. final value = SystemConfigFFmpegDto.fromJson(row);
  143. if (value != null) {
  144. result.add(value);
  145. }
  146. }
  147. }
  148. return result.toList(growable: growable);
  149. }
  150. static Map<String, SystemConfigFFmpegDto> mapFromJson(dynamic json) {
  151. final map = <String, SystemConfigFFmpegDto>{};
  152. if (json is Map && json.isNotEmpty) {
  153. json = json.cast<String, dynamic>(); // ignore: parameter_assignments
  154. for (final entry in json.entries) {
  155. final value = SystemConfigFFmpegDto.fromJson(entry.value);
  156. if (value != null) {
  157. map[entry.key] = value;
  158. }
  159. }
  160. }
  161. return map;
  162. }
  163. // maps a json object with a list of SystemConfigFFmpegDto-objects as value to a dart map
  164. static Map<String, List<SystemConfigFFmpegDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
  165. final map = <String, List<SystemConfigFFmpegDto>>{};
  166. if (json is Map && json.isNotEmpty) {
  167. // ignore: parameter_assignments
  168. json = json.cast<String, dynamic>();
  169. for (final entry in json.entries) {
  170. map[entry.key] = SystemConfigFFmpegDto.listFromJson(entry.value, growable: growable,);
  171. }
  172. }
  173. return map;
  174. }
  175. /// The list of required keys that must be present in a JSON.
  176. static const requiredKeys = <String>{
  177. 'accel',
  178. 'bframes',
  179. 'cqMode',
  180. 'crf',
  181. 'gopSize',
  182. 'maxBitrate',
  183. 'npl',
  184. 'preset',
  185. 'refs',
  186. 'targetAudioCodec',
  187. 'targetResolution',
  188. 'targetVideoCodec',
  189. 'temporalAQ',
  190. 'threads',
  191. 'tonemap',
  192. 'transcode',
  193. 'twoPass',
  194. };
  195. }