// 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/ios/ios.export.g.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import 'package:foundation_fluttify/foundation_fluttify.dart';

class TXRecordResult extends NSObject  {
  //region constants
  static const String name__ = 'TXRecordResult';

  
  //endregion

  //region creators
  static Future<TXRecordResult> create__({ bool init = true /* ios only */ }) async {
    final refId = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('ObjectFactory::createTXRecordResult', {'init': init});
    final object = TXRecordResult()..refId = refId..tag__ = 'tencent_live_fluttify';
    return object;
  }
  
  static Future<List<TXRecordResult>> create_batch__(int length, { bool init = true /* ios only */ }) async {
    if (false) {
      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_batchTXRecordResult', {'length': length, 'init': init});
  
    final List<TXRecordResult> typedResult = resultBatch.map((result) => TXRecordResult()..refId = result..tag__ = 'tencent_live_fluttify').toList();
    return typedResult;
  }
  
  //endregion

  //region getters
  Future<TXRecordResultCode> get_retCode() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXRecordResult::get_retCode", {'__this__': this});
    return __result__ == null ? null : ((__result__ as int).toTXRecordResultCode());
  }
  
  Future<String> get_descMsg() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXRecordResult::get_descMsg", {'__this__': this});
    return __result__ == null ? null : (__result__);
  }
  
  Future<String> get_videoPath() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXRecordResult::get_videoPath", {'__this__': this});
    return __result__ == null ? null : (__result__);
  }
  
  Future<UIImage> get_coverImage() async {
    final __result__ = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXRecordResult::get_coverImage", {'__this__': this});
    return __result__ == null ? null : (UIImage()..refId = __result__..tag__ = 'tencent_live_fluttify');
  }
  
  //endregion

  //region setters
  Future<void> set_retCode(TXRecordResultCode retCode) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXRecordResult::set_retCode', <String, dynamic>{'__this__': this, "retCode": retCode.toValue()});
  
  
  }
  
  Future<void> set_descMsg(String descMsg) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXRecordResult::set_descMsg', <String, dynamic>{'__this__': this, "descMsg": descMsg});
  
  
  }
  
  Future<void> set_videoPath(String videoPath) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXRecordResult::set_videoPath', <String, dynamic>{'__this__': this, "videoPath": videoPath});
  
  
  }
  
  Future<void> set_coverImage(UIImage coverImage) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod('TXRecordResult::set_coverImage', <String, dynamic>{'__this__': this, "coverImage": coverImage});
  
  
  }
  
  //endregion

  //region methods
  
  //endregion
}

extension TXRecordResult_Batch on List<TXRecordResult> {
  //region getters
  Future<List<TXRecordResultCode>> get_retCode_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXRecordResult::get_retCode_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<String>().map((__result__) => (__result__ as int).toTXRecordResultCode()).toList();
    return typedResult;
  }
  
  Future<List<String>> get_descMsg_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXRecordResult::get_descMsg_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
    return typedResult;
  }
  
  Future<List<String>> get_videoPath_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXRecordResult::get_videoPath_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<String>().map((__result__) => __result__).toList();
    return typedResult;
  }
  
  Future<List<UIImage>> get_coverImage_batch() async {
    final resultBatch = await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec('tencent_live_fluttify'))).invokeMethod("TXRecordResult::get_coverImage_batch", [for (final __item__ in this) {'__this__': __item__}]);
  
    final typedResult = (resultBatch as List).cast<String>().map((__result__) => UIImage()..refId = __result__..tag__ = 'tencent_live_fluttify').toList();
    return typedResult;
  }
  
  //endregion

  //region setters
  Future<void> set_retCode_batch(List<TXRecordResultCode> retCode) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXRecordResult::set_retCode_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "retCode": retCode[__i__].toValue()}]);
  
  
  }
  
  Future<void> set_descMsg_batch(List<String> descMsg) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXRecordResult::set_descMsg_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "descMsg": descMsg[__i__]}]);
  
  
  }
  
  Future<void> set_videoPath_batch(List<String> videoPath) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXRecordResult::set_videoPath_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "videoPath": videoPath[__i__]}]);
  
  
  }
  
  Future<void> set_coverImage_batch(List<UIImage> coverImage) async {
    await MethodChannel('com.fluttify/tencent_live_fluttify', StandardMethodCodec(FluttifyMessageCodec())).invokeMethod('TXRecordResult::set_coverImage_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "coverImage": coverImage[__i__]}]);
  
  
  }
  
  //endregion

  //region methods
  
  //endregion
}