// ignore_for_file: non_constant_identifier_names, camel_case_types, missing_return, unused_import, unused_local_variable, dead_code, unnecessary_cast
//////////////////////////////////////////////////////////
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
//////////////////////////////////////////////////////////

import 'dart:typed_data';

import 'package:tencent_live_fluttify/src/android/android.export.g.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import 'package:foundation_fluttify/foundation_fluttify.dart';

class com_tencent_rtmp_downloader_TXVodDownloadDataSource extends java_lang_Object  {
  //region constants
  static const String name__ = 'com.tencent.rtmp.downloader.TXVodDownloadDataSource';

  static final int QUALITY_OD = 0;
  static final int QUALITY_FLU = 1;
  static final int QUALITY_SD = 2;
  static final int QUALITY_HD = 3;
  static final int QUALITY_FHD = 4;
  static final int QUALITY_2K = 5;
  static final int QUALITY_4K = 6;
  static final int QUALITY_UNK = 1000;
  //endregion

  //region creators
  static Future<com_tencent_rtmp_downloader_TXVodDownloadDataSource> create__com_tencent_rtmp_TXPlayerAuthBuilder__int(com_tencent_rtmp_TXPlayerAuthBuilder var1, int var2) async {
    final refId = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::createcom_tencent_rtmp_downloader_TXVodDownloadDataSource__com_tencent_rtmp_TXPlayerAuthBuilder__int', {"var1": var1, "var2": var2});
    final object = com_tencent_rtmp_downloader_TXVodDownloadDataSource()..refId = refId..tag__ = 'tencent_live_fluttify';
    return object;
  }
  
  static Future<com_tencent_rtmp_downloader_TXVodDownloadDataSource> create__com_tencent_rtmp_TXPlayerAuthBuilder__String(com_tencent_rtmp_TXPlayerAuthBuilder var1, String var2) async {
    final refId = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::createcom_tencent_rtmp_downloader_TXVodDownloadDataSource__com_tencent_rtmp_TXPlayerAuthBuilder__String', {"var1": var1, "var2": var2});
    final object = com_tencent_rtmp_downloader_TXVodDownloadDataSource()..refId = refId..tag__ = 'tencent_live_fluttify';
    return object;
  }
  
  static Future<List<com_tencent_rtmp_downloader_TXVodDownloadDataSource>> create_batch__com_tencent_rtmp_TXPlayerAuthBuilder__int(List<com_tencent_rtmp_TXPlayerAuthBuilder> var1, List<int> var2) async {
    if (var1.length != var2.length) {
      return Future.error('all args must have same length!');
    }
    final List resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::create_batchcom_tencent_rtmp_downloader_TXVodDownloadDataSource__com_tencent_rtmp_TXPlayerAuthBuilder__int', [for (int __i__ = 0; __i__ < var1.length; __i__++) {"var1": var1[__i__], "var2": var2[__i__]}]);
  
    final List<com_tencent_rtmp_downloader_TXVodDownloadDataSource> typedResult = resultBatch.map((result) => com_tencent_rtmp_downloader_TXVodDownloadDataSource()..refId = result..tag__ = 'tencent_live_fluttify').toList();
    return typedResult;
  }
  
  static Future<List<com_tencent_rtmp_downloader_TXVodDownloadDataSource>> create_batch__com_tencent_rtmp_TXPlayerAuthBuilder__String(List<com_tencent_rtmp_TXPlayerAuthBuilder> var1, List<String> var2) async {
    if (var1.length != var2.length) {
      return Future.error('all args must have same length!');
    }
    final List resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::create_batchcom_tencent_rtmp_downloader_TXVodDownloadDataSource__com_tencent_rtmp_TXPlayerAuthBuilder__String', [for (int __i__ = 0; __i__ < var1.length; __i__++) {"var1": var1[__i__], "var2": var2[__i__]}]);
  
    final List<com_tencent_rtmp_downloader_TXVodDownloadDataSource> typedResult = resultBatch.map((result) => com_tencent_rtmp_downloader_TXVodDownloadDataSource()..refId = result..tag__ = 'tencent_live_fluttify').toList();
    return typedResult;
  }
  
  //endregion

  //region getters
  
  //endregion

  //region setters
  
  //endregion

  //region methods
  
  Future<void> setToken(String var1) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.tencent.rtmp.downloader.TXVodDownloadDataSource@$refId::setToken([\'var1\':$var1])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.downloader.TXVodDownloadDataSource::setToken', {"var1": var1, "__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<com_tencent_rtmp_TXPlayerAuthBuilder> getAuthBuilder() async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.tencent.rtmp.downloader.TXVodDownloadDataSource@$refId::getAuthBuilder([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.downloader.TXVodDownloadDataSource::getAuthBuilder', {"__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = com_tencent_rtmp_TXPlayerAuthBuilder()..refId = __result__..tag__ = 'tencent_live_fluttify';
      return __return__;
    }
  }
  
  
  Future<int> getQuality() async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.tencent.rtmp.downloader.TXVodDownloadDataSource@$refId::getQuality([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.downloader.TXVodDownloadDataSource::getQuality', {"__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<String> getTemplateName() async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.tencent.rtmp.downloader.TXVodDownloadDataSource@$refId::getTemplateName([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.downloader.TXVodDownloadDataSource::getTemplateName', {"__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  
  Future<String> getToken() async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.tencent.rtmp.downloader.TXVodDownloadDataSource@$refId::getToken([])');
    }
  
    // invoke native method
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.downloader.TXVodDownloadDataSource::getToken', {"__this__": this});
  
  
    // handle native call
  
  
    // convert native result to dart side object
    if (__result__ == null) {
      return null;
    } else {
      final __return__ = __result__;
      return __return__;
    }
  }
  
  //endregion
}

extension com_tencent_rtmp_downloader_TXVodDownloadDataSource_Batch on List<com_tencent_rtmp_downloader_TXVodDownloadDataSource> {
  //region getters
  
  //endregion

  //region setters
  
  //endregion

  //region methods
  
  Future<List<void>> setToken_batch(List<String> var1) async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.downloader.TXVodDownloadDataSource::setToken_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"var1": var1[__i__], "__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<com_tencent_rtmp_TXPlayerAuthBuilder>> getAuthBuilder_batch() async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.downloader.TXVodDownloadDataSource::getAuthBuilder_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => com_tencent_rtmp_TXPlayerAuthBuilder()..refId = __result__..tag__ = 'tencent_live_fluttify').toList();
      return typedResult;
    }
  }
  
  
  Future<List<int>> getQuality_batch() async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.downloader.TXVodDownloadDataSource::getQuality_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<int>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<String>> getTemplateName_batch() async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.downloader.TXVodDownloadDataSource::getTemplateName_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  
  Future<List<String>> getToken_batch() async {
    if (false) {
      return Future.error('all args must have same length!');
    }
  
    // invoke native method
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('com.tencent.rtmp.downloader.TXVodDownloadDataSource::getToken_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"__this__": this[__i__]}]);
  
  
    // convert native result to dart side object
    if (resultBatch == null) {
      return null;
    } else {
      final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
      return typedResult;
    }
  }
  
  //endregion
}